diff --git a/dist/gnosis-pm.js b/dist/gnosis-pm.js index 42b9010..c71895b 100644 --- a/dist/gnosis-pm.js +++ b/dist/gnosis-pm.js @@ -80,39 +80,71 @@ var Gnosis = /***/ (function(module, exports, __webpack_require__) { var map = { + "./BasicToken.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/BasicToken.json", "./Campaign.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Campaign.json", + "./CampaignData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CampaignData.json", "./CampaignFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CampaignFactory.json", + "./CampaignProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CampaignProxy.json", "./CategoricalEvent.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CategoricalEvent.json", + "./CategoricalEventProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CategoricalEventProxy.json", "./CentralizedOracle.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracle.json", + "./CentralizedOracleData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracleData.json", "./CentralizedOracleFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracleFactory.json", + "./CentralizedOracleProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracleProxy.json", + "./Contract.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Contract.json", + "./DetailedERC20.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/DetailedERC20.json", "./DifficultyOracle.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/DifficultyOracle.json", "./DifficultyOracleFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/DifficultyOracleFactory.json", + "./ERC20.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ERC20.json", + "./ERC20Basic.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ERC20Basic.json", "./EtherToken.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/EtherToken.json", "./Event.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Event.json", + "./EventData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/EventData.json", "./EventFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/EventFactory.json", + "./Fixed192x64Math.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Fixed192x64Math.json", "./FutarchyOracle.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracle.json", + "./FutarchyOracleData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracleData.json", "./FutarchyOracleFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracleFactory.json", + "./FutarchyOracleProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracleProxy.json", "./HumanFriendlyToken.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/HumanFriendlyToken.json", "./LMSRMarketMaker.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/LMSRMarketMaker.json", "./MajorityOracle.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracle.json", + "./MajorityOracleData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracleData.json", "./MajorityOracleFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracleFactory.json", + "./MajorityOracleProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracleProxy.json", "./Market.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Market.json", + "./MarketData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MarketData.json", "./MarketMaker.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MarketMaker.json", "./Math.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Math.json", "./Migrations.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Migrations.json", "./Oracle.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Oracle.json", "./OutcomeToken.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/OutcomeToken.json", + "./OutcomeTokenProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/OutcomeTokenProxy.json", + "./Proxied.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Proxied.json", + "./Proxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Proxy.json", + "./SafeMath.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/SafeMath.json", "./ScalarEvent.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ScalarEvent.json", + "./ScalarEventData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ScalarEventData.json", + "./ScalarEventProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ScalarEventProxy.json", "./SignedMessageOracle.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracle.json", + "./SignedMessageOracleData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracleData.json", "./SignedMessageOracleFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracleFactory.json", + "./SignedMessageOracleProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracleProxy.json", "./StandardMarket.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarket.json", + "./StandardMarketData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketData.json", "./StandardMarketFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketFactory.json", + "./StandardMarketProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketProxy.json", "./StandardMarketWithPriceLogger.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLogger.json", + "./StandardMarketWithPriceLoggerData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLoggerData.json", "./StandardMarketWithPriceLoggerFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLoggerFactory.json", + "./StandardMarketWithPriceLoggerProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLoggerProxy.json", "./StandardToken.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardToken.json", "./Token.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Token.json", "./UltimateOracle.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracle.json", - "./UltimateOracleFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleFactory.json" + "./UltimateOracleData.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleData.json", + "./UltimateOracleFactory.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleFactory.json", + "./UltimateOracleProxy.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleProxy.json", + "./WETH9.json": "./node_modules/@gnosis.pm/pm-contracts/build/contracts/WETH9.json" }; @@ -139,14 +171,36 @@ webpackContext.id = "./node_modules/@gnosis.pm/pm-contracts/build/contracts sync /***/ }), +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/BasicToken.json": +/*!******************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/BasicToken.json ***! + \******************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"BasicToken","abi":[{"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"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50610415806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318160ddd1461005c57806370a0823114610087578063a9059cbb146100de575b600080fd5b34801561006857600080fd5b50610071610143565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b506100c8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061014d565b6040518082815260200191505060405180910390f35b3480156100ea57600080fd5b50610129600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610195565b604051808215151515815260200191505060405180910390f35b6000600154905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156101d257600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561021f57600080fd5b610270826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103b490919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610303826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103cd90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60008282111515156103c257fe5b818303905092915050565b600081830190508281101515156103e057fe5b809050929150505600a165627a7a7230582066bd80e0dcdc08750ce8ac934422ab2fb51396c0bee1c63a92adaeddc5d521230029","deployedBytecode":"0x608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318160ddd1461005c57806370a0823114610087578063a9059cbb146100de575b600080fd5b34801561006857600080fd5b50610071610143565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b506100c8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061014d565b6040518082815260200191505060405180910390f35b3480156100ea57600080fd5b50610129600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610195565b604051808215151515815260200191505060405180910390f35b6000600154905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156101d257600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561021f57600080fd5b610270826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103b490919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610303826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103cd90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60008282111515156103c257fe5b818303905092915050565b600081830190508281101515156103e057fe5b809050929150505600a165627a7a7230582066bd80e0dcdc08750ce8ac934422ab2fb51396c0bee1c63a92adaeddc5d521230029","sourceMap":"180:1053:32:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;180:1053:32;;;;;;;","deployedSourceMap":"180:1053:32:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;371:83:32;;;;;;;;;;;;;;;;;;;;;;;1131:99;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1131:99:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;608:321;;8:9:-1;5:2;;;30:1;27;20:12;5:2;608:321:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:83;415:7;437:12;;430:19;;371:83;:::o;1131:99::-;1187:7;1209:8;:16;1218:6;1209:16;;;;;;;;;;;;;;;;1202:23;;1131:99;;;:::o;608:321::-;671:4;706:1;691:17;;:3;:17;;;;683:26;;;;;;;;733:8;:20;742:10;733:20;;;;;;;;;;;;;;;;723:6;:30;;715:39;;;;;;;;784:32;809:6;784:8;:20;793:10;784:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;761:8;:20;770:10;761:20;;;;;;;;;;;;;;;:55;;;;838:25;856:6;838:8;:13;847:3;838:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;822:8;:13;831:3;822:13;;;;;;;;;;;;;;;:41;;;;895:3;874:33;;883:10;874:33;;;900:6;874:33;;;;;;;;;;;;;;;;;;920:4;913:11;;608:321;;;;:::o;1968:110:31:-;2026:7;2053:1;2048;:6;;2041:14;;;;;;2072:1;2068;:5;2061:12;;1968:110;;;;:::o;2363:123::-;2421:9;2446:1;2442;:5;2438:9;;2465:1;2460;:6;;2453:14;;;;;;2480:1;2473:8;;2363:123;;;;:::o","source":"pragma solidity ^0.4.24;\n\n\nimport \"./ERC20Basic.sol\";\nimport \"../../math/SafeMath.sol\";\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev Total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev Transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n emit Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256) {\n return balances[_owner];\n }\n\n}\n","sourcePath":"openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol","ast":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol","exportedSymbols":{"BasicToken":[7285]},"id":7286,"nodeType":"SourceUnit","nodes":[{"id":7191,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:32"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","file":"./ERC20Basic.sol","id":7192,"nodeType":"ImportDirective","scope":7286,"sourceUnit":7361,"src":"27:26:32","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"../../math/SafeMath.sol","id":7193,"nodeType":"ImportDirective","scope":7286,"sourceUnit":7190,"src":"54:33:32","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":7194,"name":"ERC20Basic","nodeType":"UserDefinedTypeName","referencedDeclaration":7360,"src":"203:10:32","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20Basic_$7360","typeString":"contract ERC20Basic"}},"id":7195,"nodeType":"InheritanceSpecifier","src":"203:10:32"}],"contractDependencies":[7360],"contractKind":"contract","documentation":"@title Basic token\n@dev Basic version of StandardToken, with no allowances.","fullyImplemented":true,"id":7285,"linearizedBaseContracts":[7285,7360],"name":"BasicToken","nodeType":"ContractDefinition","nodes":[{"id":7198,"libraryName":{"contractScope":null,"id":7196,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"224:8:32","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"218:27:32","typeName":{"id":7197,"name":"uint256","nodeType":"ElementaryTypeName","src":"237:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},{"constant":false,"id":7202,"name":"balances","nodeType":"VariableDeclaration","scope":7285,"src":"249:36:32","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":7201,"keyType":{"id":7199,"name":"address","nodeType":"ElementaryTypeName","src":"257:7:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"249:27:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":7200,"name":"uint256","nodeType":"ElementaryTypeName","src":"268:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"internal"},{"constant":false,"id":7204,"name":"totalSupply_","nodeType":"VariableDeclaration","scope":7285,"src":"290:20:32","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7203,"name":"uint256","nodeType":"ElementaryTypeName","src":"290:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"body":{"id":7211,"nodeType":"Block","src":"424:30:32","statements":[{"expression":{"argumentTypes":null,"id":7209,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"437:12:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7208,"id":7210,"nodeType":"Return","src":"430:19:32"}]},"documentation":"@dev Total number of tokens in existence","id":7212,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"totalSupply","nodeType":"FunctionDefinition","parameters":{"id":7205,"nodeType":"ParameterList","parameters":[],"src":"391:2:32"},"payable":false,"returnParameters":{"id":7208,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7207,"name":"","nodeType":"VariableDeclaration","scope":7212,"src":"415:7:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7206,"name":"uint256","nodeType":"ElementaryTypeName","src":"415:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"414:9:32"},"scope":7285,"src":"371:83:32","stateMutability":"view","superFunction":7335,"visibility":"public"},{"body":{"id":7271,"nodeType":"Block","src":"677:252:32","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":7226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7222,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7214,"src":"691:3:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"hexValue":"30","id":7224,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"706:1:32","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":7223,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"698:7:32","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":7225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"698:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"691:17:32","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7221,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"683:7:32","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7227,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"683:26:32","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7228,"nodeType":"ExpressionStatement","src":"683:26:32"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7235,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7230,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7216,"src":"723:6:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7231,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"733:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7234,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7232,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"742:3:32","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7233,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"742:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"733:20:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"723:30:32","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7229,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"715:7:32","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7236,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"715:39:32","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7237,"nodeType":"ExpressionStatement","src":"715:39:32"},{"expression":{"argumentTypes":null,"id":7249,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7238,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"761:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7241,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7239,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"770:3:32","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"770:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"761:20:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7247,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7216,"src":"809:6:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7242,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"784:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7245,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7243,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"793:3:32","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"793:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"784:20:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"784:24:32","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7248,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"784:32:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"761:55:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7250,"nodeType":"ExpressionStatement","src":"761:55:32"},{"expression":{"argumentTypes":null,"id":7260,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7251,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"822:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7253,"indexExpression":{"argumentTypes":null,"id":7252,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7214,"src":"831:3:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"822:13:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7258,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7216,"src":"856:6:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7254,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"838:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7256,"indexExpression":{"argumentTypes":null,"id":7255,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7214,"src":"847:3:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"838:13:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"838:17:32","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7259,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"838:25:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"822:41:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7261,"nodeType":"ExpressionStatement","src":"822:41:32"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7263,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"883:3:32","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"883:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7265,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7214,"src":"895:3:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7266,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7216,"src":"900:6:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7262,"name":"Transfer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7359,"src":"874:8:32","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7267,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"874:33:32","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7268,"nodeType":"EmitStatement","src":"869:38:32"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7269,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"920:4:32","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7220,"id":7270,"nodeType":"Return","src":"913:11:32"}]},"documentation":"@dev Transfer token for a specified address\n@param _to The address to transfer to.\n@param _value The amount to be transferred.","id":7272,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transfer","nodeType":"FunctionDefinition","parameters":{"id":7217,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7214,"name":"_to","nodeType":"VariableDeclaration","scope":7272,"src":"626:11:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7213,"name":"address","nodeType":"ElementaryTypeName","src":"626:7:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7216,"name":"_value","nodeType":"VariableDeclaration","scope":7272,"src":"639:14:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7215,"name":"uint256","nodeType":"ElementaryTypeName","src":"639:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"625:29:32"},"payable":false,"returnParameters":{"id":7220,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7219,"name":"","nodeType":"VariableDeclaration","scope":7272,"src":"671:4:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7218,"name":"bool","nodeType":"ElementaryTypeName","src":"671:4:32","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"670:6:32"},"scope":7285,"src":"608:321:32","stateMutability":"nonpayable","superFunction":7351,"visibility":"public"},{"body":{"id":7283,"nodeType":"Block","src":"1196:34:32","statements":[{"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7279,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1209:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7281,"indexExpression":{"argumentTypes":null,"id":7280,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7274,"src":"1218:6:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1209:16:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7278,"id":7282,"nodeType":"Return","src":"1202:23:32"}]},"documentation":"@dev Gets the balance of the specified address.\n@param _owner The address to query the the balance of.\n@return An uint256 representing the amount owned by the passed address.","id":7284,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"balanceOf","nodeType":"FunctionDefinition","parameters":{"id":7275,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7274,"name":"_owner","nodeType":"VariableDeclaration","scope":7284,"src":"1150:14:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7273,"name":"address","nodeType":"ElementaryTypeName","src":"1150:7:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1149:16:32"},"payable":false,"returnParameters":{"id":7278,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7277,"name":"","nodeType":"VariableDeclaration","scope":7284,"src":"1187:7:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7276,"name":"uint256","nodeType":"ElementaryTypeName","src":"1187:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1186:9:32"},"scope":7285,"src":"1131:99:32","stateMutability":"view","superFunction":7342,"visibility":"public"}],"scope":7286,"src":"180:1053:32"}],"src":"0:1234:32"},"legacyAST":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol","exportedSymbols":{"BasicToken":[7285]},"id":7286,"nodeType":"SourceUnit","nodes":[{"id":7191,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:32"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","file":"./ERC20Basic.sol","id":7192,"nodeType":"ImportDirective","scope":7286,"sourceUnit":7361,"src":"27:26:32","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"../../math/SafeMath.sol","id":7193,"nodeType":"ImportDirective","scope":7286,"sourceUnit":7190,"src":"54:33:32","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":7194,"name":"ERC20Basic","nodeType":"UserDefinedTypeName","referencedDeclaration":7360,"src":"203:10:32","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20Basic_$7360","typeString":"contract ERC20Basic"}},"id":7195,"nodeType":"InheritanceSpecifier","src":"203:10:32"}],"contractDependencies":[7360],"contractKind":"contract","documentation":"@title Basic token\n@dev Basic version of StandardToken, with no allowances.","fullyImplemented":true,"id":7285,"linearizedBaseContracts":[7285,7360],"name":"BasicToken","nodeType":"ContractDefinition","nodes":[{"id":7198,"libraryName":{"contractScope":null,"id":7196,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"224:8:32","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"218:27:32","typeName":{"id":7197,"name":"uint256","nodeType":"ElementaryTypeName","src":"237:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},{"constant":false,"id":7202,"name":"balances","nodeType":"VariableDeclaration","scope":7285,"src":"249:36:32","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":7201,"keyType":{"id":7199,"name":"address","nodeType":"ElementaryTypeName","src":"257:7:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"249:27:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":7200,"name":"uint256","nodeType":"ElementaryTypeName","src":"268:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"internal"},{"constant":false,"id":7204,"name":"totalSupply_","nodeType":"VariableDeclaration","scope":7285,"src":"290:20:32","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7203,"name":"uint256","nodeType":"ElementaryTypeName","src":"290:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"body":{"id":7211,"nodeType":"Block","src":"424:30:32","statements":[{"expression":{"argumentTypes":null,"id":7209,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"437:12:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7208,"id":7210,"nodeType":"Return","src":"430:19:32"}]},"documentation":"@dev Total number of tokens in existence","id":7212,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"totalSupply","nodeType":"FunctionDefinition","parameters":{"id":7205,"nodeType":"ParameterList","parameters":[],"src":"391:2:32"},"payable":false,"returnParameters":{"id":7208,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7207,"name":"","nodeType":"VariableDeclaration","scope":7212,"src":"415:7:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7206,"name":"uint256","nodeType":"ElementaryTypeName","src":"415:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"414:9:32"},"scope":7285,"src":"371:83:32","stateMutability":"view","superFunction":7335,"visibility":"public"},{"body":{"id":7271,"nodeType":"Block","src":"677:252:32","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":7226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7222,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7214,"src":"691:3:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"hexValue":"30","id":7224,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"706:1:32","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":7223,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"698:7:32","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":7225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"698:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"691:17:32","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7221,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"683:7:32","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7227,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"683:26:32","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7228,"nodeType":"ExpressionStatement","src":"683:26:32"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7235,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7230,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7216,"src":"723:6:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7231,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"733:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7234,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7232,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"742:3:32","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7233,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"742:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"733:20:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"723:30:32","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7229,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"715:7:32","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7236,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"715:39:32","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7237,"nodeType":"ExpressionStatement","src":"715:39:32"},{"expression":{"argumentTypes":null,"id":7249,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7238,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"761:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7241,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7239,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"770:3:32","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"770:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"761:20:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7247,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7216,"src":"809:6:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7242,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"784:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7245,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7243,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"793:3:32","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"793:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"784:20:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"784:24:32","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7248,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"784:32:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"761:55:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7250,"nodeType":"ExpressionStatement","src":"761:55:32"},{"expression":{"argumentTypes":null,"id":7260,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7251,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"822:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7253,"indexExpression":{"argumentTypes":null,"id":7252,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7214,"src":"831:3:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"822:13:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7258,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7216,"src":"856:6:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7254,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"838:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7256,"indexExpression":{"argumentTypes":null,"id":7255,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7214,"src":"847:3:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"838:13:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"838:17:32","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7259,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"838:25:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"822:41:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7261,"nodeType":"ExpressionStatement","src":"822:41:32"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7263,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"883:3:32","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"883:10:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7265,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7214,"src":"895:3:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7266,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7216,"src":"900:6:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7262,"name":"Transfer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7359,"src":"874:8:32","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7267,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"874:33:32","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7268,"nodeType":"EmitStatement","src":"869:38:32"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7269,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"920:4:32","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7220,"id":7270,"nodeType":"Return","src":"913:11:32"}]},"documentation":"@dev Transfer token for a specified address\n@param _to The address to transfer to.\n@param _value The amount to be transferred.","id":7272,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transfer","nodeType":"FunctionDefinition","parameters":{"id":7217,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7214,"name":"_to","nodeType":"VariableDeclaration","scope":7272,"src":"626:11:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7213,"name":"address","nodeType":"ElementaryTypeName","src":"626:7:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7216,"name":"_value","nodeType":"VariableDeclaration","scope":7272,"src":"639:14:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7215,"name":"uint256","nodeType":"ElementaryTypeName","src":"639:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"625:29:32"},"payable":false,"returnParameters":{"id":7220,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7219,"name":"","nodeType":"VariableDeclaration","scope":7272,"src":"671:4:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7218,"name":"bool","nodeType":"ElementaryTypeName","src":"671:4:32","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"670:6:32"},"scope":7285,"src":"608:321:32","stateMutability":"nonpayable","superFunction":7351,"visibility":"public"},{"body":{"id":7283,"nodeType":"Block","src":"1196:34:32","statements":[{"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7279,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1209:8:32","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7281,"indexExpression":{"argumentTypes":null,"id":7280,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7274,"src":"1218:6:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1209:16:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7278,"id":7282,"nodeType":"Return","src":"1202:23:32"}]},"documentation":"@dev Gets the balance of the specified address.\n@param _owner The address to query the the balance of.\n@return An uint256 representing the amount owned by the passed address.","id":7284,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"balanceOf","nodeType":"FunctionDefinition","parameters":{"id":7275,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7274,"name":"_owner","nodeType":"VariableDeclaration","scope":7284,"src":"1150:14:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7273,"name":"address","nodeType":"ElementaryTypeName","src":"1150:7:32","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1149:16:32"},"payable":false,"returnParameters":{"id":7278,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7277,"name":"","nodeType":"VariableDeclaration","scope":7284,"src":"1187:7:32","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7276,"name":"uint256","nodeType":"ElementaryTypeName","src":"1187:7:32","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1186:9:32"},"scope":7285,"src":"1131:99:32","stateMutability":"view","superFunction":7342,"visibility":"public"}],"scope":7286,"src":"180:1053:32"}],"src":"0:1234:32"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.049Z"}; + +/***/ }), + /***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Campaign.json": /*!****************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Campaign.json ***! \****************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"Campaign","abi":[{"constant":true,"inputs":[],"name":"marketFactory","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"finalBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"deadline","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contributions","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdrawFees","outputs":[{"name":"fees","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[{"name":"refundAmount","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"market","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"createMarket","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"closeMarket","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"type":"function"},{"inputs":[{"name":"_eventContract","type":"address"},{"name":"_marketFactory","type":"address"},{"name":"_marketMaker","type":"address"},{"name":"_fee","type":"uint24"},{"name":"_funding","type":"uint256"},{"name":"_deadline","type":"uint256"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"funding","type":"uint256"}],"name":"CampaignFunding","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"refund","type":"uint256"}],"name":"CampaignRefund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"market","type":"address"}],"name":"MarketCreation","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"receiver","type":"address"},{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263312}; +module.exports = {"contractName":"Campaign","abi":[{"constant":true,"inputs":[],"name":"marketFactory","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"finalBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"deadline","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contributions","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"market","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":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"funding","type":"uint256"}],"name":"CampaignFunding","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"refund","type":"uint256"}],"name":"CampaignRefund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"market","type":"address"}],"name":"MarketCreation","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"receiver","type":"address"},{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[{"name":"refundAmount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"createMarket","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"closeMarket","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFees","outputs":[{"name":"fees","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50611ca1806100206000396000f3006080604052600436106100f1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae7095146100f65780631f21f9af1461014d5780632129e25a146101a457806329dcb0cf146101cf57806342e94c90146101fa578063476343ee14610251578063590e1ae31461027c57806380f55605146102a7578063a619486e146102fe578063aea0e35f14610355578063c040e6b8146103ac578063c511ed5e146103e5578063ca1d209d146103fc578063cb4c86b714610429578063ddca3f4314610454578063e274fd2414610489578063fbde47f6146104e0575b600080fd5b34801561010257600080fd5b5061010b610515565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015957600080fd5b5061016261053b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101b057600080fd5b506101b9610561565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b506101e4610567565b6040518082815260200191505060405180910390f35b34801561020657600080fd5b5061023b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061056d565b6040518082815260200191505060405180910390f35b34801561025d57600080fd5b50610266610585565b6040518082815260200191505060405180910390f35b34801561028857600080fd5b5061029161085f565b6040518082815260200191505060405180910390f35b3480156102b357600080fd5b506102bc610b77565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561030a57600080fd5b50610313610b9d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036157600080fd5b5061036a610bc2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103b857600080fd5b506103c1611155565b604051808260048111156103d157fe5b60ff16815260200191505060405180910390f35b3480156103f157600080fd5b506103fa611168565b005b34801561040857600080fd5b506104276004803603810190808035906020019092919050505061167a565b005b34801561043557600080fd5b5061043e611bc0565b6040518082815260200191505060405180910390f35b34801561046057600080fd5b50610469611bc6565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561049557600080fd5b5061049e611bdb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104ec57600080fd5b506104f5611c01565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60065481565b60086020528060005260406000206000915090505481565b6000600480600481111561059557fe5b600960009054906101000a900460ff1660048111156105b057fe5b1415156105bc57600080fd5b600554610613600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600754611c0890919063ffffffff16565b81151561061c57fe5b0491506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156106ea57600080fd5b505af11580156106fe573d6000803e3d6000fd5b505050506040513d602081101561071457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156107c757600080fd5b505af11580156107db573d6000803e3d6000fd5b505050506040513d60208110156107f157600080fd5b8101908080519060200190929190505050151561080d57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167fee33a3a9cb48e4ff209f8b1c67c4632f1dbbf55aeff8e6f17d957ade7a6fb17c836040518082815260200191505060405180910390a25090565b600080600481111561086d57fe5b600960009054906101000a900460ff16600481111561088857fe5b148015610896575042600654105b156108c0576002600960006101000a81548160ff021916908360048111156108ba57fe5b02179055505b60028060048111156108ce57fe5b600960009054906101000a900460ff1660048111156108e957fe5b1415156108f557600080fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a0257600080fd5b505af1158015610a16573d6000803e3d6000fd5b505050506040513d6020811015610a2c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610adf57600080fd5b505af1158015610af3573d6000803e3d6000fd5b505050506040513d6020811015610b0957600080fd5b81019080805190602001909291905050501515610b2557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167fd53235e384e83b261994d71b101de6c22402415c0c0d313f064a90e91039e2a9836040518082815260200191505060405180910390a25090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806004811115610bd057fe5b600960009054906101000a900460ff166004811115610beb57fe5b148015610bf9575042600654105b15610c23576002600960006101000a81548160ff02191690836004811115610c1d57fe5b02179055505b6001806004811115610c3157fe5b600960009054906101000a900460ff166004811115610c4c57fe5b141515610c5857600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637abeb6a0600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460149054906101000a900462ffffff166040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff1662ffffff1681526020019350505050602060405180830381600087803b158015610db057600080fd5b505af1158015610dc4573d6000803e3d6000fd5b505050506040513d6020811015610dda57600080fd5b8101908080519060200190929190505050600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610eb157600080fd5b505af1158015610ec5573d6000803e3d6000fd5b505050506040513d6020811015610edb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166005546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b505050506040513d6020811015610fdc57600080fd5b81019080805190602001909291905050501515610ff857600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca1d209d6005546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561108b57600080fd5b505af115801561109f573d6000803e3d6000fd5b505050506003600960006101000a81548160ff021916908360048111156110c257fe5b0217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fd50a500cb3b7c976a045df06de01ca42c942e1a2c43ac27d96bfa7ece3138a9960405160405180910390a2600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b600960009054906101000a900460ff1681565b600380600481111561117657fe5b600960009054906101000a900460ff16600481111561119157fe5b14151561119d57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561122357600080fd5b505af1158015611237573d6000803e3d6000fd5b505050506040513d602081101561124d57600080fd5b8101908080519060200190929190505050151561126957600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166343d726d66040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156112ef57600080fd5b505af1158015611303573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663476343ee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561138d57600080fd5b505af11580156113a1573d6000803e3d6000fd5b505050506040513d60208110156113b757600080fd5b810190808051906020019092919050505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad0b2bec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561144f57600080fd5b505af1158015611463573d6000803e3d6000fd5b505050506040513d602081101561147957600080fd5b810190808051906020019092919050505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561151157600080fd5b505af1158015611525573d6000803e3d6000fd5b505050506040513d602081101561153b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156115e657600080fd5b505af11580156115fa573d6000803e3d6000fd5b505050506040513d602081101561161057600080fd5b81019080805190602001909291905050506007819055506004600960006101000a81548160ff0219169083600481111561164657fe5b02179055507fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0760405160405180910390a150565b6000806000600481111561168a57fe5b600960009054906101000a900460ff1660048111156116a557fe5b1480156116b3575042600654105b156116dd576002600960006101000a81548160ff021916908360048111156116d757fe5b02179055505b60008060048111156116eb57fe5b600960009054906101000a900460ff16600481111561170657fe5b14151561171257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561179857600080fd5b505af11580156117ac573d6000803e3d6000fd5b505050506040513d60208110156117c257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561186d57600080fd5b505af1158015611881573d6000803e3d6000fd5b505050506040513d602081101561189757600080fd5b810190808051906020019092919050505092506118bf83600554611c4090919063ffffffff16565b9150838210156118cd578193505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561195357600080fd5b505af1158015611967573d6000803e3d6000fd5b505050506040513d602081101561197d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611a6457600080fd5b505af1158015611a78573d6000803e3d6000fd5b505050506040513d6020811015611a8e57600080fd5b81019080805190602001909291905050501515611aaa57600080fd5b611afc84600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c5990919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081841415611b6c576001600960006101000a81548160ff02191690836004811115611b6657fe5b02179055505b3373ffffffffffffffffffffffffffffffffffffffff167f9e85601c404591b54325b6512021f8145643571c59865b7ab29ed9e0664cb17f856040518082815260200191505060405180910390a250505050565b60055481565b600460149054906101000a900462ffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f424081565b600080831415611c1b5760009050611c3a565b8183029050818382811515611c2c57fe5b04141515611c3657fe5b8090505b92915050565b6000828211151515611c4e57fe5b818303905092915050565b60008183019050828110151515611c6c57fe5b809050929150505600a165627a7a72305820daf57a5e7009eccd0a106ed96d446b77ccd8ad6a512fce5daf65aeced17de0910029","deployedBytecode":"0x6080604052600436106100f1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae7095146100f65780631f21f9af1461014d5780632129e25a146101a457806329dcb0cf146101cf57806342e94c90146101fa578063476343ee14610251578063590e1ae31461027c57806380f55605146102a7578063a619486e146102fe578063aea0e35f14610355578063c040e6b8146103ac578063c511ed5e146103e5578063ca1d209d146103fc578063cb4c86b714610429578063ddca3f4314610454578063e274fd2414610489578063fbde47f6146104e0575b600080fd5b34801561010257600080fd5b5061010b610515565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015957600080fd5b5061016261053b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101b057600080fd5b506101b9610561565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b506101e4610567565b6040518082815260200191505060405180910390f35b34801561020657600080fd5b5061023b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061056d565b6040518082815260200191505060405180910390f35b34801561025d57600080fd5b50610266610585565b6040518082815260200191505060405180910390f35b34801561028857600080fd5b5061029161085f565b6040518082815260200191505060405180910390f35b3480156102b357600080fd5b506102bc610b77565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561030a57600080fd5b50610313610b9d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036157600080fd5b5061036a610bc2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103b857600080fd5b506103c1611155565b604051808260048111156103d157fe5b60ff16815260200191505060405180910390f35b3480156103f157600080fd5b506103fa611168565b005b34801561040857600080fd5b506104276004803603810190808035906020019092919050505061167a565b005b34801561043557600080fd5b5061043e611bc0565b6040518082815260200191505060405180910390f35b34801561046057600080fd5b50610469611bc6565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561049557600080fd5b5061049e611bdb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104ec57600080fd5b506104f5611c01565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60065481565b60086020528060005260406000206000915090505481565b6000600480600481111561059557fe5b600960009054906101000a900460ff1660048111156105b057fe5b1415156105bc57600080fd5b600554610613600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600754611c0890919063ffffffff16565b81151561061c57fe5b0491506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156106ea57600080fd5b505af11580156106fe573d6000803e3d6000fd5b505050506040513d602081101561071457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156107c757600080fd5b505af11580156107db573d6000803e3d6000fd5b505050506040513d60208110156107f157600080fd5b8101908080519060200190929190505050151561080d57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167fee33a3a9cb48e4ff209f8b1c67c4632f1dbbf55aeff8e6f17d957ade7a6fb17c836040518082815260200191505060405180910390a25090565b600080600481111561086d57fe5b600960009054906101000a900460ff16600481111561088857fe5b148015610896575042600654105b156108c0576002600960006101000a81548160ff021916908360048111156108ba57fe5b02179055505b60028060048111156108ce57fe5b600960009054906101000a900460ff1660048111156108e957fe5b1415156108f557600080fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a0257600080fd5b505af1158015610a16573d6000803e3d6000fd5b505050506040513d6020811015610a2c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610adf57600080fd5b505af1158015610af3573d6000803e3d6000fd5b505050506040513d6020811015610b0957600080fd5b81019080805190602001909291905050501515610b2557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167fd53235e384e83b261994d71b101de6c22402415c0c0d313f064a90e91039e2a9836040518082815260200191505060405180910390a25090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806004811115610bd057fe5b600960009054906101000a900460ff166004811115610beb57fe5b148015610bf9575042600654105b15610c23576002600960006101000a81548160ff02191690836004811115610c1d57fe5b02179055505b6001806004811115610c3157fe5b600960009054906101000a900460ff166004811115610c4c57fe5b141515610c5857600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637abeb6a0600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460149054906101000a900462ffffff166040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff1662ffffff1681526020019350505050602060405180830381600087803b158015610db057600080fd5b505af1158015610dc4573d6000803e3d6000fd5b505050506040513d6020811015610dda57600080fd5b8101908080519060200190929190505050600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610eb157600080fd5b505af1158015610ec5573d6000803e3d6000fd5b505050506040513d6020811015610edb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166005546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b505050506040513d6020811015610fdc57600080fd5b81019080805190602001909291905050501515610ff857600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca1d209d6005546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561108b57600080fd5b505af115801561109f573d6000803e3d6000fd5b505050506003600960006101000a81548160ff021916908360048111156110c257fe5b0217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fd50a500cb3b7c976a045df06de01ca42c942e1a2c43ac27d96bfa7ece3138a9960405160405180910390a2600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b600960009054906101000a900460ff1681565b600380600481111561117657fe5b600960009054906101000a900460ff16600481111561119157fe5b14151561119d57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561122357600080fd5b505af1158015611237573d6000803e3d6000fd5b505050506040513d602081101561124d57600080fd5b8101908080519060200190929190505050151561126957600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166343d726d66040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156112ef57600080fd5b505af1158015611303573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663476343ee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561138d57600080fd5b505af11580156113a1573d6000803e3d6000fd5b505050506040513d60208110156113b757600080fd5b810190808051906020019092919050505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad0b2bec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561144f57600080fd5b505af1158015611463573d6000803e3d6000fd5b505050506040513d602081101561147957600080fd5b810190808051906020019092919050505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561151157600080fd5b505af1158015611525573d6000803e3d6000fd5b505050506040513d602081101561153b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156115e657600080fd5b505af11580156115fa573d6000803e3d6000fd5b505050506040513d602081101561161057600080fd5b81019080805190602001909291905050506007819055506004600960006101000a81548160ff0219169083600481111561164657fe5b02179055507fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0760405160405180910390a150565b6000806000600481111561168a57fe5b600960009054906101000a900460ff1660048111156116a557fe5b1480156116b3575042600654105b156116dd576002600960006101000a81548160ff021916908360048111156116d757fe5b02179055505b60008060048111156116eb57fe5b600960009054906101000a900460ff16600481111561170657fe5b14151561171257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561179857600080fd5b505af11580156117ac573d6000803e3d6000fd5b505050506040513d60208110156117c257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561186d57600080fd5b505af1158015611881573d6000803e3d6000fd5b505050506040513d602081101561189757600080fd5b810190808051906020019092919050505092506118bf83600554611c4090919063ffffffff16565b9150838210156118cd578193505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561195357600080fd5b505af1158015611967573d6000803e3d6000fd5b505050506040513d602081101561197d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611a6457600080fd5b505af1158015611a78573d6000803e3d6000fd5b505050506040513d6020811015611a8e57600080fd5b81019080805190602001909291905050501515611aaa57600080fd5b611afc84600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c5990919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081841415611b6c576001600960006101000a81548160ff02191690836004811115611b6657fe5b02179055505b3373ffffffffffffffffffffffffffffffffffffffff167f9e85601c404591b54325b6512021f8145643571c59865b7ab29ed9e0664cb17f856040518082815260200191505060405180910390a250505050565b60055481565b600460149054906101000a900462ffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f424081565b600080831415611c1b5760009050611c3a565b8183029050818382811515611c2c57fe5b04141515611c3657fe5b8090505b92915050565b6000828211151515611c4e57fe5b818303905092915050565b60008183019050828110151515611c6c57fe5b809050929150505600a165627a7a72305820daf57a5e7009eccd0a106ed96d446b77ccd8ad6a512fce5daf65aeced17de0910029","sourceMap":"2694:2889:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2694:2889:6;;;;;;;","deployedSourceMap":"2694:2889:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;699:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;699:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;747:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;747:30:6;;;;;;;;;;;;;;;;;;;;;;;;;;;883:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;883:24:6;;;;;;;;;;;;;;;;;;;;;;;857:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;857:20:6;;;;;;;;;;;;;;;;;;;;;;;913:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;913:46:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5193:388;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5193:388:6;;;;;;;;;;;;;;;;;;;;;;;3634:408;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3634:408:6;;;;;;;;;;;;;;;;;;;;;;;783:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;783:20:6;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;4141:423:6;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4141:423:6;;;;;;;;;;;;;;;;;;;;;;;;;;;965:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;965:19:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4676:409;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4676:409:6;;;;;;2921:640;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2921:640:6;;;;;;;;;;;;;;;;;;;;;;;;;;832:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:19:6;;;;;;;;;;;;;;;;;;;;;;;809:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;809:17:6;;;;;;;;;;;;;;;;;;;;;;;;;;;667:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;667:26:6;;;;;;;;;;;;;;;;;;;;;;;;;;;579:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;579:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;699;;;;;;;;;;;;;:::o;747:30::-;;;;;;;;;;;;;:::o;883:24::-;;;;:::o;857:20::-;;;;:::o;913:46::-;;;;;;;;;;;;;;;;;:::o;5193:388::-;5286:9;5248:19;1271:6;1262:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1254:24;;;;;;;;5364:7;;5318:43;5335:13;:25;5349:10;5335:25;;;;;;;;;;;;;;;;5318:12;;:16;;:43;;;;:::i;:::-;:53;;;;;;;;5311:60;;5409:1;5381:13;:25;5395:10;5381:25;;;;;;;;;;;;;;;:29;;;;5469:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5469:31:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5469:31:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5469:31:6;;;;;;;;;;;;;;;;:40;;;5510:10;5522:4;5469:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5469:58:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5469:58:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5469:58:6;;;;;;;;;;;;;;;;5461:67;;;;;;;;5557:10;5543:31;;;5569:4;5543:31;;;;;;;;;;;;;;;;;;5193:388;;:::o;3634:408::-;3747:17;1353:21;1344:30;;;;;;;;:5;;;;;;;;;;;:30;;;;;;;;;:48;;;;;1389:3;1378:8;;:14;1344:48;1340:94;;;1414:20;1406:5;;:28;;;;;;;;;;;;;;;;;;;;;;;;1340:94;3708:20;1271:6;1262:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1254:24;;;;;;;;3795:13;:25;3809:10;3795:25;;;;;;;;;;;;;;;;3780:40;;3858:1;3830:13;:25;3844:10;3830:25;;;;;;;;;;;;;;;:29;;;;3913:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3913:31:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3913:31:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3913:31:6;;;;;;;;;;;;;;;;:40;;;3954:10;3966:12;3913:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3913:66:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3913:66:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3913:66:6;;;;;;;;;;;;;;;;3905:75;;;;;;;;4010:10;3995:40;;;4022:12;3995:40;;;;;;;;;;;;;;;;;;1444:1;3634:408;:::o;783:20::-;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;4141:423:6:-;4264:6;1353:21;1344:30;;;;;;;;:5;;;;;;;;;;;:30;;;;;;;;;:48;;;;;1389:3;1378:8;;:14;1344:48;1340:94;;;1414:20;1406:5;;:28;;;;;;;;;;;;;;;;;;;;;;;;1340:94;4221:24;1271:6;1262:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1254:24;;;;;;;;4295:13;;;;;;;;;;;:26;;;4322:13;;;;;;;;;;;4337:11;;;;;;;;;;;4350:3;;;;;;;;;;;4295:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4295:59:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4295:59:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4295:59:6;;;;;;;;;;;;;;;;4286:6;;:68;;;;;;;;;;;;;;;;;;4372:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4372:31:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4372:31:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4372:31:6;;;;;;;;;;;;;;;;:39;;;4412:6;;;;;;;;;;;4420:7;;4372:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4372:56:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4372:56:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4372:56:6;;;;;;;;;;;;;;;;4364:65;;;;;;;;4439:6;;;;;;;;;;;:11;;;4451:7;;4439:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4439:20:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4439:20:6;;;;4477;4469:5;;:28;;;;;;;;;;;;;;;;;;;;;;;;4527:6;;;;;;;;;;;4512:22;;;;;;;;;;;;4551:6;;;;;;;;;;;4544:13;;1444:1;4141:423;:::o;965:19::-;;;;;;;;;;;;;:::o;4676:409::-;4730:20;1271:6;1262:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1254:24;;;;;;;;4815:13;;;;;;;;;;;:26;;;:28;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4815:28:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4815:28:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4815:28:6;;;;;;;;;;;;;;;;4807:37;;;;;;;;4854:6;;;;;;;;;;;:12;;;:14;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4854:14:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4854:14:6;;;;4878:6;;;;;;;;;;;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4878:21:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4878:21:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4878:21:6;;;;;;;;;;;;;;;;;4909:13;;;;;;;;;;;:28;;;:30;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4909:30:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4909:30:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4909:30:6;;;;;;;;;;;;;;;;;4964:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4964:31:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4964:31:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4964:31:6;;;;;;;;;;;;;;;;:41;;;5006:4;4964:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4964:47:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4964:47:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4964:47:6;;;;;;;;;;;;;;;;4949:12;:62;;;;5029:19;5021:5;;:27;;;;;;;;;;;;;;;;;;;;;;;;5063:15;;;;;;;;;;4676:409;:::o;2921:640::-;3041:17;3118:14;1353:21;1344:30;;;;;;;;:5;;;;;;;;;;;:30;;;;;;;;;:48;;;;;1389:3;1378:8;;:14;1344:48;1340:94;;;1414:20;1406:5;;:28;;;;;;;;;;;;;;;;;;;;;;;;1340:94;3004:21;1271:6;1262:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1254:24;;;;;;;;3061:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3061:31:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3061:31:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3061:31:6;;;;;;;;;;;;;;;;:41;;;3103:4;3061:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3061:47:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3061:47:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3061:47:6;;;;;;;;;;;;;;;;3041:67;;3135:25;3147:12;3135:7;;:11;;:25;;;;:::i;:::-;3118:42;;3186:6;3174:9;:18;3170:54;;;3215:9;3206:18;;3170:54;3279:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3279:31:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3279:31:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3279:31:6;;;;;;;;;;;;;;;;:44;;;3324:10;3336:4;3342:6;3279:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3279:70:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3279:70:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3279:70:6;;;;;;;;;;;;;;;;3271:79;;;;;;;;3388:37;3418:6;3388:13;:25;3402:10;3388:25;;;;;;;;;;;;;;;;:29;;:37;;;;:::i;:::-;3360:13;:25;3374:10;3360:25;;;;;;;;;;;;;;;:65;;;;3449:9;3439:6;:19;3435:69;;;3480:24;3472:5;;:32;;;;;;;;;;;;;;;;;;;;;;;;3435:69;3535:10;3519:35;;;3547:6;3519:35;;;;;;;;;;;;;;;;;;1444:1;2921:640;;;:::o;832:19::-;;;;:::o;809:17::-;;;;;;;;;;;;;:::o;667:26::-;;;;;;;;;;;;;:::o;579:42::-;614:7;579:42;:::o;273:373:31:-;331:9;562:1;557;:6;553:35;;;580:1;573:8;;;;553:35;602:1;598;:5;594:9;;625:1;620;616;:5;;;;;;;;:10;609:18;;;;;;640:1;633:8;;273:373;;;;;:::o;1968:110::-;2026:7;2053:1;2048;:6;;2041:14;;;;;;2072:1;2068;:5;2061:12;;1968:110;;;;:::o;2363:123::-;2421:9;2446:1;2442;:5;2438:9;;2465:1;2460;:6;;2453:14;;;;;;2480:1;2473:8;;2363:123;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Events/Event.sol\";\nimport \"../Markets/StandardMarketFactory.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\ncontract CampaignData {\n\n /*\n * Events\n */\n event CampaignFunding(address indexed sender, uint funding);\n event CampaignRefund(address indexed sender, uint refund);\n event MarketCreation(Market indexed market);\n event MarketClosing();\n event FeeWithdrawal(address indexed receiver, uint fees);\n\n /*\n * Constants\n */\n uint24 public constant FEE_RANGE = 1000000; // 100%\n\n /*\n * Storage\n */\n Event public eventContract;\n StandardMarketFactory public marketFactory;\n MarketMaker public marketMaker;\n Market public market;\n uint24 public fee;\n uint public funding;\n uint public deadline;\n uint public finalBalance;\n mapping (address => uint) public contributions;\n Stages public stage;\n\n enum Stages {\n AuctionStarted,\n AuctionSuccessful,\n AuctionFailed,\n MarketCreated,\n MarketClosed\n }\n\n /*\n * Modifiers\n */\n modifier atStage(Stages _stage) {\n // Contract has to be in given stage\n require(stage == _stage);\n _;\n }\n\n modifier timedTransitions() {\n if (stage == Stages.AuctionStarted && deadline < now)\n stage = Stages.AuctionFailed;\n _;\n }\n}\n\ncontract CampaignProxy is Proxy, CampaignData {\n /// @dev Constructor validates and sets campaign properties\n /// @param _eventContract Event contract\n /// @param _marketFactory Market factory contract\n /// @param _marketMaker Market maker contract\n /// @param _fee Market fee\n /// @param _funding Initial funding for market\n /// @param _deadline Campaign deadline\n constructor(\n address proxied,\n Event _eventContract,\n StandardMarketFactory _marketFactory,\n MarketMaker _marketMaker,\n uint24 _fee,\n uint _funding,\n uint _deadline\n )\n Proxy(proxied)\n public\n {\n // Validate input\n require( address(_eventContract) != 0\n && address(_marketFactory) != 0\n && address(_marketMaker) != 0\n && _fee < FEE_RANGE\n && _funding > 0\n && now < _deadline);\n eventContract = _eventContract;\n marketFactory = _marketFactory;\n marketMaker = _marketMaker;\n fee = _fee;\n funding = _funding;\n deadline = _deadline;\n }\n}\n\n/// @title Campaign contract - Allows to crowdfund a market\n/// @author Stefan George - \ncontract Campaign is Proxied, CampaignData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Allows to contribute to required market funding\n /// @param amount Amount of collateral tokens\n function fund(uint amount)\n public\n timedTransitions\n atStage(Stages.AuctionStarted)\n {\n uint raisedAmount = eventContract.collateralToken().balanceOf(this);\n uint maxAmount = funding.sub(raisedAmount);\n if (maxAmount < amount)\n amount = maxAmount;\n // Collect collateral tokens\n require(eventContract.collateralToken().transferFrom(msg.sender, this, amount));\n contributions[msg.sender] = contributions[msg.sender].add(amount);\n if (amount == maxAmount)\n stage = Stages.AuctionSuccessful;\n emit CampaignFunding(msg.sender, amount);\n }\n\n /// @dev Withdraws refund amount\n /// @return Refund amount\n function refund()\n public\n timedTransitions\n atStage(Stages.AuctionFailed)\n returns (uint refundAmount)\n {\n refundAmount = contributions[msg.sender];\n contributions[msg.sender] = 0;\n // Refund collateral tokens\n require(eventContract.collateralToken().transfer(msg.sender, refundAmount));\n emit CampaignRefund(msg.sender, refundAmount);\n }\n\n /// @dev Allows to create market after successful funding\n /// @return Market address\n function createMarket()\n public\n timedTransitions\n atStage(Stages.AuctionSuccessful)\n returns (Market)\n {\n market = marketFactory.createMarket(eventContract, marketMaker, fee);\n require(eventContract.collateralToken().approve(market, funding));\n market.fund(funding);\n stage = Stages.MarketCreated;\n emit MarketCreation(market);\n return market;\n }\n\n /// @dev Allows to withdraw fees from market contract to campaign contract\n /// @return Fee amount\n function closeMarket()\n public\n atStage(Stages.MarketCreated)\n {\n // Winning outcome should be set\n require(eventContract.isOutcomeSet());\n market.close();\n market.withdrawFees();\n eventContract.redeemWinnings();\n finalBalance = eventContract.collateralToken().balanceOf(this);\n stage = Stages.MarketClosed;\n emit MarketClosing();\n }\n\n /// @dev Allows to withdraw fees from campaign contract to contributor\n /// @return Fee amount\n function withdrawFees()\n public\n atStage(Stages.MarketClosed)\n returns (uint fees)\n {\n fees = finalBalance.mul(contributions[msg.sender]) / funding;\n contributions[msg.sender] = 0;\n // Send fee share to contributor\n require(eventContract.collateralToken().transfer(msg.sender, fees));\n emit FeeWithdrawal(msg.sender, fees);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","exportedSymbols":{"Campaign":[2011],"CampaignData":[1663],"CampaignProxy":[1745]},"id":2012,"nodeType":"SourceUnit","nodes":[{"id":1573,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:6"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":1574,"nodeType":"ImportDirective","scope":2012,"sourceUnit":385,"src":"25:29:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","file":"../Markets/StandardMarketFactory.sol","id":1575,"nodeType":"ImportDirective","scope":2012,"sourceUnit":3176,"src":"55:46:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":1576,"nodeType":"ImportDirective","scope":2012,"sourceUnit":7190,"src":"102:59:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":1577,"nodeType":"ImportDirective","scope":2012,"sourceUnit":6702,"src":"162:55:6","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1663,"linearizedBaseContracts":[1663],"name":"CampaignData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":1583,"name":"CampaignFunding","nodeType":"EventDefinition","parameters":{"id":1582,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1579,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1583,"src":"300:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1578,"name":"address","nodeType":"ElementaryTypeName","src":"300:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1581,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":1583,"src":"324:12:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1580,"name":"uint","nodeType":"ElementaryTypeName","src":"324:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:38:6"},"src":"278:60:6"},{"anonymous":false,"documentation":null,"id":1589,"name":"CampaignRefund","nodeType":"EventDefinition","parameters":{"id":1588,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1585,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1589,"src":"364:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1584,"name":"address","nodeType":"ElementaryTypeName","src":"364:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1587,"indexed":false,"name":"refund","nodeType":"VariableDeclaration","scope":1589,"src":"388:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1586,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"363:37:6"},"src":"343:58:6"},{"anonymous":false,"documentation":null,"id":1593,"name":"MarketCreation","nodeType":"EventDefinition","parameters":{"id":1592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1591,"indexed":true,"name":"market","nodeType":"VariableDeclaration","scope":1593,"src":"427:21:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1590,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"427:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"426:23:6"},"src":"406:44:6"},{"anonymous":false,"documentation":null,"id":1595,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":1594,"nodeType":"ParameterList","parameters":[],"src":"474:2:6"},"src":"455:22:6"},{"anonymous":false,"documentation":null,"id":1601,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":1600,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1597,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":1601,"src":"502:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1596,"name":"address","nodeType":"ElementaryTypeName","src":"502:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1599,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":1601,"src":"528:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1598,"name":"uint","nodeType":"ElementaryTypeName","src":"528:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"501:37:6"},"src":"482:57:6"},{"constant":true,"id":1604,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":1663,"src":"579:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1602,"name":"uint24","nodeType":"ElementaryTypeName","src":"579:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":1603,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"614:7:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":1606,"name":"eventContract","nodeType":"VariableDeclaration","scope":1663,"src":"667:26:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1605,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"667:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":1608,"name":"marketFactory","nodeType":"VariableDeclaration","scope":1663,"src":"699:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1607,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"699:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"public"},{"constant":false,"id":1610,"name":"marketMaker","nodeType":"VariableDeclaration","scope":1663,"src":"747:30:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1609,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"747:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":1612,"name":"market","nodeType":"VariableDeclaration","scope":1663,"src":"783:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1611,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"783:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"public"},{"constant":false,"id":1614,"name":"fee","nodeType":"VariableDeclaration","scope":1663,"src":"809:17:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1613,"name":"uint24","nodeType":"ElementaryTypeName","src":"809:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":1616,"name":"funding","nodeType":"VariableDeclaration","scope":1663,"src":"832:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1615,"name":"uint","nodeType":"ElementaryTypeName","src":"832:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1618,"name":"deadline","nodeType":"VariableDeclaration","scope":1663,"src":"857:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1617,"name":"uint","nodeType":"ElementaryTypeName","src":"857:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1620,"name":"finalBalance","nodeType":"VariableDeclaration","scope":1663,"src":"883:24:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1619,"name":"uint","nodeType":"ElementaryTypeName","src":"883:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1624,"name":"contributions","nodeType":"VariableDeclaration","scope":1663,"src":"913:46:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":1623,"keyType":{"id":1621,"name":"address","nodeType":"ElementaryTypeName","src":"922:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"913:25:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":1622,"name":"uint","nodeType":"ElementaryTypeName","src":"933:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":1626,"name":"stage","nodeType":"VariableDeclaration","scope":1663,"src":"965:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1625,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"965:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"CampaignData.Stages","id":1632,"members":[{"id":1627,"name":"AuctionStarted","nodeType":"EnumValue","src":"1013:14:6"},{"id":1628,"name":"AuctionSuccessful","nodeType":"EnumValue","src":"1037:17:6"},{"id":1629,"name":"AuctionFailed","nodeType":"EnumValue","src":"1064:13:6"},{"id":1630,"name":"MarketCreated","nodeType":"EnumValue","src":"1087:13:6"},{"id":1631,"name":"MarketClosed","nodeType":"EnumValue","src":"1110:12:6"}],"name":"Stages","nodeType":"EnumDefinition","src":"991:137:6"},{"body":{"id":1643,"nodeType":"Block","src":"1199:97:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1637,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1262:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1638,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1634,"src":"1271:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1262:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1636,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1254:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1640,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1254:24:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1641,"nodeType":"ExpressionStatement","src":"1254:24:6"},{"id":1642,"nodeType":"PlaceholderStatement","src":"1288:1:6"}]},"documentation":null,"id":1644,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":1635,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1634,"name":"_stage","nodeType":"VariableDeclaration","scope":1644,"src":"1184:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1633,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"1184:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"internal"}],"src":"1183:15:6"},"src":"1167:129:6","visibility":"internal"},{"body":{"id":1661,"nodeType":"Block","src":"1330:122:6","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1653,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1646,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1344:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1647,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1353:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1648,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1353:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1344:30:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1652,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1650,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"1378:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1651,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1389:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1378:14:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1344:48:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1659,"nodeType":"IfStatement","src":"1340:94:6","trueBody":{"expression":{"argumentTypes":null,"id":1657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1654,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1406:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1655,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1414:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1414:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1406:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1658,"nodeType":"ExpressionStatement","src":"1406:28:6"}},{"id":1660,"nodeType":"PlaceholderStatement","src":"1444:1:6"}]},"documentation":null,"id":1662,"name":"timedTransitions","nodeType":"ModifierDefinition","parameters":{"id":1645,"nodeType":"ParameterList","parameters":[],"src":"1327:2:6"},"src":"1302:150:6","visibility":"internal"}],"scope":2012,"src":"219:1235:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1664,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1482:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":1665,"nodeType":"InheritanceSpecifier","src":"1482:5:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1666,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"1489:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1667,"nodeType":"InheritanceSpecifier","src":"1489:12:6"}],"contractDependencies":[1663,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1745,"linearizedBaseContracts":[1745,1663,6701,6673],"name":"CampaignProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":1743,"nodeType":"Block","src":"2109:474:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1716,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1708,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1704,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1698,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1689,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2164:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":1688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2156:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1690,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2156:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1691,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2183:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2156:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1697,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1694,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2212:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}],"id":1693,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2204:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1695,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2204:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1696,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2231:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2204:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:76:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1703,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1700,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2260:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":1699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2252:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1701,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2252:21:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1702,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2277:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2252:26:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:122:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":1707,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1705,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2298:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1706,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1604,"src":"2305:9:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2298:16:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:158:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1711,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1709,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2334:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1710,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2345:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2334:12:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:190:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1713,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"2366:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1714,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2372:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2366:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:225:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1687,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2145:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1717,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2145:237:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1718,"nodeType":"ExpressionStatement","src":"2145:237:6"},{"expression":{"argumentTypes":null,"id":1721,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"2392:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1720,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2408:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"2392:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1722,"nodeType":"ExpressionStatement","src":"2392:30:6"},{"expression":{"argumentTypes":null,"id":1725,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1723,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"2432:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1724,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2448:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"src":"2432:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1726,"nodeType":"ExpressionStatement","src":"2432:30:6"},{"expression":{"argumentTypes":null,"id":1729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1727,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"2472:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1728,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2486:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"2472:26:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":1730,"nodeType":"ExpressionStatement","src":"2472:26:6"},{"expression":{"argumentTypes":null,"id":1733,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1731,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"2508:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1732,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2514:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2508:10:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":1734,"nodeType":"ExpressionStatement","src":"2508:10:6"},{"expression":{"argumentTypes":null,"id":1737,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1735,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"2528:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1736,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2538:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2528:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1738,"nodeType":"ExpressionStatement","src":"2528:18:6"},{"expression":{"argumentTypes":null,"id":1741,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1739,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"2556:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1740,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2567:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2556:20:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1742,"nodeType":"ExpressionStatement","src":"2556:20:6"}]},"documentation":"@dev Constructor validates and sets campaign properties\n @param _eventContract Event contract\n @param _marketFactory Market factory contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _funding Initial funding for market\n @param _deadline Campaign deadline","id":1744,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":1684,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1669,"src":"2081:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":1685,"modifierName":{"argumentTypes":null,"id":1683,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2075:5:6","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2075:14:6"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":1682,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1669,"name":"proxied","nodeType":"VariableDeclaration","scope":1744,"src":"1867:15:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1668,"name":"address","nodeType":"ElementaryTypeName","src":"1867:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1671,"name":"_eventContract","nodeType":"VariableDeclaration","scope":1744,"src":"1892:20:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1670,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1892:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":1673,"name":"_marketFactory","nodeType":"VariableDeclaration","scope":1744,"src":"1922:36:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1672,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"1922:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":1675,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":1744,"src":"1968:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1674,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1968:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":1677,"name":"_fee","nodeType":"VariableDeclaration","scope":1744,"src":"2002:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1676,"name":"uint24","nodeType":"ElementaryTypeName","src":"2002:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":1679,"name":"_funding","nodeType":"VariableDeclaration","scope":1744,"src":"2023:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1678,"name":"uint","nodeType":"ElementaryTypeName","src":"2023:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1681,"name":"_deadline","nodeType":"VariableDeclaration","scope":1744,"src":"2046:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1680,"name":"uint","nodeType":"ElementaryTypeName","src":"2046:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1857:209:6"},"payable":false,"returnParameters":{"id":1686,"nodeType":"ParameterList","parameters":[],"src":"2109:0:6"},"scope":1745,"src":"1846:737:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"1456:1129:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1746,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2715:7:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":1747,"nodeType":"InheritanceSpecifier","src":"2715:7:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1748,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"2724:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1749,"nodeType":"InheritanceSpecifier","src":"2724:12:6"}],"contractDependencies":[1663,6673],"contractKind":"contract","documentation":"@title Campaign contract - Allows to crowdfund a market\n @author Stefan George - ","fullyImplemented":true,"id":2011,"linearizedBaseContracts":[2011,1663,6673],"name":"Campaign","nodeType":"ContractDefinition","nodes":[{"id":1751,"libraryName":{"contractScope":null,"id":1750,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2749:8:6","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2743:21:6","typeName":null},{"body":{"id":1826,"nodeType":"Block","src":"3031:530:6","statements":[{"assignments":[1763],"declarations":[{"constant":false,"id":1763,"name":"raisedAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3041:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1762,"name":"uint","nodeType":"ElementaryTypeName","src":"3041:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1770,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1768,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3103:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1764,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3061:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1765,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3061:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1766,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"3061:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1769,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3041:67:6"},{"assignments":[1772],"declarations":[{"constant":false,"id":1772,"name":"maxAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3118:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1771,"name":"uint","nodeType":"ElementaryTypeName","src":"3118:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1777,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1775,"name":"raisedAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1763,"src":"3147:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1773,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"3135:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"3135:11:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1776,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3135:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3118:42:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1780,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1778,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3174:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1779,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3186:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3174:18:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1785,"nodeType":"IfStatement","src":"3170:54:6","trueBody":{"expression":{"argumentTypes":null,"id":1783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1781,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3206:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1782,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3215:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3206:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1784,"nodeType":"ExpressionStatement","src":"3206:18:6"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1791,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3324:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3324:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1793,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3336:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":1794,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3342:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1787,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3279:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1788,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3279:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1789,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3279:44:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":1795,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:70:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1786,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3271:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3271:79:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1797,"nodeType":"ExpressionStatement","src":"3271:79:6"},{"expression":{"argumentTypes":null,"id":1809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1798,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3360:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1801,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1799,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3374:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1800,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3374:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3360:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1807,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3418:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1802,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3388:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1805,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1803,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3402:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3402:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3388:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"3388:29:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1808,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3388:37:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3360:65:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1810,"nodeType":"ExpressionStatement","src":"3360:65:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1811,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3439:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1812,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3449:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:19:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1819,"nodeType":"IfStatement","src":"3435:69:6","trueBody":{"expression":{"argumentTypes":null,"id":1817,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1814,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"3472:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1815,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3480:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1816,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3480:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"3472:32:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1818,"nodeType":"ExpressionStatement","src":"3472:32:6"}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1821,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3535:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1822,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3535:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1823,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3547:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1820,"name":"CampaignFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1583,"src":"3519:15:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1824,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3519:35:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1825,"nodeType":"EmitStatement","src":"3514:40:6"}]},"documentation":"@dev Allows to contribute to required market funding\n @param amount Amount of collateral tokens","id":1827,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1756,"modifierName":{"argumentTypes":null,"id":1755,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"2971:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2971:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1758,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3004:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1759,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3004:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1760,"modifierName":{"argumentTypes":null,"id":1757,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"2996:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"2996:30:6"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":1754,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1753,"name":"amount","nodeType":"VariableDeclaration","scope":1827,"src":"2935:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1752,"name":"uint","nodeType":"ElementaryTypeName","src":"2935:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2934:13:6"},"payable":false,"returnParameters":{"id":1761,"nodeType":"ParameterList","parameters":[],"src":"3031:0:6"},"scope":2011,"src":"2921:640:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1869,"nodeType":"Block","src":"3770:272:6","statements":[{"expression":{"argumentTypes":null,"id":1843,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1838,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3780:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1839,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3795:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1842,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1840,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3809:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1841,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3809:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3795:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3780:40:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1844,"nodeType":"ExpressionStatement","src":"3780:40:6"},{"expression":{"argumentTypes":null,"id":1850,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1845,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3830:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1848,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1846,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3844:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3844:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3830:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1849,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3858:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3830:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1851,"nodeType":"ExpressionStatement","src":"3830:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1857,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3954:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3954:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1859,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3966:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1853,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3913:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1854,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3913:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1855,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3913:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1860,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:66:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1852,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3905:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1861,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3905:75:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1862,"nodeType":"ExpressionStatement","src":"3905:75:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1864,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4010:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1865,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4010:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1866,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"4022:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1863,"name":"CampaignRefund","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1589,"src":"3995:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3995:40:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1868,"nodeType":"EmitStatement","src":"3990:45:6"}]},"documentation":"@dev Withdraws refund amount\n @return Refund amount","id":1870,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1830,"modifierName":{"argumentTypes":null,"id":1829,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"3675:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3675:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1832,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3708:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1833,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3708:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1834,"modifierName":{"argumentTypes":null,"id":1831,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"3700:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"3700:29:6"}],"name":"refund","nodeType":"FunctionDefinition","parameters":{"id":1828,"nodeType":"ParameterList","parameters":[],"src":"3649:2:6"},"payable":false,"returnParameters":{"id":1837,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1836,"name":"refundAmount","nodeType":"VariableDeclaration","scope":1870,"src":"3747:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1835,"name":"uint","nodeType":"ElementaryTypeName","src":"3747:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3746:19:6"},"scope":2011,"src":"3634:408:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1917,"nodeType":"Block","src":"4276:288:6","statements":[{"expression":{"argumentTypes":null,"id":1888,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1881,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4286:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1884,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4322:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":1885,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"4337:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":1886,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"4350:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"expression":{"argumentTypes":null,"id":1882,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"4295:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1883,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3174,"src":"4295:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$_t_contract$_StandardMarket_$3112_$","typeString":"function (contract Event,contract MarketMaker,uint24) external returns (contract StandardMarket)"}},"id":1887,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4295:59:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"4286:68:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1889,"nodeType":"ExpressionStatement","src":"4286:68:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1895,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4412:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":1896,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4420:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1891,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4372:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1892,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4372:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1893,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"4372:39:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1897,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:56:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1890,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4364:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1898,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4364:65:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1899,"nodeType":"ExpressionStatement","src":"4364:65:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1903,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4451:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1900,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4439:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1902,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"4439:11:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":1904,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4439:20:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1905,"nodeType":"ExpressionStatement","src":"4439:20:6"},{"expression":{"argumentTypes":null,"id":1909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1906,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"4469:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1907,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4477:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1908,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4477:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"4469:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1910,"nodeType":"ExpressionStatement","src":"4469:28:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1912,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4527:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1911,"name":"MarketCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1593,"src":"4512:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_Market_$2238_$returns$__$","typeString":"function (contract Market)"}},"id":1913,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4512:22:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1914,"nodeType":"EmitStatement","src":"4507:27:6"},{"expression":{"argumentTypes":null,"id":1915,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4551:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"functionReturnParameters":1880,"id":1916,"nodeType":"Return","src":"4544:13:6"}]},"documentation":"@dev Allows to create market after successful funding\n @return Market address","id":1918,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1873,"modifierName":{"argumentTypes":null,"id":1872,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"4188:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4188:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1875,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4221:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1876,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4221:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1877,"modifierName":{"argumentTypes":null,"id":1874,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4213:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4213:33:6"}],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":1871,"nodeType":"ParameterList","parameters":[],"src":"4162:2:6"},"payable":false,"returnParameters":{"id":1880,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1879,"name":"","nodeType":"VariableDeclaration","scope":1918,"src":"4264:6:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1878,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4264:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"4263:8:6"},"scope":2011,"src":"4141:423:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1963,"nodeType":"Block","src":"4756:329:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1926,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4815:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4815:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":1928,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4815:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1925,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4807:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1929,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4807:37:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1930,"nodeType":"ExpressionStatement","src":"4807:37:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1931,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4854:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1933,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4854:12:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":1934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4854:14:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1935,"nodeType":"ExpressionStatement","src":"4854:14:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1936,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4878:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4878:19:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1939,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4878:21:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1940,"nodeType":"ExpressionStatement","src":"4878:21:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1941,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4909:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4909:28:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1944,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4909:30:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1945,"nodeType":"ExpressionStatement","src":"4909:30:6"},{"expression":{"argumentTypes":null,"id":1953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1946,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"4949:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1951,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"5006:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1947,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4964:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4964:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1949,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1950,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4964:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1952,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4949:62:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1954,"nodeType":"ExpressionStatement","src":"4949:62:6"},{"expression":{"argumentTypes":null,"id":1958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1955,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"5021:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1956,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5029:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1957,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5029:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"5021:27:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1959,"nodeType":"ExpressionStatement","src":"5021:27:6"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":1960,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1595,"src":"5063:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":1961,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5063:15:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1962,"nodeType":"EmitStatement","src":"5058:20:6"}]},"documentation":"@dev Allows to withdraw fees from market contract to campaign contract\n @return Fee amount","id":1964,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1921,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4730:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1922,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4730:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1923,"modifierName":{"argumentTypes":null,"id":1920,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4722:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4722:29:6"}],"name":"closeMarket","nodeType":"FunctionDefinition","parameters":{"id":1919,"nodeType":"ParameterList","parameters":[],"src":"4696:2:6"},"payable":false,"returnParameters":{"id":1924,"nodeType":"ParameterList","parameters":[],"src":"4756:0:6"},"scope":2011,"src":"4676:409:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":2009,"nodeType":"Block","src":"5301:280:6","statements":[{"expression":{"argumentTypes":null,"id":1983,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1973,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5311:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1976,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5335:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1979,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1977,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5349:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5349:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5335:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1974,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"5318:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1975,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5318:16:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1980,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5318:43:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1981,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"5364:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5318:53:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5311:60:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1984,"nodeType":"ExpressionStatement","src":"5311:60:6"},{"expression":{"argumentTypes":null,"id":1990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1985,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5381:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1988,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1986,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5395:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1987,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5395:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5381:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1989,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5409:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5381:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1991,"nodeType":"ExpressionStatement","src":"5381:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1997,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5510:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1998,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5510:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1999,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5522:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1993,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"5469:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1994,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"5469:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1996,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5469:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2000,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:58:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1992,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5461:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2001,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5461:67:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2002,"nodeType":"ExpressionStatement","src":"5461:67:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2004,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5557:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5557:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2006,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5569:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2003,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1601,"src":"5543:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":2007,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:31:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2008,"nodeType":"EmitStatement","src":"5538:36:6"}]},"documentation":"@dev Allows to withdraw fees from campaign contract to contributor\n @return Fee amount","id":2010,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1967,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5248:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1968,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5248:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1969,"modifierName":{"argumentTypes":null,"id":1966,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"5240:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"5240:28:6"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":1965,"nodeType":"ParameterList","parameters":[],"src":"5214:2:6"},"payable":false,"returnParameters":{"id":1972,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1971,"name":"fees","nodeType":"VariableDeclaration","scope":2010,"src":"5286:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1970,"name":"uint","nodeType":"ElementaryTypeName","src":"5286:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5285:11:6"},"scope":2011,"src":"5193:388:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"2694:2889:6"}],"src":"0:5584:6"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","exportedSymbols":{"Campaign":[2011],"CampaignData":[1663],"CampaignProxy":[1745]},"id":2012,"nodeType":"SourceUnit","nodes":[{"id":1573,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:6"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":1574,"nodeType":"ImportDirective","scope":2012,"sourceUnit":385,"src":"25:29:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","file":"../Markets/StandardMarketFactory.sol","id":1575,"nodeType":"ImportDirective","scope":2012,"sourceUnit":3176,"src":"55:46:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":1576,"nodeType":"ImportDirective","scope":2012,"sourceUnit":7190,"src":"102:59:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":1577,"nodeType":"ImportDirective","scope":2012,"sourceUnit":6702,"src":"162:55:6","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1663,"linearizedBaseContracts":[1663],"name":"CampaignData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":1583,"name":"CampaignFunding","nodeType":"EventDefinition","parameters":{"id":1582,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1579,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1583,"src":"300:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1578,"name":"address","nodeType":"ElementaryTypeName","src":"300:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1581,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":1583,"src":"324:12:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1580,"name":"uint","nodeType":"ElementaryTypeName","src":"324:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:38:6"},"src":"278:60:6"},{"anonymous":false,"documentation":null,"id":1589,"name":"CampaignRefund","nodeType":"EventDefinition","parameters":{"id":1588,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1585,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1589,"src":"364:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1584,"name":"address","nodeType":"ElementaryTypeName","src":"364:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1587,"indexed":false,"name":"refund","nodeType":"VariableDeclaration","scope":1589,"src":"388:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1586,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"363:37:6"},"src":"343:58:6"},{"anonymous":false,"documentation":null,"id":1593,"name":"MarketCreation","nodeType":"EventDefinition","parameters":{"id":1592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1591,"indexed":true,"name":"market","nodeType":"VariableDeclaration","scope":1593,"src":"427:21:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1590,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"427:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"426:23:6"},"src":"406:44:6"},{"anonymous":false,"documentation":null,"id":1595,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":1594,"nodeType":"ParameterList","parameters":[],"src":"474:2:6"},"src":"455:22:6"},{"anonymous":false,"documentation":null,"id":1601,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":1600,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1597,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":1601,"src":"502:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1596,"name":"address","nodeType":"ElementaryTypeName","src":"502:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1599,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":1601,"src":"528:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1598,"name":"uint","nodeType":"ElementaryTypeName","src":"528:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"501:37:6"},"src":"482:57:6"},{"constant":true,"id":1604,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":1663,"src":"579:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1602,"name":"uint24","nodeType":"ElementaryTypeName","src":"579:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":1603,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"614:7:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":1606,"name":"eventContract","nodeType":"VariableDeclaration","scope":1663,"src":"667:26:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1605,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"667:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":1608,"name":"marketFactory","nodeType":"VariableDeclaration","scope":1663,"src":"699:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1607,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"699:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"public"},{"constant":false,"id":1610,"name":"marketMaker","nodeType":"VariableDeclaration","scope":1663,"src":"747:30:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1609,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"747:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":1612,"name":"market","nodeType":"VariableDeclaration","scope":1663,"src":"783:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1611,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"783:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"public"},{"constant":false,"id":1614,"name":"fee","nodeType":"VariableDeclaration","scope":1663,"src":"809:17:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1613,"name":"uint24","nodeType":"ElementaryTypeName","src":"809:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":1616,"name":"funding","nodeType":"VariableDeclaration","scope":1663,"src":"832:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1615,"name":"uint","nodeType":"ElementaryTypeName","src":"832:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1618,"name":"deadline","nodeType":"VariableDeclaration","scope":1663,"src":"857:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1617,"name":"uint","nodeType":"ElementaryTypeName","src":"857:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1620,"name":"finalBalance","nodeType":"VariableDeclaration","scope":1663,"src":"883:24:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1619,"name":"uint","nodeType":"ElementaryTypeName","src":"883:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1624,"name":"contributions","nodeType":"VariableDeclaration","scope":1663,"src":"913:46:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":1623,"keyType":{"id":1621,"name":"address","nodeType":"ElementaryTypeName","src":"922:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"913:25:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":1622,"name":"uint","nodeType":"ElementaryTypeName","src":"933:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":1626,"name":"stage","nodeType":"VariableDeclaration","scope":1663,"src":"965:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1625,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"965:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"CampaignData.Stages","id":1632,"members":[{"id":1627,"name":"AuctionStarted","nodeType":"EnumValue","src":"1013:14:6"},{"id":1628,"name":"AuctionSuccessful","nodeType":"EnumValue","src":"1037:17:6"},{"id":1629,"name":"AuctionFailed","nodeType":"EnumValue","src":"1064:13:6"},{"id":1630,"name":"MarketCreated","nodeType":"EnumValue","src":"1087:13:6"},{"id":1631,"name":"MarketClosed","nodeType":"EnumValue","src":"1110:12:6"}],"name":"Stages","nodeType":"EnumDefinition","src":"991:137:6"},{"body":{"id":1643,"nodeType":"Block","src":"1199:97:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1637,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1262:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1638,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1634,"src":"1271:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1262:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1636,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1254:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1640,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1254:24:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1641,"nodeType":"ExpressionStatement","src":"1254:24:6"},{"id":1642,"nodeType":"PlaceholderStatement","src":"1288:1:6"}]},"documentation":null,"id":1644,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":1635,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1634,"name":"_stage","nodeType":"VariableDeclaration","scope":1644,"src":"1184:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1633,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"1184:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"internal"}],"src":"1183:15:6"},"src":"1167:129:6","visibility":"internal"},{"body":{"id":1661,"nodeType":"Block","src":"1330:122:6","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1653,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1646,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1344:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1647,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1353:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1648,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1353:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1344:30:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1652,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1650,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"1378:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1651,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1389:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1378:14:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1344:48:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1659,"nodeType":"IfStatement","src":"1340:94:6","trueBody":{"expression":{"argumentTypes":null,"id":1657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1654,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1406:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1655,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1414:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1414:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1406:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1658,"nodeType":"ExpressionStatement","src":"1406:28:6"}},{"id":1660,"nodeType":"PlaceholderStatement","src":"1444:1:6"}]},"documentation":null,"id":1662,"name":"timedTransitions","nodeType":"ModifierDefinition","parameters":{"id":1645,"nodeType":"ParameterList","parameters":[],"src":"1327:2:6"},"src":"1302:150:6","visibility":"internal"}],"scope":2012,"src":"219:1235:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1664,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1482:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":1665,"nodeType":"InheritanceSpecifier","src":"1482:5:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1666,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"1489:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1667,"nodeType":"InheritanceSpecifier","src":"1489:12:6"}],"contractDependencies":[1663,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1745,"linearizedBaseContracts":[1745,1663,6701,6673],"name":"CampaignProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":1743,"nodeType":"Block","src":"2109:474:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1716,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1708,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1704,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1698,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1689,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2164:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":1688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2156:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1690,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2156:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1691,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2183:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2156:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1697,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1694,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2212:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}],"id":1693,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2204:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1695,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2204:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1696,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2231:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2204:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:76:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1703,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1700,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2260:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":1699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2252:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1701,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2252:21:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1702,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2277:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2252:26:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:122:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":1707,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1705,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2298:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1706,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1604,"src":"2305:9:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2298:16:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:158:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1711,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1709,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2334:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1710,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2345:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2334:12:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:190:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1713,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"2366:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1714,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2372:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2366:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:225:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1687,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2145:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1717,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2145:237:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1718,"nodeType":"ExpressionStatement","src":"2145:237:6"},{"expression":{"argumentTypes":null,"id":1721,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"2392:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1720,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2408:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"2392:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1722,"nodeType":"ExpressionStatement","src":"2392:30:6"},{"expression":{"argumentTypes":null,"id":1725,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1723,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"2432:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1724,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2448:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"src":"2432:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1726,"nodeType":"ExpressionStatement","src":"2432:30:6"},{"expression":{"argumentTypes":null,"id":1729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1727,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"2472:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1728,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2486:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"2472:26:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":1730,"nodeType":"ExpressionStatement","src":"2472:26:6"},{"expression":{"argumentTypes":null,"id":1733,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1731,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"2508:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1732,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2514:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2508:10:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":1734,"nodeType":"ExpressionStatement","src":"2508:10:6"},{"expression":{"argumentTypes":null,"id":1737,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1735,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"2528:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1736,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2538:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2528:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1738,"nodeType":"ExpressionStatement","src":"2528:18:6"},{"expression":{"argumentTypes":null,"id":1741,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1739,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"2556:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1740,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2567:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2556:20:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1742,"nodeType":"ExpressionStatement","src":"2556:20:6"}]},"documentation":"@dev Constructor validates and sets campaign properties\n @param _eventContract Event contract\n @param _marketFactory Market factory contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _funding Initial funding for market\n @param _deadline Campaign deadline","id":1744,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":1684,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1669,"src":"2081:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":1685,"modifierName":{"argumentTypes":null,"id":1683,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2075:5:6","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2075:14:6"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":1682,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1669,"name":"proxied","nodeType":"VariableDeclaration","scope":1744,"src":"1867:15:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1668,"name":"address","nodeType":"ElementaryTypeName","src":"1867:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1671,"name":"_eventContract","nodeType":"VariableDeclaration","scope":1744,"src":"1892:20:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1670,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1892:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":1673,"name":"_marketFactory","nodeType":"VariableDeclaration","scope":1744,"src":"1922:36:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1672,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"1922:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":1675,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":1744,"src":"1968:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1674,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1968:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":1677,"name":"_fee","nodeType":"VariableDeclaration","scope":1744,"src":"2002:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1676,"name":"uint24","nodeType":"ElementaryTypeName","src":"2002:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":1679,"name":"_funding","nodeType":"VariableDeclaration","scope":1744,"src":"2023:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1678,"name":"uint","nodeType":"ElementaryTypeName","src":"2023:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1681,"name":"_deadline","nodeType":"VariableDeclaration","scope":1744,"src":"2046:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1680,"name":"uint","nodeType":"ElementaryTypeName","src":"2046:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1857:209:6"},"payable":false,"returnParameters":{"id":1686,"nodeType":"ParameterList","parameters":[],"src":"2109:0:6"},"scope":1745,"src":"1846:737:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"1456:1129:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1746,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2715:7:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":1747,"nodeType":"InheritanceSpecifier","src":"2715:7:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1748,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"2724:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1749,"nodeType":"InheritanceSpecifier","src":"2724:12:6"}],"contractDependencies":[1663,6673],"contractKind":"contract","documentation":"@title Campaign contract - Allows to crowdfund a market\n @author Stefan George - ","fullyImplemented":true,"id":2011,"linearizedBaseContracts":[2011,1663,6673],"name":"Campaign","nodeType":"ContractDefinition","nodes":[{"id":1751,"libraryName":{"contractScope":null,"id":1750,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2749:8:6","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2743:21:6","typeName":null},{"body":{"id":1826,"nodeType":"Block","src":"3031:530:6","statements":[{"assignments":[1763],"declarations":[{"constant":false,"id":1763,"name":"raisedAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3041:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1762,"name":"uint","nodeType":"ElementaryTypeName","src":"3041:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1770,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1768,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3103:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1764,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3061:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1765,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3061:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1766,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"3061:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1769,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3041:67:6"},{"assignments":[1772],"declarations":[{"constant":false,"id":1772,"name":"maxAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3118:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1771,"name":"uint","nodeType":"ElementaryTypeName","src":"3118:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1777,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1775,"name":"raisedAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1763,"src":"3147:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1773,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"3135:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"3135:11:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1776,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3135:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3118:42:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1780,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1778,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3174:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1779,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3186:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3174:18:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1785,"nodeType":"IfStatement","src":"3170:54:6","trueBody":{"expression":{"argumentTypes":null,"id":1783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1781,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3206:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1782,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3215:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3206:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1784,"nodeType":"ExpressionStatement","src":"3206:18:6"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1791,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3324:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3324:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1793,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3336:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":1794,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3342:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1787,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3279:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1788,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3279:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1789,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3279:44:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":1795,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:70:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1786,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3271:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3271:79:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1797,"nodeType":"ExpressionStatement","src":"3271:79:6"},{"expression":{"argumentTypes":null,"id":1809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1798,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3360:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1801,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1799,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3374:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1800,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3374:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3360:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1807,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3418:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1802,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3388:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1805,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1803,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3402:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3402:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3388:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"3388:29:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1808,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3388:37:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3360:65:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1810,"nodeType":"ExpressionStatement","src":"3360:65:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1811,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3439:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1812,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3449:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:19:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1819,"nodeType":"IfStatement","src":"3435:69:6","trueBody":{"expression":{"argumentTypes":null,"id":1817,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1814,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"3472:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1815,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3480:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1816,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3480:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"3472:32:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1818,"nodeType":"ExpressionStatement","src":"3472:32:6"}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1821,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3535:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1822,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3535:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1823,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3547:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1820,"name":"CampaignFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1583,"src":"3519:15:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1824,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3519:35:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1825,"nodeType":"EmitStatement","src":"3514:40:6"}]},"documentation":"@dev Allows to contribute to required market funding\n @param amount Amount of collateral tokens","id":1827,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1756,"modifierName":{"argumentTypes":null,"id":1755,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"2971:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2971:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1758,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3004:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1759,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3004:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1760,"modifierName":{"argumentTypes":null,"id":1757,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"2996:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"2996:30:6"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":1754,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1753,"name":"amount","nodeType":"VariableDeclaration","scope":1827,"src":"2935:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1752,"name":"uint","nodeType":"ElementaryTypeName","src":"2935:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2934:13:6"},"payable":false,"returnParameters":{"id":1761,"nodeType":"ParameterList","parameters":[],"src":"3031:0:6"},"scope":2011,"src":"2921:640:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1869,"nodeType":"Block","src":"3770:272:6","statements":[{"expression":{"argumentTypes":null,"id":1843,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1838,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3780:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1839,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3795:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1842,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1840,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3809:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1841,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3809:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3795:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3780:40:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1844,"nodeType":"ExpressionStatement","src":"3780:40:6"},{"expression":{"argumentTypes":null,"id":1850,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1845,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3830:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1848,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1846,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3844:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3844:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3830:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1849,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3858:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3830:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1851,"nodeType":"ExpressionStatement","src":"3830:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1857,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3954:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3954:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1859,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3966:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1853,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3913:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1854,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3913:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1855,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3913:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1860,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:66:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1852,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3905:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1861,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3905:75:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1862,"nodeType":"ExpressionStatement","src":"3905:75:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1864,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4010:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1865,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4010:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1866,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"4022:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1863,"name":"CampaignRefund","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1589,"src":"3995:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3995:40:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1868,"nodeType":"EmitStatement","src":"3990:45:6"}]},"documentation":"@dev Withdraws refund amount\n @return Refund amount","id":1870,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1830,"modifierName":{"argumentTypes":null,"id":1829,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"3675:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3675:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1832,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3708:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1833,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3708:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1834,"modifierName":{"argumentTypes":null,"id":1831,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"3700:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"3700:29:6"}],"name":"refund","nodeType":"FunctionDefinition","parameters":{"id":1828,"nodeType":"ParameterList","parameters":[],"src":"3649:2:6"},"payable":false,"returnParameters":{"id":1837,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1836,"name":"refundAmount","nodeType":"VariableDeclaration","scope":1870,"src":"3747:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1835,"name":"uint","nodeType":"ElementaryTypeName","src":"3747:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3746:19:6"},"scope":2011,"src":"3634:408:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1917,"nodeType":"Block","src":"4276:288:6","statements":[{"expression":{"argumentTypes":null,"id":1888,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1881,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4286:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1884,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4322:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":1885,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"4337:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":1886,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"4350:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"expression":{"argumentTypes":null,"id":1882,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"4295:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1883,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3174,"src":"4295:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$_t_contract$_StandardMarket_$3112_$","typeString":"function (contract Event,contract MarketMaker,uint24) external returns (contract StandardMarket)"}},"id":1887,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4295:59:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"4286:68:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1889,"nodeType":"ExpressionStatement","src":"4286:68:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1895,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4412:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":1896,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4420:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1891,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4372:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1892,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4372:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1893,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"4372:39:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1897,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:56:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1890,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4364:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1898,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4364:65:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1899,"nodeType":"ExpressionStatement","src":"4364:65:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1903,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4451:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1900,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4439:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1902,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"4439:11:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":1904,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4439:20:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1905,"nodeType":"ExpressionStatement","src":"4439:20:6"},{"expression":{"argumentTypes":null,"id":1909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1906,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"4469:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1907,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4477:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1908,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4477:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"4469:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1910,"nodeType":"ExpressionStatement","src":"4469:28:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1912,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4527:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1911,"name":"MarketCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1593,"src":"4512:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_Market_$2238_$returns$__$","typeString":"function (contract Market)"}},"id":1913,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4512:22:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1914,"nodeType":"EmitStatement","src":"4507:27:6"},{"expression":{"argumentTypes":null,"id":1915,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4551:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"functionReturnParameters":1880,"id":1916,"nodeType":"Return","src":"4544:13:6"}]},"documentation":"@dev Allows to create market after successful funding\n @return Market address","id":1918,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1873,"modifierName":{"argumentTypes":null,"id":1872,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"4188:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4188:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1875,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4221:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1876,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4221:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1877,"modifierName":{"argumentTypes":null,"id":1874,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4213:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4213:33:6"}],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":1871,"nodeType":"ParameterList","parameters":[],"src":"4162:2:6"},"payable":false,"returnParameters":{"id":1880,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1879,"name":"","nodeType":"VariableDeclaration","scope":1918,"src":"4264:6:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1878,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4264:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"4263:8:6"},"scope":2011,"src":"4141:423:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1963,"nodeType":"Block","src":"4756:329:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1926,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4815:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4815:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":1928,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4815:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1925,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4807:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1929,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4807:37:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1930,"nodeType":"ExpressionStatement","src":"4807:37:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1931,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4854:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1933,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4854:12:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":1934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4854:14:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1935,"nodeType":"ExpressionStatement","src":"4854:14:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1936,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4878:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4878:19:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1939,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4878:21:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1940,"nodeType":"ExpressionStatement","src":"4878:21:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1941,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4909:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4909:28:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1944,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4909:30:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1945,"nodeType":"ExpressionStatement","src":"4909:30:6"},{"expression":{"argumentTypes":null,"id":1953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1946,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"4949:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1951,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"5006:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1947,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4964:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4964:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1949,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1950,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4964:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1952,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4949:62:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1954,"nodeType":"ExpressionStatement","src":"4949:62:6"},{"expression":{"argumentTypes":null,"id":1958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1955,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"5021:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1956,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5029:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1957,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5029:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"5021:27:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1959,"nodeType":"ExpressionStatement","src":"5021:27:6"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":1960,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1595,"src":"5063:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":1961,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5063:15:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1962,"nodeType":"EmitStatement","src":"5058:20:6"}]},"documentation":"@dev Allows to withdraw fees from market contract to campaign contract\n @return Fee amount","id":1964,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1921,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4730:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1922,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4730:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1923,"modifierName":{"argumentTypes":null,"id":1920,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4722:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4722:29:6"}],"name":"closeMarket","nodeType":"FunctionDefinition","parameters":{"id":1919,"nodeType":"ParameterList","parameters":[],"src":"4696:2:6"},"payable":false,"returnParameters":{"id":1924,"nodeType":"ParameterList","parameters":[],"src":"4756:0:6"},"scope":2011,"src":"4676:409:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":2009,"nodeType":"Block","src":"5301:280:6","statements":[{"expression":{"argumentTypes":null,"id":1983,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1973,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5311:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1976,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5335:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1979,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1977,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5349:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5349:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5335:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1974,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"5318:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1975,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5318:16:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1980,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5318:43:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1981,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"5364:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5318:53:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5311:60:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1984,"nodeType":"ExpressionStatement","src":"5311:60:6"},{"expression":{"argumentTypes":null,"id":1990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1985,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5381:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1988,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1986,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5395:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1987,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5395:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5381:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1989,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5409:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5381:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1991,"nodeType":"ExpressionStatement","src":"5381:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1997,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5510:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1998,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5510:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1999,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5522:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1993,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"5469:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1994,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"5469:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1996,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5469:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2000,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:58:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1992,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5461:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2001,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5461:67:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2002,"nodeType":"ExpressionStatement","src":"5461:67:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2004,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5557:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5557:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2006,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5569:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2003,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1601,"src":"5543:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":2007,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:31:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2008,"nodeType":"EmitStatement","src":"5538:36:6"}]},"documentation":"@dev Allows to withdraw fees from campaign contract to contributor\n @return Fee amount","id":2010,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1967,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5248:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1968,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5248:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1969,"modifierName":{"argumentTypes":null,"id":1966,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"5240:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"5240:28:6"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":1965,"nodeType":"ParameterList","parameters":[],"src":"5214:2:6"},"payable":false,"returnParameters":{"id":1972,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1971,"name":"fees","nodeType":"VariableDeclaration","scope":2010,"src":"5286:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1970,"name":"uint","nodeType":"ElementaryTypeName","src":"5286:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5285:11:6"},"scope":2011,"src":"5193:388:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"2694:2889:6"}],"src":"0:5584:6"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0xccc3413986cdf03bc59a0b96f0a0119e9e269872","transactionHash":"0xa0d7dafc936a9bf631fd1f3521581f9d2f117bbf1042dea2198079d97e3be949"},"4":{"address":"0x64b426a6164510d478d04e19d9046bc4ef61d488","transactionHash":"0x54dd554a3ffd84c2495c4292bedd24c08fe3b805454b6085124e73dc5581f50e"},"42":{"address":"0xd173113997eb74e379973d463bbb1727f33d1856","transactionHash":"0xd5497a074856240b9d3713a2d7c7e668bb8f709ad56ee2562e1e63c48154f053"},"437894314312":{"address":"0x26b4afb60d6c903165150c6f0aa14f8016be4aec","transactionHash":"0x2a7b369d13674fcc48270a66fd7ea5ab79ea3cf4c81e53ff19b46a350181eadd"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:48.725Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CampaignData.json": +/*!********************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CampaignData.json ***! + \********************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"CampaignData","abi":[{"constant":true,"inputs":[],"name":"marketFactory","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"finalBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"deadline","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contributions","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"market","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"funding","type":"uint256"}],"name":"CampaignFunding","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"refund","type":"uint256"}],"name":"CampaignRefund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"market","type":"address"}],"name":"MarketCreation","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"receiver","type":"address"},{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b506104a7806100206000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae7095146100b45780631f21f9af1461010b5780632129e25a1461016257806329dcb0cf1461018d57806342e94c90146101b857806380f556051461020f578063c040e6b814610266578063cb4c86b71461029f578063ddca3f43146102ca578063e274fd24146102ff578063fbde47f614610356575b600080fd5b3480156100c057600080fd5b506100c961038b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011757600080fd5b506101206103b1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016e57600080fd5b506101776103d7565b6040518082815260200191505060405180910390f35b34801561019957600080fd5b506101a26103dd565b6040518082815260200191505060405180910390f35b3480156101c457600080fd5b506101f9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103e3565b6040518082815260200191505060405180910390f35b34801561021b57600080fd5b506102246103fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027257600080fd5b5061027b610421565b6040518082600481111561028b57fe5b60ff16815260200191505060405180910390f35b3480156102ab57600080fd5b506102b4610434565b6040518082815260200191505060405180910390f35b3480156102d657600080fd5b506102df61043a565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561030b57600080fd5b5061031461044f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036257600080fd5b5061036b610474565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60055481565b60076020528060005260406000206000915090505481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900460ff1681565b60045481565b600360149054906101000a900462ffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a723058202014521ca84db06abf67affbc5a52e7e57c10a92df23f731a2ae5ff9087d320e0029","deployedBytecode":"0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae7095146100b45780631f21f9af1461010b5780632129e25a1461016257806329dcb0cf1461018d57806342e94c90146101b857806380f556051461020f578063c040e6b814610266578063cb4c86b71461029f578063ddca3f43146102ca578063e274fd24146102ff578063fbde47f614610356575b600080fd5b3480156100c057600080fd5b506100c961038b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011757600080fd5b506101206103b1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016e57600080fd5b506101776103d7565b6040518082815260200191505060405180910390f35b34801561019957600080fd5b506101a26103dd565b6040518082815260200191505060405180910390f35b3480156101c457600080fd5b506101f9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103e3565b6040518082815260200191505060405180910390f35b34801561021b57600080fd5b506102246103fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027257600080fd5b5061027b610421565b6040518082600481111561028b57fe5b60ff16815260200191505060405180910390f35b3480156102ab57600080fd5b506102b4610434565b6040518082815260200191505060405180910390f35b3480156102d657600080fd5b506102df61043a565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561030b57600080fd5b5061031461044f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036257600080fd5b5061036b610474565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60055481565b60076020528060005260406000206000915090505481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900460ff1681565b60045481565b600360149054906101000a900462ffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a723058202014521ca84db06abf67affbc5a52e7e57c10a92df23f731a2ae5ff9087d320e0029","sourceMap":"219:1235:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;219:1235:6;;;;;;;","deployedSourceMap":"219:1235:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;699:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;699:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;747:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;747:30:6;;;;;;;;;;;;;;;;;;;;;;;;;;;883:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;883:24:6;;;;;;;;;;;;;;;;;;;;;;;857:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;857:20:6;;;;;;;;;;;;;;;;;;;;;;;913:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;913:46:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;783:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;783:20:6;;;;;;;;;;;;;;;;;;;;;;;;;;;965:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;965:19:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:19:6;;;;;;;;;;;;;;;;;;;;;;;809:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;809:17:6;;;;;;;;;;;;;;;;;;;;;;;;;;;667:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;667:26:6;;;;;;;;;;;;;;;;;;;;;;;;;;;579:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;579:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;699;;;;;;;;;;;;;:::o;747:30::-;;;;;;;;;;;;;:::o;883:24::-;;;;:::o;857:20::-;;;;:::o;913:46::-;;;;;;;;;;;;;;;;;:::o;783:20::-;;;;;;;;;;;;;:::o;965:19::-;;;;;;;;;;;;;:::o;832:::-;;;;:::o;809:17::-;;;;;;;;;;;;;:::o;667:26::-;;;;;;;;;;;;;:::o;579:42::-;614:7;579:42;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Events/Event.sol\";\nimport \"../Markets/StandardMarketFactory.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\ncontract CampaignData {\n\n /*\n * Events\n */\n event CampaignFunding(address indexed sender, uint funding);\n event CampaignRefund(address indexed sender, uint refund);\n event MarketCreation(Market indexed market);\n event MarketClosing();\n event FeeWithdrawal(address indexed receiver, uint fees);\n\n /*\n * Constants\n */\n uint24 public constant FEE_RANGE = 1000000; // 100%\n\n /*\n * Storage\n */\n Event public eventContract;\n StandardMarketFactory public marketFactory;\n MarketMaker public marketMaker;\n Market public market;\n uint24 public fee;\n uint public funding;\n uint public deadline;\n uint public finalBalance;\n mapping (address => uint) public contributions;\n Stages public stage;\n\n enum Stages {\n AuctionStarted,\n AuctionSuccessful,\n AuctionFailed,\n MarketCreated,\n MarketClosed\n }\n\n /*\n * Modifiers\n */\n modifier atStage(Stages _stage) {\n // Contract has to be in given stage\n require(stage == _stage);\n _;\n }\n\n modifier timedTransitions() {\n if (stage == Stages.AuctionStarted && deadline < now)\n stage = Stages.AuctionFailed;\n _;\n }\n}\n\ncontract CampaignProxy is Proxy, CampaignData {\n /// @dev Constructor validates and sets campaign properties\n /// @param _eventContract Event contract\n /// @param _marketFactory Market factory contract\n /// @param _marketMaker Market maker contract\n /// @param _fee Market fee\n /// @param _funding Initial funding for market\n /// @param _deadline Campaign deadline\n constructor(\n address proxied,\n Event _eventContract,\n StandardMarketFactory _marketFactory,\n MarketMaker _marketMaker,\n uint24 _fee,\n uint _funding,\n uint _deadline\n )\n Proxy(proxied)\n public\n {\n // Validate input\n require( address(_eventContract) != 0\n && address(_marketFactory) != 0\n && address(_marketMaker) != 0\n && _fee < FEE_RANGE\n && _funding > 0\n && now < _deadline);\n eventContract = _eventContract;\n marketFactory = _marketFactory;\n marketMaker = _marketMaker;\n fee = _fee;\n funding = _funding;\n deadline = _deadline;\n }\n}\n\n/// @title Campaign contract - Allows to crowdfund a market\n/// @author Stefan George - \ncontract Campaign is Proxied, CampaignData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Allows to contribute to required market funding\n /// @param amount Amount of collateral tokens\n function fund(uint amount)\n public\n timedTransitions\n atStage(Stages.AuctionStarted)\n {\n uint raisedAmount = eventContract.collateralToken().balanceOf(this);\n uint maxAmount = funding.sub(raisedAmount);\n if (maxAmount < amount)\n amount = maxAmount;\n // Collect collateral tokens\n require(eventContract.collateralToken().transferFrom(msg.sender, this, amount));\n contributions[msg.sender] = contributions[msg.sender].add(amount);\n if (amount == maxAmount)\n stage = Stages.AuctionSuccessful;\n emit CampaignFunding(msg.sender, amount);\n }\n\n /// @dev Withdraws refund amount\n /// @return Refund amount\n function refund()\n public\n timedTransitions\n atStage(Stages.AuctionFailed)\n returns (uint refundAmount)\n {\n refundAmount = contributions[msg.sender];\n contributions[msg.sender] = 0;\n // Refund collateral tokens\n require(eventContract.collateralToken().transfer(msg.sender, refundAmount));\n emit CampaignRefund(msg.sender, refundAmount);\n }\n\n /// @dev Allows to create market after successful funding\n /// @return Market address\n function createMarket()\n public\n timedTransitions\n atStage(Stages.AuctionSuccessful)\n returns (Market)\n {\n market = marketFactory.createMarket(eventContract, marketMaker, fee);\n require(eventContract.collateralToken().approve(market, funding));\n market.fund(funding);\n stage = Stages.MarketCreated;\n emit MarketCreation(market);\n return market;\n }\n\n /// @dev Allows to withdraw fees from market contract to campaign contract\n /// @return Fee amount\n function closeMarket()\n public\n atStage(Stages.MarketCreated)\n {\n // Winning outcome should be set\n require(eventContract.isOutcomeSet());\n market.close();\n market.withdrawFees();\n eventContract.redeemWinnings();\n finalBalance = eventContract.collateralToken().balanceOf(this);\n stage = Stages.MarketClosed;\n emit MarketClosing();\n }\n\n /// @dev Allows to withdraw fees from campaign contract to contributor\n /// @return Fee amount\n function withdrawFees()\n public\n atStage(Stages.MarketClosed)\n returns (uint fees)\n {\n fees = finalBalance.mul(contributions[msg.sender]) / funding;\n contributions[msg.sender] = 0;\n // Send fee share to contributor\n require(eventContract.collateralToken().transfer(msg.sender, fees));\n emit FeeWithdrawal(msg.sender, fees);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","exportedSymbols":{"Campaign":[2011],"CampaignData":[1663],"CampaignProxy":[1745]},"id":2012,"nodeType":"SourceUnit","nodes":[{"id":1573,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:6"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":1574,"nodeType":"ImportDirective","scope":2012,"sourceUnit":385,"src":"25:29:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","file":"../Markets/StandardMarketFactory.sol","id":1575,"nodeType":"ImportDirective","scope":2012,"sourceUnit":3176,"src":"55:46:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":1576,"nodeType":"ImportDirective","scope":2012,"sourceUnit":7190,"src":"102:59:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":1577,"nodeType":"ImportDirective","scope":2012,"sourceUnit":6702,"src":"162:55:6","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1663,"linearizedBaseContracts":[1663],"name":"CampaignData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":1583,"name":"CampaignFunding","nodeType":"EventDefinition","parameters":{"id":1582,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1579,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1583,"src":"300:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1578,"name":"address","nodeType":"ElementaryTypeName","src":"300:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1581,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":1583,"src":"324:12:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1580,"name":"uint","nodeType":"ElementaryTypeName","src":"324:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:38:6"},"src":"278:60:6"},{"anonymous":false,"documentation":null,"id":1589,"name":"CampaignRefund","nodeType":"EventDefinition","parameters":{"id":1588,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1585,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1589,"src":"364:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1584,"name":"address","nodeType":"ElementaryTypeName","src":"364:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1587,"indexed":false,"name":"refund","nodeType":"VariableDeclaration","scope":1589,"src":"388:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1586,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"363:37:6"},"src":"343:58:6"},{"anonymous":false,"documentation":null,"id":1593,"name":"MarketCreation","nodeType":"EventDefinition","parameters":{"id":1592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1591,"indexed":true,"name":"market","nodeType":"VariableDeclaration","scope":1593,"src":"427:21:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1590,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"427:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"426:23:6"},"src":"406:44:6"},{"anonymous":false,"documentation":null,"id":1595,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":1594,"nodeType":"ParameterList","parameters":[],"src":"474:2:6"},"src":"455:22:6"},{"anonymous":false,"documentation":null,"id":1601,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":1600,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1597,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":1601,"src":"502:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1596,"name":"address","nodeType":"ElementaryTypeName","src":"502:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1599,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":1601,"src":"528:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1598,"name":"uint","nodeType":"ElementaryTypeName","src":"528:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"501:37:6"},"src":"482:57:6"},{"constant":true,"id":1604,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":1663,"src":"579:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1602,"name":"uint24","nodeType":"ElementaryTypeName","src":"579:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":1603,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"614:7:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":1606,"name":"eventContract","nodeType":"VariableDeclaration","scope":1663,"src":"667:26:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1605,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"667:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":1608,"name":"marketFactory","nodeType":"VariableDeclaration","scope":1663,"src":"699:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1607,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"699:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"public"},{"constant":false,"id":1610,"name":"marketMaker","nodeType":"VariableDeclaration","scope":1663,"src":"747:30:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1609,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"747:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":1612,"name":"market","nodeType":"VariableDeclaration","scope":1663,"src":"783:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1611,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"783:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"public"},{"constant":false,"id":1614,"name":"fee","nodeType":"VariableDeclaration","scope":1663,"src":"809:17:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1613,"name":"uint24","nodeType":"ElementaryTypeName","src":"809:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":1616,"name":"funding","nodeType":"VariableDeclaration","scope":1663,"src":"832:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1615,"name":"uint","nodeType":"ElementaryTypeName","src":"832:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1618,"name":"deadline","nodeType":"VariableDeclaration","scope":1663,"src":"857:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1617,"name":"uint","nodeType":"ElementaryTypeName","src":"857:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1620,"name":"finalBalance","nodeType":"VariableDeclaration","scope":1663,"src":"883:24:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1619,"name":"uint","nodeType":"ElementaryTypeName","src":"883:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1624,"name":"contributions","nodeType":"VariableDeclaration","scope":1663,"src":"913:46:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":1623,"keyType":{"id":1621,"name":"address","nodeType":"ElementaryTypeName","src":"922:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"913:25:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":1622,"name":"uint","nodeType":"ElementaryTypeName","src":"933:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":1626,"name":"stage","nodeType":"VariableDeclaration","scope":1663,"src":"965:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1625,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"965:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"CampaignData.Stages","id":1632,"members":[{"id":1627,"name":"AuctionStarted","nodeType":"EnumValue","src":"1013:14:6"},{"id":1628,"name":"AuctionSuccessful","nodeType":"EnumValue","src":"1037:17:6"},{"id":1629,"name":"AuctionFailed","nodeType":"EnumValue","src":"1064:13:6"},{"id":1630,"name":"MarketCreated","nodeType":"EnumValue","src":"1087:13:6"},{"id":1631,"name":"MarketClosed","nodeType":"EnumValue","src":"1110:12:6"}],"name":"Stages","nodeType":"EnumDefinition","src":"991:137:6"},{"body":{"id":1643,"nodeType":"Block","src":"1199:97:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1637,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1262:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1638,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1634,"src":"1271:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1262:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1636,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1254:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1640,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1254:24:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1641,"nodeType":"ExpressionStatement","src":"1254:24:6"},{"id":1642,"nodeType":"PlaceholderStatement","src":"1288:1:6"}]},"documentation":null,"id":1644,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":1635,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1634,"name":"_stage","nodeType":"VariableDeclaration","scope":1644,"src":"1184:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1633,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"1184:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"internal"}],"src":"1183:15:6"},"src":"1167:129:6","visibility":"internal"},{"body":{"id":1661,"nodeType":"Block","src":"1330:122:6","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1653,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1646,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1344:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1647,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1353:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1648,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1353:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1344:30:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1652,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1650,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"1378:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1651,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1389:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1378:14:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1344:48:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1659,"nodeType":"IfStatement","src":"1340:94:6","trueBody":{"expression":{"argumentTypes":null,"id":1657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1654,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1406:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1655,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1414:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1414:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1406:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1658,"nodeType":"ExpressionStatement","src":"1406:28:6"}},{"id":1660,"nodeType":"PlaceholderStatement","src":"1444:1:6"}]},"documentation":null,"id":1662,"name":"timedTransitions","nodeType":"ModifierDefinition","parameters":{"id":1645,"nodeType":"ParameterList","parameters":[],"src":"1327:2:6"},"src":"1302:150:6","visibility":"internal"}],"scope":2012,"src":"219:1235:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1664,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1482:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":1665,"nodeType":"InheritanceSpecifier","src":"1482:5:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1666,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"1489:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1667,"nodeType":"InheritanceSpecifier","src":"1489:12:6"}],"contractDependencies":[1663,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1745,"linearizedBaseContracts":[1745,1663,6701,6673],"name":"CampaignProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":1743,"nodeType":"Block","src":"2109:474:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1716,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1708,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1704,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1698,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1689,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2164:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":1688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2156:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1690,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2156:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1691,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2183:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2156:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1697,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1694,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2212:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}],"id":1693,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2204:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1695,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2204:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1696,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2231:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2204:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:76:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1703,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1700,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2260:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":1699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2252:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1701,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2252:21:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1702,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2277:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2252:26:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:122:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":1707,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1705,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2298:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1706,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1604,"src":"2305:9:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2298:16:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:158:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1711,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1709,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2334:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1710,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2345:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2334:12:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:190:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1713,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"2366:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1714,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2372:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2366:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:225:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1687,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2145:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1717,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2145:237:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1718,"nodeType":"ExpressionStatement","src":"2145:237:6"},{"expression":{"argumentTypes":null,"id":1721,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"2392:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1720,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2408:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"2392:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1722,"nodeType":"ExpressionStatement","src":"2392:30:6"},{"expression":{"argumentTypes":null,"id":1725,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1723,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"2432:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1724,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2448:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"src":"2432:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1726,"nodeType":"ExpressionStatement","src":"2432:30:6"},{"expression":{"argumentTypes":null,"id":1729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1727,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"2472:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1728,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2486:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"2472:26:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":1730,"nodeType":"ExpressionStatement","src":"2472:26:6"},{"expression":{"argumentTypes":null,"id":1733,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1731,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"2508:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1732,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2514:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2508:10:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":1734,"nodeType":"ExpressionStatement","src":"2508:10:6"},{"expression":{"argumentTypes":null,"id":1737,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1735,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"2528:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1736,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2538:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2528:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1738,"nodeType":"ExpressionStatement","src":"2528:18:6"},{"expression":{"argumentTypes":null,"id":1741,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1739,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"2556:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1740,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2567:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2556:20:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1742,"nodeType":"ExpressionStatement","src":"2556:20:6"}]},"documentation":"@dev Constructor validates and sets campaign properties\n @param _eventContract Event contract\n @param _marketFactory Market factory contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _funding Initial funding for market\n @param _deadline Campaign deadline","id":1744,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":1684,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1669,"src":"2081:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":1685,"modifierName":{"argumentTypes":null,"id":1683,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2075:5:6","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2075:14:6"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":1682,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1669,"name":"proxied","nodeType":"VariableDeclaration","scope":1744,"src":"1867:15:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1668,"name":"address","nodeType":"ElementaryTypeName","src":"1867:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1671,"name":"_eventContract","nodeType":"VariableDeclaration","scope":1744,"src":"1892:20:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1670,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1892:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":1673,"name":"_marketFactory","nodeType":"VariableDeclaration","scope":1744,"src":"1922:36:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1672,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"1922:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":1675,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":1744,"src":"1968:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1674,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1968:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":1677,"name":"_fee","nodeType":"VariableDeclaration","scope":1744,"src":"2002:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1676,"name":"uint24","nodeType":"ElementaryTypeName","src":"2002:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":1679,"name":"_funding","nodeType":"VariableDeclaration","scope":1744,"src":"2023:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1678,"name":"uint","nodeType":"ElementaryTypeName","src":"2023:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1681,"name":"_deadline","nodeType":"VariableDeclaration","scope":1744,"src":"2046:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1680,"name":"uint","nodeType":"ElementaryTypeName","src":"2046:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1857:209:6"},"payable":false,"returnParameters":{"id":1686,"nodeType":"ParameterList","parameters":[],"src":"2109:0:6"},"scope":1745,"src":"1846:737:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"1456:1129:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1746,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2715:7:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":1747,"nodeType":"InheritanceSpecifier","src":"2715:7:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1748,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"2724:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1749,"nodeType":"InheritanceSpecifier","src":"2724:12:6"}],"contractDependencies":[1663,6673],"contractKind":"contract","documentation":"@title Campaign contract - Allows to crowdfund a market\n @author Stefan George - ","fullyImplemented":true,"id":2011,"linearizedBaseContracts":[2011,1663,6673],"name":"Campaign","nodeType":"ContractDefinition","nodes":[{"id":1751,"libraryName":{"contractScope":null,"id":1750,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2749:8:6","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2743:21:6","typeName":null},{"body":{"id":1826,"nodeType":"Block","src":"3031:530:6","statements":[{"assignments":[1763],"declarations":[{"constant":false,"id":1763,"name":"raisedAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3041:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1762,"name":"uint","nodeType":"ElementaryTypeName","src":"3041:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1770,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1768,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3103:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1764,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3061:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1765,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3061:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1766,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"3061:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1769,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3041:67:6"},{"assignments":[1772],"declarations":[{"constant":false,"id":1772,"name":"maxAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3118:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1771,"name":"uint","nodeType":"ElementaryTypeName","src":"3118:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1777,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1775,"name":"raisedAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1763,"src":"3147:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1773,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"3135:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"3135:11:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1776,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3135:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3118:42:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1780,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1778,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3174:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1779,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3186:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3174:18:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1785,"nodeType":"IfStatement","src":"3170:54:6","trueBody":{"expression":{"argumentTypes":null,"id":1783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1781,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3206:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1782,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3215:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3206:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1784,"nodeType":"ExpressionStatement","src":"3206:18:6"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1791,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3324:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3324:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1793,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3336:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":1794,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3342:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1787,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3279:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1788,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3279:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1789,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3279:44:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":1795,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:70:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1786,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3271:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3271:79:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1797,"nodeType":"ExpressionStatement","src":"3271:79:6"},{"expression":{"argumentTypes":null,"id":1809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1798,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3360:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1801,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1799,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3374:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1800,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3374:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3360:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1807,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3418:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1802,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3388:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1805,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1803,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3402:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3402:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3388:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"3388:29:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1808,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3388:37:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3360:65:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1810,"nodeType":"ExpressionStatement","src":"3360:65:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1811,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3439:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1812,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3449:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:19:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1819,"nodeType":"IfStatement","src":"3435:69:6","trueBody":{"expression":{"argumentTypes":null,"id":1817,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1814,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"3472:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1815,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3480:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1816,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3480:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"3472:32:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1818,"nodeType":"ExpressionStatement","src":"3472:32:6"}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1821,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3535:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1822,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3535:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1823,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3547:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1820,"name":"CampaignFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1583,"src":"3519:15:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1824,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3519:35:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1825,"nodeType":"EmitStatement","src":"3514:40:6"}]},"documentation":"@dev Allows to contribute to required market funding\n @param amount Amount of collateral tokens","id":1827,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1756,"modifierName":{"argumentTypes":null,"id":1755,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"2971:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2971:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1758,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3004:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1759,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3004:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1760,"modifierName":{"argumentTypes":null,"id":1757,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"2996:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"2996:30:6"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":1754,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1753,"name":"amount","nodeType":"VariableDeclaration","scope":1827,"src":"2935:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1752,"name":"uint","nodeType":"ElementaryTypeName","src":"2935:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2934:13:6"},"payable":false,"returnParameters":{"id":1761,"nodeType":"ParameterList","parameters":[],"src":"3031:0:6"},"scope":2011,"src":"2921:640:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1869,"nodeType":"Block","src":"3770:272:6","statements":[{"expression":{"argumentTypes":null,"id":1843,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1838,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3780:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1839,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3795:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1842,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1840,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3809:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1841,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3809:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3795:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3780:40:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1844,"nodeType":"ExpressionStatement","src":"3780:40:6"},{"expression":{"argumentTypes":null,"id":1850,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1845,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3830:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1848,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1846,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3844:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3844:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3830:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1849,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3858:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3830:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1851,"nodeType":"ExpressionStatement","src":"3830:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1857,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3954:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3954:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1859,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3966:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1853,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3913:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1854,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3913:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1855,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3913:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1860,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:66:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1852,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3905:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1861,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3905:75:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1862,"nodeType":"ExpressionStatement","src":"3905:75:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1864,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4010:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1865,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4010:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1866,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"4022:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1863,"name":"CampaignRefund","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1589,"src":"3995:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3995:40:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1868,"nodeType":"EmitStatement","src":"3990:45:6"}]},"documentation":"@dev Withdraws refund amount\n @return Refund amount","id":1870,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1830,"modifierName":{"argumentTypes":null,"id":1829,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"3675:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3675:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1832,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3708:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1833,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3708:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1834,"modifierName":{"argumentTypes":null,"id":1831,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"3700:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"3700:29:6"}],"name":"refund","nodeType":"FunctionDefinition","parameters":{"id":1828,"nodeType":"ParameterList","parameters":[],"src":"3649:2:6"},"payable":false,"returnParameters":{"id":1837,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1836,"name":"refundAmount","nodeType":"VariableDeclaration","scope":1870,"src":"3747:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1835,"name":"uint","nodeType":"ElementaryTypeName","src":"3747:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3746:19:6"},"scope":2011,"src":"3634:408:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1917,"nodeType":"Block","src":"4276:288:6","statements":[{"expression":{"argumentTypes":null,"id":1888,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1881,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4286:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1884,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4322:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":1885,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"4337:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":1886,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"4350:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"expression":{"argumentTypes":null,"id":1882,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"4295:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1883,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3174,"src":"4295:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$_t_contract$_StandardMarket_$3112_$","typeString":"function (contract Event,contract MarketMaker,uint24) external returns (contract StandardMarket)"}},"id":1887,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4295:59:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"4286:68:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1889,"nodeType":"ExpressionStatement","src":"4286:68:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1895,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4412:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":1896,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4420:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1891,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4372:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1892,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4372:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1893,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"4372:39:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1897,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:56:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1890,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4364:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1898,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4364:65:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1899,"nodeType":"ExpressionStatement","src":"4364:65:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1903,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4451:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1900,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4439:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1902,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"4439:11:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":1904,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4439:20:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1905,"nodeType":"ExpressionStatement","src":"4439:20:6"},{"expression":{"argumentTypes":null,"id":1909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1906,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"4469:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1907,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4477:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1908,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4477:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"4469:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1910,"nodeType":"ExpressionStatement","src":"4469:28:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1912,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4527:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1911,"name":"MarketCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1593,"src":"4512:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_Market_$2238_$returns$__$","typeString":"function (contract Market)"}},"id":1913,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4512:22:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1914,"nodeType":"EmitStatement","src":"4507:27:6"},{"expression":{"argumentTypes":null,"id":1915,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4551:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"functionReturnParameters":1880,"id":1916,"nodeType":"Return","src":"4544:13:6"}]},"documentation":"@dev Allows to create market after successful funding\n @return Market address","id":1918,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1873,"modifierName":{"argumentTypes":null,"id":1872,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"4188:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4188:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1875,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4221:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1876,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4221:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1877,"modifierName":{"argumentTypes":null,"id":1874,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4213:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4213:33:6"}],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":1871,"nodeType":"ParameterList","parameters":[],"src":"4162:2:6"},"payable":false,"returnParameters":{"id":1880,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1879,"name":"","nodeType":"VariableDeclaration","scope":1918,"src":"4264:6:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1878,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4264:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"4263:8:6"},"scope":2011,"src":"4141:423:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1963,"nodeType":"Block","src":"4756:329:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1926,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4815:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4815:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":1928,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4815:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1925,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4807:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1929,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4807:37:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1930,"nodeType":"ExpressionStatement","src":"4807:37:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1931,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4854:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1933,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4854:12:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":1934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4854:14:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1935,"nodeType":"ExpressionStatement","src":"4854:14:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1936,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4878:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4878:19:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1939,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4878:21:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1940,"nodeType":"ExpressionStatement","src":"4878:21:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1941,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4909:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4909:28:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1944,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4909:30:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1945,"nodeType":"ExpressionStatement","src":"4909:30:6"},{"expression":{"argumentTypes":null,"id":1953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1946,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"4949:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1951,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"5006:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1947,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4964:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4964:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1949,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1950,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4964:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1952,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4949:62:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1954,"nodeType":"ExpressionStatement","src":"4949:62:6"},{"expression":{"argumentTypes":null,"id":1958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1955,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"5021:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1956,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5029:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1957,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5029:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"5021:27:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1959,"nodeType":"ExpressionStatement","src":"5021:27:6"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":1960,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1595,"src":"5063:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":1961,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5063:15:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1962,"nodeType":"EmitStatement","src":"5058:20:6"}]},"documentation":"@dev Allows to withdraw fees from market contract to campaign contract\n @return Fee amount","id":1964,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1921,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4730:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1922,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4730:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1923,"modifierName":{"argumentTypes":null,"id":1920,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4722:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4722:29:6"}],"name":"closeMarket","nodeType":"FunctionDefinition","parameters":{"id":1919,"nodeType":"ParameterList","parameters":[],"src":"4696:2:6"},"payable":false,"returnParameters":{"id":1924,"nodeType":"ParameterList","parameters":[],"src":"4756:0:6"},"scope":2011,"src":"4676:409:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":2009,"nodeType":"Block","src":"5301:280:6","statements":[{"expression":{"argumentTypes":null,"id":1983,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1973,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5311:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1976,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5335:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1979,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1977,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5349:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5349:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5335:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1974,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"5318:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1975,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5318:16:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1980,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5318:43:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1981,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"5364:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5318:53:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5311:60:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1984,"nodeType":"ExpressionStatement","src":"5311:60:6"},{"expression":{"argumentTypes":null,"id":1990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1985,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5381:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1988,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1986,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5395:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1987,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5395:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5381:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1989,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5409:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5381:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1991,"nodeType":"ExpressionStatement","src":"5381:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1997,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5510:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1998,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5510:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1999,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5522:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1993,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"5469:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1994,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"5469:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1996,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5469:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2000,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:58:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1992,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5461:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2001,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5461:67:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2002,"nodeType":"ExpressionStatement","src":"5461:67:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2004,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5557:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5557:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2006,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5569:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2003,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1601,"src":"5543:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":2007,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:31:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2008,"nodeType":"EmitStatement","src":"5538:36:6"}]},"documentation":"@dev Allows to withdraw fees from campaign contract to contributor\n @return Fee amount","id":2010,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1967,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5248:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1968,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5248:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1969,"modifierName":{"argumentTypes":null,"id":1966,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"5240:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"5240:28:6"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":1965,"nodeType":"ParameterList","parameters":[],"src":"5214:2:6"},"payable":false,"returnParameters":{"id":1972,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1971,"name":"fees","nodeType":"VariableDeclaration","scope":2010,"src":"5286:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1970,"name":"uint","nodeType":"ElementaryTypeName","src":"5286:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5285:11:6"},"scope":2011,"src":"5193:388:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"2694:2889:6"}],"src":"0:5584:6"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","exportedSymbols":{"Campaign":[2011],"CampaignData":[1663],"CampaignProxy":[1745]},"id":2012,"nodeType":"SourceUnit","nodes":[{"id":1573,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:6"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":1574,"nodeType":"ImportDirective","scope":2012,"sourceUnit":385,"src":"25:29:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","file":"../Markets/StandardMarketFactory.sol","id":1575,"nodeType":"ImportDirective","scope":2012,"sourceUnit":3176,"src":"55:46:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":1576,"nodeType":"ImportDirective","scope":2012,"sourceUnit":7190,"src":"102:59:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":1577,"nodeType":"ImportDirective","scope":2012,"sourceUnit":6702,"src":"162:55:6","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1663,"linearizedBaseContracts":[1663],"name":"CampaignData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":1583,"name":"CampaignFunding","nodeType":"EventDefinition","parameters":{"id":1582,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1579,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1583,"src":"300:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1578,"name":"address","nodeType":"ElementaryTypeName","src":"300:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1581,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":1583,"src":"324:12:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1580,"name":"uint","nodeType":"ElementaryTypeName","src":"324:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:38:6"},"src":"278:60:6"},{"anonymous":false,"documentation":null,"id":1589,"name":"CampaignRefund","nodeType":"EventDefinition","parameters":{"id":1588,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1585,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1589,"src":"364:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1584,"name":"address","nodeType":"ElementaryTypeName","src":"364:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1587,"indexed":false,"name":"refund","nodeType":"VariableDeclaration","scope":1589,"src":"388:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1586,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"363:37:6"},"src":"343:58:6"},{"anonymous":false,"documentation":null,"id":1593,"name":"MarketCreation","nodeType":"EventDefinition","parameters":{"id":1592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1591,"indexed":true,"name":"market","nodeType":"VariableDeclaration","scope":1593,"src":"427:21:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1590,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"427:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"426:23:6"},"src":"406:44:6"},{"anonymous":false,"documentation":null,"id":1595,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":1594,"nodeType":"ParameterList","parameters":[],"src":"474:2:6"},"src":"455:22:6"},{"anonymous":false,"documentation":null,"id":1601,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":1600,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1597,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":1601,"src":"502:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1596,"name":"address","nodeType":"ElementaryTypeName","src":"502:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1599,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":1601,"src":"528:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1598,"name":"uint","nodeType":"ElementaryTypeName","src":"528:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"501:37:6"},"src":"482:57:6"},{"constant":true,"id":1604,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":1663,"src":"579:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1602,"name":"uint24","nodeType":"ElementaryTypeName","src":"579:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":1603,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"614:7:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":1606,"name":"eventContract","nodeType":"VariableDeclaration","scope":1663,"src":"667:26:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1605,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"667:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":1608,"name":"marketFactory","nodeType":"VariableDeclaration","scope":1663,"src":"699:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1607,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"699:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"public"},{"constant":false,"id":1610,"name":"marketMaker","nodeType":"VariableDeclaration","scope":1663,"src":"747:30:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1609,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"747:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":1612,"name":"market","nodeType":"VariableDeclaration","scope":1663,"src":"783:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1611,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"783:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"public"},{"constant":false,"id":1614,"name":"fee","nodeType":"VariableDeclaration","scope":1663,"src":"809:17:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1613,"name":"uint24","nodeType":"ElementaryTypeName","src":"809:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":1616,"name":"funding","nodeType":"VariableDeclaration","scope":1663,"src":"832:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1615,"name":"uint","nodeType":"ElementaryTypeName","src":"832:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1618,"name":"deadline","nodeType":"VariableDeclaration","scope":1663,"src":"857:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1617,"name":"uint","nodeType":"ElementaryTypeName","src":"857:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1620,"name":"finalBalance","nodeType":"VariableDeclaration","scope":1663,"src":"883:24:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1619,"name":"uint","nodeType":"ElementaryTypeName","src":"883:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1624,"name":"contributions","nodeType":"VariableDeclaration","scope":1663,"src":"913:46:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":1623,"keyType":{"id":1621,"name":"address","nodeType":"ElementaryTypeName","src":"922:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"913:25:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":1622,"name":"uint","nodeType":"ElementaryTypeName","src":"933:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":1626,"name":"stage","nodeType":"VariableDeclaration","scope":1663,"src":"965:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1625,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"965:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"CampaignData.Stages","id":1632,"members":[{"id":1627,"name":"AuctionStarted","nodeType":"EnumValue","src":"1013:14:6"},{"id":1628,"name":"AuctionSuccessful","nodeType":"EnumValue","src":"1037:17:6"},{"id":1629,"name":"AuctionFailed","nodeType":"EnumValue","src":"1064:13:6"},{"id":1630,"name":"MarketCreated","nodeType":"EnumValue","src":"1087:13:6"},{"id":1631,"name":"MarketClosed","nodeType":"EnumValue","src":"1110:12:6"}],"name":"Stages","nodeType":"EnumDefinition","src":"991:137:6"},{"body":{"id":1643,"nodeType":"Block","src":"1199:97:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1637,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1262:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1638,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1634,"src":"1271:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1262:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1636,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1254:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1640,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1254:24:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1641,"nodeType":"ExpressionStatement","src":"1254:24:6"},{"id":1642,"nodeType":"PlaceholderStatement","src":"1288:1:6"}]},"documentation":null,"id":1644,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":1635,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1634,"name":"_stage","nodeType":"VariableDeclaration","scope":1644,"src":"1184:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1633,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"1184:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"internal"}],"src":"1183:15:6"},"src":"1167:129:6","visibility":"internal"},{"body":{"id":1661,"nodeType":"Block","src":"1330:122:6","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1653,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1646,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1344:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1647,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1353:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1648,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1353:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1344:30:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1652,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1650,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"1378:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1651,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1389:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1378:14:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1344:48:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1659,"nodeType":"IfStatement","src":"1340:94:6","trueBody":{"expression":{"argumentTypes":null,"id":1657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1654,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1406:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1655,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1414:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1414:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1406:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1658,"nodeType":"ExpressionStatement","src":"1406:28:6"}},{"id":1660,"nodeType":"PlaceholderStatement","src":"1444:1:6"}]},"documentation":null,"id":1662,"name":"timedTransitions","nodeType":"ModifierDefinition","parameters":{"id":1645,"nodeType":"ParameterList","parameters":[],"src":"1327:2:6"},"src":"1302:150:6","visibility":"internal"}],"scope":2012,"src":"219:1235:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1664,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1482:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":1665,"nodeType":"InheritanceSpecifier","src":"1482:5:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1666,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"1489:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1667,"nodeType":"InheritanceSpecifier","src":"1489:12:6"}],"contractDependencies":[1663,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1745,"linearizedBaseContracts":[1745,1663,6701,6673],"name":"CampaignProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":1743,"nodeType":"Block","src":"2109:474:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1716,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1708,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1704,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1698,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1689,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2164:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":1688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2156:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1690,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2156:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1691,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2183:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2156:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1697,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1694,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2212:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}],"id":1693,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2204:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1695,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2204:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1696,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2231:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2204:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:76:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1703,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1700,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2260:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":1699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2252:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1701,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2252:21:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1702,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2277:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2252:26:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:122:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":1707,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1705,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2298:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1706,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1604,"src":"2305:9:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2298:16:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:158:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1711,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1709,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2334:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1710,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2345:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2334:12:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:190:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1713,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"2366:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1714,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2372:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2366:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:225:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1687,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2145:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1717,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2145:237:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1718,"nodeType":"ExpressionStatement","src":"2145:237:6"},{"expression":{"argumentTypes":null,"id":1721,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"2392:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1720,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2408:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"2392:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1722,"nodeType":"ExpressionStatement","src":"2392:30:6"},{"expression":{"argumentTypes":null,"id":1725,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1723,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"2432:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1724,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2448:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"src":"2432:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1726,"nodeType":"ExpressionStatement","src":"2432:30:6"},{"expression":{"argumentTypes":null,"id":1729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1727,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"2472:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1728,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2486:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"2472:26:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":1730,"nodeType":"ExpressionStatement","src":"2472:26:6"},{"expression":{"argumentTypes":null,"id":1733,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1731,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"2508:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1732,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2514:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2508:10:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":1734,"nodeType":"ExpressionStatement","src":"2508:10:6"},{"expression":{"argumentTypes":null,"id":1737,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1735,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"2528:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1736,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2538:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2528:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1738,"nodeType":"ExpressionStatement","src":"2528:18:6"},{"expression":{"argumentTypes":null,"id":1741,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1739,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"2556:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1740,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2567:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2556:20:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1742,"nodeType":"ExpressionStatement","src":"2556:20:6"}]},"documentation":"@dev Constructor validates and sets campaign properties\n @param _eventContract Event contract\n @param _marketFactory Market factory contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _funding Initial funding for market\n @param _deadline Campaign deadline","id":1744,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":1684,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1669,"src":"2081:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":1685,"modifierName":{"argumentTypes":null,"id":1683,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2075:5:6","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2075:14:6"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":1682,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1669,"name":"proxied","nodeType":"VariableDeclaration","scope":1744,"src":"1867:15:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1668,"name":"address","nodeType":"ElementaryTypeName","src":"1867:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1671,"name":"_eventContract","nodeType":"VariableDeclaration","scope":1744,"src":"1892:20:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1670,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1892:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":1673,"name":"_marketFactory","nodeType":"VariableDeclaration","scope":1744,"src":"1922:36:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1672,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"1922:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":1675,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":1744,"src":"1968:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1674,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1968:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":1677,"name":"_fee","nodeType":"VariableDeclaration","scope":1744,"src":"2002:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1676,"name":"uint24","nodeType":"ElementaryTypeName","src":"2002:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":1679,"name":"_funding","nodeType":"VariableDeclaration","scope":1744,"src":"2023:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1678,"name":"uint","nodeType":"ElementaryTypeName","src":"2023:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1681,"name":"_deadline","nodeType":"VariableDeclaration","scope":1744,"src":"2046:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1680,"name":"uint","nodeType":"ElementaryTypeName","src":"2046:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1857:209:6"},"payable":false,"returnParameters":{"id":1686,"nodeType":"ParameterList","parameters":[],"src":"2109:0:6"},"scope":1745,"src":"1846:737:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"1456:1129:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1746,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2715:7:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":1747,"nodeType":"InheritanceSpecifier","src":"2715:7:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1748,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"2724:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1749,"nodeType":"InheritanceSpecifier","src":"2724:12:6"}],"contractDependencies":[1663,6673],"contractKind":"contract","documentation":"@title Campaign contract - Allows to crowdfund a market\n @author Stefan George - ","fullyImplemented":true,"id":2011,"linearizedBaseContracts":[2011,1663,6673],"name":"Campaign","nodeType":"ContractDefinition","nodes":[{"id":1751,"libraryName":{"contractScope":null,"id":1750,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2749:8:6","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2743:21:6","typeName":null},{"body":{"id":1826,"nodeType":"Block","src":"3031:530:6","statements":[{"assignments":[1763],"declarations":[{"constant":false,"id":1763,"name":"raisedAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3041:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1762,"name":"uint","nodeType":"ElementaryTypeName","src":"3041:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1770,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1768,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3103:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1764,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3061:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1765,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3061:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1766,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"3061:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1769,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3041:67:6"},{"assignments":[1772],"declarations":[{"constant":false,"id":1772,"name":"maxAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3118:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1771,"name":"uint","nodeType":"ElementaryTypeName","src":"3118:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1777,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1775,"name":"raisedAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1763,"src":"3147:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1773,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"3135:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"3135:11:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1776,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3135:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3118:42:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1780,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1778,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3174:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1779,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3186:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3174:18:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1785,"nodeType":"IfStatement","src":"3170:54:6","trueBody":{"expression":{"argumentTypes":null,"id":1783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1781,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3206:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1782,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3215:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3206:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1784,"nodeType":"ExpressionStatement","src":"3206:18:6"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1791,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3324:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3324:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1793,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3336:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":1794,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3342:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1787,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3279:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1788,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3279:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1789,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3279:44:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":1795,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:70:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1786,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3271:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3271:79:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1797,"nodeType":"ExpressionStatement","src":"3271:79:6"},{"expression":{"argumentTypes":null,"id":1809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1798,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3360:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1801,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1799,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3374:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1800,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3374:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3360:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1807,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3418:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1802,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3388:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1805,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1803,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3402:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3402:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3388:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"3388:29:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1808,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3388:37:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3360:65:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1810,"nodeType":"ExpressionStatement","src":"3360:65:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1811,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3439:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1812,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3449:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:19:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1819,"nodeType":"IfStatement","src":"3435:69:6","trueBody":{"expression":{"argumentTypes":null,"id":1817,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1814,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"3472:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1815,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3480:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1816,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3480:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"3472:32:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1818,"nodeType":"ExpressionStatement","src":"3472:32:6"}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1821,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3535:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1822,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3535:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1823,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3547:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1820,"name":"CampaignFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1583,"src":"3519:15:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1824,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3519:35:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1825,"nodeType":"EmitStatement","src":"3514:40:6"}]},"documentation":"@dev Allows to contribute to required market funding\n @param amount Amount of collateral tokens","id":1827,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1756,"modifierName":{"argumentTypes":null,"id":1755,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"2971:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2971:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1758,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3004:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1759,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3004:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1760,"modifierName":{"argumentTypes":null,"id":1757,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"2996:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"2996:30:6"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":1754,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1753,"name":"amount","nodeType":"VariableDeclaration","scope":1827,"src":"2935:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1752,"name":"uint","nodeType":"ElementaryTypeName","src":"2935:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2934:13:6"},"payable":false,"returnParameters":{"id":1761,"nodeType":"ParameterList","parameters":[],"src":"3031:0:6"},"scope":2011,"src":"2921:640:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1869,"nodeType":"Block","src":"3770:272:6","statements":[{"expression":{"argumentTypes":null,"id":1843,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1838,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3780:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1839,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3795:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1842,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1840,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3809:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1841,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3809:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3795:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3780:40:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1844,"nodeType":"ExpressionStatement","src":"3780:40:6"},{"expression":{"argumentTypes":null,"id":1850,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1845,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3830:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1848,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1846,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3844:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3844:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3830:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1849,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3858:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3830:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1851,"nodeType":"ExpressionStatement","src":"3830:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1857,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3954:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3954:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1859,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3966:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1853,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3913:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1854,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3913:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1855,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3913:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1860,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:66:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1852,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3905:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1861,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3905:75:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1862,"nodeType":"ExpressionStatement","src":"3905:75:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1864,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4010:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1865,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4010:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1866,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"4022:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1863,"name":"CampaignRefund","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1589,"src":"3995:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3995:40:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1868,"nodeType":"EmitStatement","src":"3990:45:6"}]},"documentation":"@dev Withdraws refund amount\n @return Refund amount","id":1870,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1830,"modifierName":{"argumentTypes":null,"id":1829,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"3675:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3675:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1832,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3708:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1833,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3708:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1834,"modifierName":{"argumentTypes":null,"id":1831,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"3700:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"3700:29:6"}],"name":"refund","nodeType":"FunctionDefinition","parameters":{"id":1828,"nodeType":"ParameterList","parameters":[],"src":"3649:2:6"},"payable":false,"returnParameters":{"id":1837,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1836,"name":"refundAmount","nodeType":"VariableDeclaration","scope":1870,"src":"3747:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1835,"name":"uint","nodeType":"ElementaryTypeName","src":"3747:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3746:19:6"},"scope":2011,"src":"3634:408:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1917,"nodeType":"Block","src":"4276:288:6","statements":[{"expression":{"argumentTypes":null,"id":1888,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1881,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4286:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1884,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4322:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":1885,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"4337:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":1886,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"4350:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"expression":{"argumentTypes":null,"id":1882,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"4295:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1883,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3174,"src":"4295:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$_t_contract$_StandardMarket_$3112_$","typeString":"function (contract Event,contract MarketMaker,uint24) external returns (contract StandardMarket)"}},"id":1887,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4295:59:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"4286:68:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1889,"nodeType":"ExpressionStatement","src":"4286:68:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1895,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4412:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":1896,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4420:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1891,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4372:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1892,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4372:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1893,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"4372:39:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1897,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:56:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1890,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4364:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1898,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4364:65:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1899,"nodeType":"ExpressionStatement","src":"4364:65:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1903,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4451:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1900,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4439:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1902,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"4439:11:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":1904,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4439:20:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1905,"nodeType":"ExpressionStatement","src":"4439:20:6"},{"expression":{"argumentTypes":null,"id":1909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1906,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"4469:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1907,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4477:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1908,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4477:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"4469:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1910,"nodeType":"ExpressionStatement","src":"4469:28:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1912,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4527:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1911,"name":"MarketCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1593,"src":"4512:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_Market_$2238_$returns$__$","typeString":"function (contract Market)"}},"id":1913,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4512:22:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1914,"nodeType":"EmitStatement","src":"4507:27:6"},{"expression":{"argumentTypes":null,"id":1915,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4551:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"functionReturnParameters":1880,"id":1916,"nodeType":"Return","src":"4544:13:6"}]},"documentation":"@dev Allows to create market after successful funding\n @return Market address","id":1918,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1873,"modifierName":{"argumentTypes":null,"id":1872,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"4188:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4188:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1875,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4221:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1876,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4221:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1877,"modifierName":{"argumentTypes":null,"id":1874,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4213:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4213:33:6"}],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":1871,"nodeType":"ParameterList","parameters":[],"src":"4162:2:6"},"payable":false,"returnParameters":{"id":1880,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1879,"name":"","nodeType":"VariableDeclaration","scope":1918,"src":"4264:6:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1878,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4264:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"4263:8:6"},"scope":2011,"src":"4141:423:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1963,"nodeType":"Block","src":"4756:329:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1926,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4815:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4815:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":1928,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4815:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1925,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4807:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1929,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4807:37:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1930,"nodeType":"ExpressionStatement","src":"4807:37:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1931,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4854:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1933,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4854:12:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":1934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4854:14:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1935,"nodeType":"ExpressionStatement","src":"4854:14:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1936,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4878:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4878:19:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1939,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4878:21:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1940,"nodeType":"ExpressionStatement","src":"4878:21:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1941,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4909:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4909:28:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1944,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4909:30:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1945,"nodeType":"ExpressionStatement","src":"4909:30:6"},{"expression":{"argumentTypes":null,"id":1953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1946,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"4949:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1951,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"5006:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1947,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4964:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4964:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1949,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1950,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4964:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1952,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4949:62:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1954,"nodeType":"ExpressionStatement","src":"4949:62:6"},{"expression":{"argumentTypes":null,"id":1958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1955,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"5021:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1956,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5029:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1957,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5029:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"5021:27:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1959,"nodeType":"ExpressionStatement","src":"5021:27:6"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":1960,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1595,"src":"5063:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":1961,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5063:15:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1962,"nodeType":"EmitStatement","src":"5058:20:6"}]},"documentation":"@dev Allows to withdraw fees from market contract to campaign contract\n @return Fee amount","id":1964,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1921,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4730:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1922,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4730:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1923,"modifierName":{"argumentTypes":null,"id":1920,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4722:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4722:29:6"}],"name":"closeMarket","nodeType":"FunctionDefinition","parameters":{"id":1919,"nodeType":"ParameterList","parameters":[],"src":"4696:2:6"},"payable":false,"returnParameters":{"id":1924,"nodeType":"ParameterList","parameters":[],"src":"4756:0:6"},"scope":2011,"src":"4676:409:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":2009,"nodeType":"Block","src":"5301:280:6","statements":[{"expression":{"argumentTypes":null,"id":1983,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1973,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5311:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1976,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5335:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1979,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1977,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5349:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5349:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5335:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1974,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"5318:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1975,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5318:16:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1980,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5318:43:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1981,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"5364:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5318:53:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5311:60:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1984,"nodeType":"ExpressionStatement","src":"5311:60:6"},{"expression":{"argumentTypes":null,"id":1990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1985,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5381:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1988,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1986,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5395:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1987,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5395:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5381:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1989,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5409:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5381:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1991,"nodeType":"ExpressionStatement","src":"5381:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1997,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5510:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1998,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5510:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1999,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5522:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1993,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"5469:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1994,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"5469:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1996,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5469:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2000,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:58:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1992,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5461:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2001,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5461:67:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2002,"nodeType":"ExpressionStatement","src":"5461:67:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2004,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5557:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5557:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2006,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5569:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2003,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1601,"src":"5543:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":2007,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:31:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2008,"nodeType":"EmitStatement","src":"5538:36:6"}]},"documentation":"@dev Allows to withdraw fees from campaign contract to contributor\n @return Fee amount","id":2010,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1967,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5248:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1968,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5248:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1969,"modifierName":{"argumentTypes":null,"id":1966,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"5240:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"5240:28:6"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":1965,"nodeType":"ParameterList","parameters":[],"src":"5214:2:6"},"payable":false,"returnParameters":{"id":1972,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1971,"name":"fees","nodeType":"VariableDeclaration","scope":2010,"src":"5286:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1970,"name":"uint","nodeType":"ElementaryTypeName","src":"5286:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5285:11:6"},"scope":2011,"src":"5193:388:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"2694:2889:6"}],"src":"0:5584:6"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.994Z"}; /***/ }), @@ -154,10 +208,21 @@ module.exports = {"contract_name":"Campaign","abi":[{"constant":true,"inputs":[] /*!***********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CampaignFactory.json ***! \***********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"CampaignFactory","abi":[{"constant":false,"inputs":[{"name":"eventContract","type":"address"},{"name":"marketFactory","type":"address"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"},{"name":"funding","type":"uint256"},{"name":"deadline","type":"uint256"}],"name":"createCampaign","outputs":[{"name":"campaign","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"campaign","type":"address"},{"indexed":false,"name":"eventContract","type":"address"},{"indexed":false,"name":"marketFactory","type":"address"},{"indexed":false,"name":"marketMaker","type":"address"},{"indexed":false,"name":"fee","type":"uint24"},{"indexed":false,"name":"funding","type":"uint256"},{"indexed":false,"name":"deadline","type":"uint256"}],"name":"CampaignCreation","type":"event"}],"networks":{"3":{"address":"0xd19bce9f7693598a9fa1f94c548b20887a33f141","updated_at":1503605014193},"4":{"address":"0x800820aeb972cb886fdd89d340dbe7b3f4769401","updated_at":1503603856239},"42":{"address":"0xf51b1544362ce80a542b76c49cce564497cf1bd0","updated_at":1503602339892},"437894314312":{"address":"0x0290fb167208af455bb137780163b7b7a9a10c16","updated_at":1507361155413}},"schema_version":"0.0.5","updated_at":1543915159056}; +module.exports = {"contractName":"CampaignFactory","abi":[{"constant":true,"inputs":[],"name":"campaignMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_campaignMasterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"campaign","type":"address"},{"indexed":false,"name":"eventContract","type":"address"},{"indexed":false,"name":"marketFactory","type":"address"},{"indexed":false,"name":"marketMaker","type":"address"},{"indexed":false,"name":"fee","type":"uint24"},{"indexed":false,"name":"funding","type":"uint256"},{"indexed":false,"name":"deadline","type":"uint256"}],"name":"CampaignCreation","type":"event"},{"constant":false,"inputs":[{"name":"eventContract","type":"address"},{"name":"marketFactory","type":"address"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"},{"name":"funding","type":"uint256"},{"name":"deadline","type":"uint256"}],"name":"createCampaign","outputs":[{"name":"campaign","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50604051602080610ce383398101806040528101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610c60806100836000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806342581171146100515780637d1ef569146100a8575b600080fd5b34801561005d57600080fd5b5061006661018e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b5061014c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919080359060200190929190803590602001909291905050506101b3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168787878787876101e5610434565b808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1662ffffff168152602001838152602001828152602001975050505050505050604051809103906000f0801580156102ef573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f7a9fd19b658538a67209802dd9011d6e3ce04586fe93c87096d2bc40ed85086682898989898989604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1662ffffff16815260200183815260200182815260200197505050505050505060405180910390a29695505050505050565b6040516107f080610445833901905600608060405234801561001057600080fd5b5060405160e0806107f0833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508660008173ffffffffffffffffffffffffffffffffffffffff161415151561009657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff1614158015610115575060008573ffffffffffffffffffffffffffffffffffffffff1614155b8015610138575060008473ffffffffffffffffffffffffffffffffffffffff1614155b80156101505750620f424062ffffff168362ffffff16105b801561015c5750600082115b801561016757508042105b151561017257600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600460146101000a81548162ffffff021916908362ffffff160217905550816005819055508060068190555050505050505050610578806102786000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae7095146101085780631f21f9af1461015f5780632129e25a146101b657806329dcb0cf146101e157806342e94c901461020c57806380f5560514610263578063a619486e146102ba578063c040e6b814610311578063cb4c86b71461034a578063ddca3f4314610375578063e274fd24146103aa578063fbde47f614610401575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610103573d6000f35b3d6000fd5b34801561011457600080fd5b5061011d610436565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016b57600080fd5b5061017461045c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c257600080fd5b506101cb610482565b6040518082815260200191505060405180910390f35b3480156101ed57600080fd5b506101f6610488565b6040518082815260200191505060405180910390f35b34801561021857600080fd5b5061024d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061048e565b6040518082815260200191505060405180910390f35b34801561026f57600080fd5b506102786104a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102c657600080fd5b506102cf6104cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561031d57600080fd5b506103266104f1565b6040518082600481111561033657fe5b60ff16815260200191505060405180910390f35b34801561035657600080fd5b5061035f610504565b6040518082815260200191505060405180910390f35b34801561038157600080fd5b5061038a61050a565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b3480156103b657600080fd5b506103bf61051f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040d57600080fd5b50610416610545565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60065481565b60086020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600960009054906101000a900460ff1681565b60055481565b600460149054906101000a900462ffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a72305820c88732fc1a487d6ecc4a5d53d14b4a7cd043e2ce428adb86b04c6b7ec52c22660029a165627a7a7230582074f99f7525f4a0b7d53a03873b2b27ff2cef93de05e16305e8e6db9ef78ee5190029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806342581171146100515780637d1ef569146100a8575b600080fd5b34801561005d57600080fd5b5061006661018e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b5061014c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919080359060200190929190803590602001909291905050506101b3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168787878787876101e5610434565b808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1662ffffff168152602001838152602001828152602001975050505050505050604051809103906000f0801580156102ef573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f7a9fd19b658538a67209802dd9011d6e3ce04586fe93c87096d2bc40ed85086682898989898989604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1662ffffff16815260200183815260200182815260200197505050505050505060405180910390a29695505050505050565b6040516107f080610445833901905600608060405234801561001057600080fd5b5060405160e0806107f0833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508660008173ffffffffffffffffffffffffffffffffffffffff161415151561009657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff1614158015610115575060008573ffffffffffffffffffffffffffffffffffffffff1614155b8015610138575060008473ffffffffffffffffffffffffffffffffffffffff1614155b80156101505750620f424062ffffff168362ffffff16105b801561015c5750600082115b801561016757508042105b151561017257600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600460146101000a81548162ffffff021916908362ffffff160217905550816005819055508060068190555050505050505050610578806102786000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae7095146101085780631f21f9af1461015f5780632129e25a146101b657806329dcb0cf146101e157806342e94c901461020c57806380f5560514610263578063a619486e146102ba578063c040e6b814610311578063cb4c86b71461034a578063ddca3f4314610375578063e274fd24146103aa578063fbde47f614610401575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610103573d6000f35b3d6000fd5b34801561011457600080fd5b5061011d610436565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016b57600080fd5b5061017461045c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c257600080fd5b506101cb610482565b6040518082815260200191505060405180910390f35b3480156101ed57600080fd5b506101f6610488565b6040518082815260200191505060405180910390f35b34801561021857600080fd5b5061024d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061048e565b6040518082815260200191505060405180910390f35b34801561026f57600080fd5b506102786104a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102c657600080fd5b506102cf6104cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561031d57600080fd5b506103266104f1565b6040518082600481111561033657fe5b60ff16815260200191505060405180910390f35b34801561035657600080fd5b5061035f610504565b6040518082815260200191505060405180910390f35b34801561038157600080fd5b5061038a61050a565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b3480156103b657600080fd5b506103bf61051f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040d57600080fd5b50610416610545565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60065481565b60086020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600960009054906101000a900460ff1681565b60055481565b600460149054906101000a900462ffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a72305820c88732fc1a487d6ecc4a5d53d14b4a7cd043e2ce428adb86b04c6b7ec52c22660029a165627a7a7230582074f99f7525f4a0b7d53a03873b2b27ff2cef93de05e16305e8e6db9ef78ee5190029","sourceMap":"183:1374:7:-;;;554:118;8:9:-1;5:2;;;30:1;27;20:12;5:2;554:118:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;646:19;625:18;;:40;;;;;;;;;;;;;;;;;;554:118;183:1374;;;;;;","deployedSourceMap":"183:1374:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;473:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;473:34:7;;;;;;;;;;;;;;;;;;;;;;;;;;;1023:532;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1023:532:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;473:34;;;;;;;;;;;;;:::o;1023:532::-;1257:17;1341:18;;;;;;;;;;;1361:13;1376;1391:11;1404:3;1409:7;1418:8;1310:117;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1310:117:7;1290:138;;1460:10;1443:105;;;1472:8;1482:13;1497;1512:11;1525:3;1530:7;1539:8;1443:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1023:532;;;;;;;;:::o;183:1374::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/Campaign.sol\";\n\n\n/// @title Campaign factory contract - Allows to create campaign contracts\n/// @author Stefan George - \ncontract CampaignFactory {\n\n /*\n * Events\n */\n event CampaignCreation(address indexed creator, Campaign campaign, Event eventContract, StandardMarketFactory marketFactory, MarketMaker marketMaker, uint24 fee, uint funding, uint deadline);\n\n /*\n * Storage\n */\n Campaign public campaignMasterCopy;\n\n /*\n * Public functions\n */\n constructor(Campaign _campaignMasterCopy)\n public\n {\n campaignMasterCopy = _campaignMasterCopy;\n }\n\n /// @dev Creates a new campaign contract\n /// @param eventContract Event contract\n /// @param marketFactory Market factory contract\n /// @param marketMaker Market maker contract\n /// @param fee Market fee\n /// @param funding Initial funding for market\n /// @param deadline Campaign deadline\n /// @return Market contract\n function createCampaign(\n Event eventContract,\n StandardMarketFactory marketFactory,\n MarketMaker marketMaker,\n uint24 fee,\n uint funding,\n uint deadline\n )\n public\n returns (Campaign campaign)\n {\n campaign = Campaign(new CampaignProxy(\n campaignMasterCopy, eventContract, marketFactory, marketMaker, fee, funding, deadline));\n emit CampaignCreation(msg.sender, campaign, eventContract, marketFactory, marketMaker, fee, funding, deadline);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/CampaignFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/CampaignFactory.sol","exportedSymbols":{"CampaignFactory":[2090]},"id":2091,"nodeType":"SourceUnit","nodes":[{"id":2013,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:7"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","file":"../Markets/Campaign.sol","id":2014,"nodeType":"ImportDirective","scope":2091,"sourceUnit":2012,"src":"25:33:7","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[1745],"contractKind":"contract","documentation":"@title Campaign factory contract - Allows to create campaign contracts\n @author Stefan George - ","fullyImplemented":true,"id":2090,"linearizedBaseContracts":[2090],"name":"CampaignFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":2032,"name":"CampaignCreation","nodeType":"EventDefinition","parameters":{"id":2031,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2016,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":2032,"src":"268:23:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2015,"name":"address","nodeType":"ElementaryTypeName","src":"268:7:7","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2018,"indexed":false,"name":"campaign","nodeType":"VariableDeclaration","scope":2032,"src":"293:17:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},"typeName":{"contractScope":null,"id":2017,"name":"Campaign","nodeType":"UserDefinedTypeName","referencedDeclaration":2011,"src":"293:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"value":null,"visibility":"internal"},{"constant":false,"id":2020,"indexed":false,"name":"eventContract","nodeType":"VariableDeclaration","scope":2032,"src":"312:19:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2019,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"312:5:7","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2022,"indexed":false,"name":"marketFactory","nodeType":"VariableDeclaration","scope":2032,"src":"333:35:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":2021,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"333:21:7","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":2024,"indexed":false,"name":"marketMaker","nodeType":"VariableDeclaration","scope":2032,"src":"370:23:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2023,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"370:11:7","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2026,"indexed":false,"name":"fee","nodeType":"VariableDeclaration","scope":2032,"src":"395:10:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2025,"name":"uint24","nodeType":"ElementaryTypeName","src":"395:6:7","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":2028,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":2032,"src":"407:12:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2027,"name":"uint","nodeType":"ElementaryTypeName","src":"407:4:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2030,"indexed":false,"name":"deadline","nodeType":"VariableDeclaration","scope":2032,"src":"421:13:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2029,"name":"uint","nodeType":"ElementaryTypeName","src":"421:4:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"267:168:7"},"src":"245:191:7"},{"constant":false,"id":2034,"name":"campaignMasterCopy","nodeType":"VariableDeclaration","scope":2090,"src":"473:34:7","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},"typeName":{"contractScope":null,"id":2033,"name":"Campaign","nodeType":"UserDefinedTypeName","referencedDeclaration":2011,"src":"473:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"value":null,"visibility":"public"},{"body":{"id":2043,"nodeType":"Block","src":"615:57:7","statements":[{"expression":{"argumentTypes":null,"id":2041,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2039,"name":"campaignMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2034,"src":"625:18:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2040,"name":"_campaignMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2036,"src":"646:19:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"src":"625:40:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"id":2042,"nodeType":"ExpressionStatement","src":"625:40:7"}]},"documentation":null,"id":2044,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":2037,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2036,"name":"_campaignMasterCopy","nodeType":"VariableDeclaration","scope":2044,"src":"566:28:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},"typeName":{"contractScope":null,"id":2035,"name":"Campaign","nodeType":"UserDefinedTypeName","referencedDeclaration":2011,"src":"566:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"value":null,"visibility":"internal"}],"src":"565:30:7"},"payable":false,"returnParameters":{"id":2038,"nodeType":"ParameterList","parameters":[],"src":"615:0:7"},"scope":2090,"src":"554:118:7","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":2088,"nodeType":"Block","src":"1280:275:7","statements":[{"expression":{"argumentTypes":null,"id":2074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2061,"name":"campaign","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2059,"src":"1290:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2065,"name":"campaignMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2034,"src":"1341:18:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":2066,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2046,"src":"1361:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2067,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2048,"src":"1376:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},{"argumentTypes":null,"id":2068,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2050,"src":"1391:11:7","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":2069,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2052,"src":"1404:3:7","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":2070,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2054,"src":"1409:7:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2071,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2056,"src":"1418:8:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2064,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1310:17:7","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_contract$_Event_$384_$_t_contract$_StandardMarketFactory_$3175_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$_t_uint256_$returns$_t_contract$_CampaignProxy_$1745_$","typeString":"function (address,contract Event,contract StandardMarketFactory,contract MarketMaker,uint24,uint256,uint256) returns (contract CampaignProxy)"},"typeName":{"contractScope":null,"id":2063,"name":"CampaignProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":1745,"src":"1314:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignProxy_$1745","typeString":"contract CampaignProxy"}}},"id":2072,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1310:117:7","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignProxy_$1745","typeString":"contract CampaignProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CampaignProxy_$1745","typeString":"contract CampaignProxy"}],"id":2062,"name":"Campaign","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2011,"src":"1301:8:7","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Campaign_$2011_$","typeString":"type(contract Campaign)"}},"id":2073,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1301:127:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"src":"1290:138:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"id":2075,"nodeType":"ExpressionStatement","src":"1290:138:7"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2077,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1460:3:7","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1460:10:7","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2079,"name":"campaign","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2059,"src":"1472:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":2080,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2046,"src":"1482:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2081,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2048,"src":"1497:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},{"argumentTypes":null,"id":2082,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2050,"src":"1512:11:7","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":2083,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2052,"src":"1525:3:7","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":2084,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2054,"src":"1530:7:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2085,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2056,"src":"1539:8:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2076,"name":"CampaignCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2032,"src":"1443:16:7","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_Campaign_$2011_$_t_contract$_Event_$384_$_t_contract$_StandardMarketFactory_$3175_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,contract Campaign,contract Event,contract StandardMarketFactory,contract MarketMaker,uint24,uint256,uint256)"}},"id":2086,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1443:105:7","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2087,"nodeType":"EmitStatement","src":"1438:110:7"}]},"documentation":"@dev Creates a new campaign contract\n @param eventContract Event contract\n @param marketFactory Market factory contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param funding Initial funding for market\n @param deadline Campaign deadline\n @return Market contract","id":2089,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createCampaign","nodeType":"FunctionDefinition","parameters":{"id":2057,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2046,"name":"eventContract","nodeType":"VariableDeclaration","scope":2089,"src":"1056:19:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2045,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1056:5:7","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2048,"name":"marketFactory","nodeType":"VariableDeclaration","scope":2089,"src":"1085:35:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":2047,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"1085:21:7","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":2050,"name":"marketMaker","nodeType":"VariableDeclaration","scope":2089,"src":"1130:23:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2049,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1130:11:7","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2052,"name":"fee","nodeType":"VariableDeclaration","scope":2089,"src":"1163:10:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2051,"name":"uint24","nodeType":"ElementaryTypeName","src":"1163:6:7","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":2054,"name":"funding","nodeType":"VariableDeclaration","scope":2089,"src":"1183:12:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2053,"name":"uint","nodeType":"ElementaryTypeName","src":"1183:4:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2056,"name":"deadline","nodeType":"VariableDeclaration","scope":2089,"src":"1205:13:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2055,"name":"uint","nodeType":"ElementaryTypeName","src":"1205:4:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1046:178:7"},"payable":false,"returnParameters":{"id":2060,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2059,"name":"campaign","nodeType":"VariableDeclaration","scope":2089,"src":"1257:17:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},"typeName":{"contractScope":null,"id":2058,"name":"Campaign","nodeType":"UserDefinedTypeName","referencedDeclaration":2011,"src":"1257:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"value":null,"visibility":"internal"}],"src":"1256:19:7"},"scope":2090,"src":"1023:532:7","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2091,"src":"183:1374:7"}],"src":"0:1558:7"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/CampaignFactory.sol","exportedSymbols":{"CampaignFactory":[2090]},"id":2091,"nodeType":"SourceUnit","nodes":[{"id":2013,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:7"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","file":"../Markets/Campaign.sol","id":2014,"nodeType":"ImportDirective","scope":2091,"sourceUnit":2012,"src":"25:33:7","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[1745],"contractKind":"contract","documentation":"@title Campaign factory contract - Allows to create campaign contracts\n @author Stefan George - ","fullyImplemented":true,"id":2090,"linearizedBaseContracts":[2090],"name":"CampaignFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":2032,"name":"CampaignCreation","nodeType":"EventDefinition","parameters":{"id":2031,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2016,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":2032,"src":"268:23:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2015,"name":"address","nodeType":"ElementaryTypeName","src":"268:7:7","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2018,"indexed":false,"name":"campaign","nodeType":"VariableDeclaration","scope":2032,"src":"293:17:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},"typeName":{"contractScope":null,"id":2017,"name":"Campaign","nodeType":"UserDefinedTypeName","referencedDeclaration":2011,"src":"293:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"value":null,"visibility":"internal"},{"constant":false,"id":2020,"indexed":false,"name":"eventContract","nodeType":"VariableDeclaration","scope":2032,"src":"312:19:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2019,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"312:5:7","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2022,"indexed":false,"name":"marketFactory","nodeType":"VariableDeclaration","scope":2032,"src":"333:35:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":2021,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"333:21:7","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":2024,"indexed":false,"name":"marketMaker","nodeType":"VariableDeclaration","scope":2032,"src":"370:23:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2023,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"370:11:7","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2026,"indexed":false,"name":"fee","nodeType":"VariableDeclaration","scope":2032,"src":"395:10:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2025,"name":"uint24","nodeType":"ElementaryTypeName","src":"395:6:7","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":2028,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":2032,"src":"407:12:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2027,"name":"uint","nodeType":"ElementaryTypeName","src":"407:4:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2030,"indexed":false,"name":"deadline","nodeType":"VariableDeclaration","scope":2032,"src":"421:13:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2029,"name":"uint","nodeType":"ElementaryTypeName","src":"421:4:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"267:168:7"},"src":"245:191:7"},{"constant":false,"id":2034,"name":"campaignMasterCopy","nodeType":"VariableDeclaration","scope":2090,"src":"473:34:7","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},"typeName":{"contractScope":null,"id":2033,"name":"Campaign","nodeType":"UserDefinedTypeName","referencedDeclaration":2011,"src":"473:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"value":null,"visibility":"public"},{"body":{"id":2043,"nodeType":"Block","src":"615:57:7","statements":[{"expression":{"argumentTypes":null,"id":2041,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2039,"name":"campaignMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2034,"src":"625:18:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2040,"name":"_campaignMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2036,"src":"646:19:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"src":"625:40:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"id":2042,"nodeType":"ExpressionStatement","src":"625:40:7"}]},"documentation":null,"id":2044,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":2037,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2036,"name":"_campaignMasterCopy","nodeType":"VariableDeclaration","scope":2044,"src":"566:28:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},"typeName":{"contractScope":null,"id":2035,"name":"Campaign","nodeType":"UserDefinedTypeName","referencedDeclaration":2011,"src":"566:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"value":null,"visibility":"internal"}],"src":"565:30:7"},"payable":false,"returnParameters":{"id":2038,"nodeType":"ParameterList","parameters":[],"src":"615:0:7"},"scope":2090,"src":"554:118:7","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":2088,"nodeType":"Block","src":"1280:275:7","statements":[{"expression":{"argumentTypes":null,"id":2074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2061,"name":"campaign","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2059,"src":"1290:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2065,"name":"campaignMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2034,"src":"1341:18:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":2066,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2046,"src":"1361:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2067,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2048,"src":"1376:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},{"argumentTypes":null,"id":2068,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2050,"src":"1391:11:7","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":2069,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2052,"src":"1404:3:7","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":2070,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2054,"src":"1409:7:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2071,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2056,"src":"1418:8:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2064,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1310:17:7","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_contract$_Event_$384_$_t_contract$_StandardMarketFactory_$3175_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$_t_uint256_$returns$_t_contract$_CampaignProxy_$1745_$","typeString":"function (address,contract Event,contract StandardMarketFactory,contract MarketMaker,uint24,uint256,uint256) returns (contract CampaignProxy)"},"typeName":{"contractScope":null,"id":2063,"name":"CampaignProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":1745,"src":"1314:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignProxy_$1745","typeString":"contract CampaignProxy"}}},"id":2072,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1310:117:7","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignProxy_$1745","typeString":"contract CampaignProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CampaignProxy_$1745","typeString":"contract CampaignProxy"}],"id":2062,"name":"Campaign","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2011,"src":"1301:8:7","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Campaign_$2011_$","typeString":"type(contract Campaign)"}},"id":2073,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1301:127:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"src":"1290:138:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"id":2075,"nodeType":"ExpressionStatement","src":"1290:138:7"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2077,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1460:3:7","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1460:10:7","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2079,"name":"campaign","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2059,"src":"1472:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":2080,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2046,"src":"1482:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2081,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2048,"src":"1497:13:7","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},{"argumentTypes":null,"id":2082,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2050,"src":"1512:11:7","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":2083,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2052,"src":"1525:3:7","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":2084,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2054,"src":"1530:7:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2085,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2056,"src":"1539:8:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2076,"name":"CampaignCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2032,"src":"1443:16:7","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_Campaign_$2011_$_t_contract$_Event_$384_$_t_contract$_StandardMarketFactory_$3175_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,contract Campaign,contract Event,contract StandardMarketFactory,contract MarketMaker,uint24,uint256,uint256)"}},"id":2086,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1443:105:7","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2087,"nodeType":"EmitStatement","src":"1438:110:7"}]},"documentation":"@dev Creates a new campaign contract\n @param eventContract Event contract\n @param marketFactory Market factory contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param funding Initial funding for market\n @param deadline Campaign deadline\n @return Market contract","id":2089,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createCampaign","nodeType":"FunctionDefinition","parameters":{"id":2057,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2046,"name":"eventContract","nodeType":"VariableDeclaration","scope":2089,"src":"1056:19:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2045,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1056:5:7","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2048,"name":"marketFactory","nodeType":"VariableDeclaration","scope":2089,"src":"1085:35:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":2047,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"1085:21:7","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":2050,"name":"marketMaker","nodeType":"VariableDeclaration","scope":2089,"src":"1130:23:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2049,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1130:11:7","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2052,"name":"fee","nodeType":"VariableDeclaration","scope":2089,"src":"1163:10:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2051,"name":"uint24","nodeType":"ElementaryTypeName","src":"1163:6:7","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":2054,"name":"funding","nodeType":"VariableDeclaration","scope":2089,"src":"1183:12:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2053,"name":"uint","nodeType":"ElementaryTypeName","src":"1183:4:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2056,"name":"deadline","nodeType":"VariableDeclaration","scope":2089,"src":"1205:13:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2055,"name":"uint","nodeType":"ElementaryTypeName","src":"1205:4:7","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1046:178:7"},"payable":false,"returnParameters":{"id":2060,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2059,"name":"campaign","nodeType":"VariableDeclaration","scope":2089,"src":"1257:17:7","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},"typeName":{"contractScope":null,"id":2058,"name":"Campaign","nodeType":"UserDefinedTypeName","referencedDeclaration":2011,"src":"1257:8:7","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},"value":null,"visibility":"internal"}],"src":"1256:19:7"},"scope":2090,"src":"1023:532:7","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2091,"src":"183:1374:7"}],"src":"0:1558:7"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0xb743129df46a7b375a6310ee067c8d069a38d797","transactionHash":"0xf7ba8a9b4c441da6a70af6e5e05e48c39f8683c423e918b3801c09abcfceb4e2"},"4":{"address":"0x41245e9202e708b293aa3b67874cf1374714ede2","transactionHash":"0xeb302fdecc0c551cc0591d7a1037705fe5cfbd41784fb832309fb8b636fc039e"},"42":{"address":"0xb20b804bf7a379ade00c5aaa920a0170f5ef570f","transactionHash":"0x37d70f32048e4cb2f31060b2c40898259094f56b26c2a139dd9c54988a09fedb"},"437894314312":{"address":"0x21a59654176f2689d12e828b77a783072cd26680","transactionHash":"0x6e3a78d5a27dd88a78832c9388d449ca7b97f4bbe3f4071e2dede10768afca48"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:48.719Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CampaignProxy.json": +/*!*********************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CampaignProxy.json ***! + \*********************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"CampaignProxy","abi":[{"constant":true,"inputs":[],"name":"marketFactory","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"finalBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"deadline","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contributions","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"market","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":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"proxied","type":"address"},{"name":"_eventContract","type":"address"},{"name":"_marketFactory","type":"address"},{"name":"_marketMaker","type":"address"},{"name":"_fee","type":"uint24"},{"name":"_funding","type":"uint256"},{"name":"_deadline","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"funding","type":"uint256"}],"name":"CampaignFunding","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"refund","type":"uint256"}],"name":"CampaignRefund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"market","type":"address"}],"name":"MarketCreation","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"receiver","type":"address"},{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160e0806107f0833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508660008173ffffffffffffffffffffffffffffffffffffffff161415151561009657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff1614158015610115575060008573ffffffffffffffffffffffffffffffffffffffff1614155b8015610138575060008473ffffffffffffffffffffffffffffffffffffffff1614155b80156101505750620f424062ffffff168362ffffff16105b801561015c5750600082115b801561016757508042105b151561017257600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600460146101000a81548162ffffff021916908362ffffff160217905550816005819055508060068190555050505050505050610578806102786000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae7095146101085780631f21f9af1461015f5780632129e25a146101b657806329dcb0cf146101e157806342e94c901461020c57806380f5560514610263578063a619486e146102ba578063c040e6b814610311578063cb4c86b71461034a578063ddca3f4314610375578063e274fd24146103aa578063fbde47f614610401575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610103573d6000f35b3d6000fd5b34801561011457600080fd5b5061011d610436565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016b57600080fd5b5061017461045c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c257600080fd5b506101cb610482565b6040518082815260200191505060405180910390f35b3480156101ed57600080fd5b506101f6610488565b6040518082815260200191505060405180910390f35b34801561021857600080fd5b5061024d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061048e565b6040518082815260200191505060405180910390f35b34801561026f57600080fd5b506102786104a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102c657600080fd5b506102cf6104cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561031d57600080fd5b506103266104f1565b6040518082600481111561033657fe5b60ff16815260200191505060405180910390f35b34801561035657600080fd5b5061035f610504565b6040518082815260200191505060405180910390f35b34801561038157600080fd5b5061038a61050a565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b3480156103b657600080fd5b506103bf61051f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040d57600080fd5b50610416610545565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60065481565b60086020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600960009054906101000a900460ff1681565b60055481565b600460149054906101000a900462ffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a72305820c88732fc1a487d6ecc4a5d53d14b4a7cd043e2ce428adb86b04c6b7ec52c22660029","deployedBytecode":"0x6080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae7095146101085780631f21f9af1461015f5780632129e25a146101b657806329dcb0cf146101e157806342e94c901461020c57806380f5560514610263578063a619486e146102ba578063c040e6b814610311578063cb4c86b71461034a578063ddca3f4314610375578063e274fd24146103aa578063fbde47f614610401575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610103573d6000f35b3d6000fd5b34801561011457600080fd5b5061011d610436565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016b57600080fd5b5061017461045c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c257600080fd5b506101cb610482565b6040518082815260200191505060405180910390f35b3480156101ed57600080fd5b506101f6610488565b6040518082815260200191505060405180910390f35b34801561021857600080fd5b5061024d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061048e565b6040518082815260200191505060405180910390f35b34801561026f57600080fd5b506102786104a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102c657600080fd5b506102cf6104cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561031d57600080fd5b506103266104f1565b6040518082600481111561033657fe5b60ff16815260200191505060405180910390f35b34801561035657600080fd5b5061035f610504565b6040518082815260200191505060405180910390f35b34801561038157600080fd5b5061038a61050a565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b3480156103b657600080fd5b506103bf61051f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040d57600080fd5b50610416610545565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60065481565b60086020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600960009054906101000a900460ff1681565b60055481565b600460149054906101000a900462ffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a72305820c88732fc1a487d6ecc4a5d53d14b4a7cd043e2ce428adb86b04c6b7ec52c22660029","sourceMap":"1456:1129:6:-;;;1846:737;8:9:-1;5:2;;;30:1;27;20:12;5:2;1846:737:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2081:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;2183:1:6;2164:14;2156:28;;;;:76;;;;;2231:1;2212:14;2204:28;;;;2156:76;:122;;;;;2277:1;2260:12;2252:26;;;;2156:122;:158;;;;;614:7;2298:16;;:4;:16;;;2156:158;:190;;;;;2345:1;2334:8;:12;2156:190;:225;;;;;2372:9;2366:3;:15;2156:225;2145:237;;;;;;;;2408:14;2392:13;;:30;;;;;;;;;;;;;;;;;;2448:14;2432:13;;:30;;;;;;;;;;;;;;;;;;2486:12;2472:11;;:26;;;;;;;;;;;;;;;;;;2514:4;2508:3;;:10;;;;;;;;;;;;;;;;;;2538:8;2528:7;:18;;;;2567:9;2556:8;:20;;;;1846:737;;;;;;;1456:1129;;;;;;","deployedSourceMap":"1456:1129:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;699:42:6;;8:9:-1;5:2;;;30:1;27;20:12;5:2;699:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;747:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;747:30:6;;;;;;;;;;;;;;;;;;;;;;;;;;;883:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;883:24:6;;;;;;;;;;;;;;;;;;;;;;;857:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;857:20:6;;;;;;;;;;;;;;;;;;;;;;;913:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;913:46:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;783:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;783:20:6;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;965:19:6;;8:9:-1;5:2;;;30:1;27;20:12;5:2;965:19:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:19:6;;;;;;;;;;;;;;;;;;;;;;;809:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;809:17:6;;;;;;;;;;;;;;;;;;;;;;;;;;;667:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;667:26:6;;;;;;;;;;;;;;;;;;;;;;;;;;;579:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;579:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;699;;;;;;;;;;;;;:::o;747:30::-;;;;;;;;;;;;;:::o;883:24::-;;;;:::o;857:20::-;;;;:::o;913:46::-;;;;;;;;;;;;;;;;;:::o;783:20::-;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;965:19:6:-;;;;;;;;;;;;;:::o;832:::-;;;;:::o;809:17::-;;;;;;;;;;;;;:::o;667:26::-;;;;;;;;;;;;;:::o;579:42::-;614:7;579:42;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Events/Event.sol\";\nimport \"../Markets/StandardMarketFactory.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\ncontract CampaignData {\n\n /*\n * Events\n */\n event CampaignFunding(address indexed sender, uint funding);\n event CampaignRefund(address indexed sender, uint refund);\n event MarketCreation(Market indexed market);\n event MarketClosing();\n event FeeWithdrawal(address indexed receiver, uint fees);\n\n /*\n * Constants\n */\n uint24 public constant FEE_RANGE = 1000000; // 100%\n\n /*\n * Storage\n */\n Event public eventContract;\n StandardMarketFactory public marketFactory;\n MarketMaker public marketMaker;\n Market public market;\n uint24 public fee;\n uint public funding;\n uint public deadline;\n uint public finalBalance;\n mapping (address => uint) public contributions;\n Stages public stage;\n\n enum Stages {\n AuctionStarted,\n AuctionSuccessful,\n AuctionFailed,\n MarketCreated,\n MarketClosed\n }\n\n /*\n * Modifiers\n */\n modifier atStage(Stages _stage) {\n // Contract has to be in given stage\n require(stage == _stage);\n _;\n }\n\n modifier timedTransitions() {\n if (stage == Stages.AuctionStarted && deadline < now)\n stage = Stages.AuctionFailed;\n _;\n }\n}\n\ncontract CampaignProxy is Proxy, CampaignData {\n /// @dev Constructor validates and sets campaign properties\n /// @param _eventContract Event contract\n /// @param _marketFactory Market factory contract\n /// @param _marketMaker Market maker contract\n /// @param _fee Market fee\n /// @param _funding Initial funding for market\n /// @param _deadline Campaign deadline\n constructor(\n address proxied,\n Event _eventContract,\n StandardMarketFactory _marketFactory,\n MarketMaker _marketMaker,\n uint24 _fee,\n uint _funding,\n uint _deadline\n )\n Proxy(proxied)\n public\n {\n // Validate input\n require( address(_eventContract) != 0\n && address(_marketFactory) != 0\n && address(_marketMaker) != 0\n && _fee < FEE_RANGE\n && _funding > 0\n && now < _deadline);\n eventContract = _eventContract;\n marketFactory = _marketFactory;\n marketMaker = _marketMaker;\n fee = _fee;\n funding = _funding;\n deadline = _deadline;\n }\n}\n\n/// @title Campaign contract - Allows to crowdfund a market\n/// @author Stefan George - \ncontract Campaign is Proxied, CampaignData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Allows to contribute to required market funding\n /// @param amount Amount of collateral tokens\n function fund(uint amount)\n public\n timedTransitions\n atStage(Stages.AuctionStarted)\n {\n uint raisedAmount = eventContract.collateralToken().balanceOf(this);\n uint maxAmount = funding.sub(raisedAmount);\n if (maxAmount < amount)\n amount = maxAmount;\n // Collect collateral tokens\n require(eventContract.collateralToken().transferFrom(msg.sender, this, amount));\n contributions[msg.sender] = contributions[msg.sender].add(amount);\n if (amount == maxAmount)\n stage = Stages.AuctionSuccessful;\n emit CampaignFunding(msg.sender, amount);\n }\n\n /// @dev Withdraws refund amount\n /// @return Refund amount\n function refund()\n public\n timedTransitions\n atStage(Stages.AuctionFailed)\n returns (uint refundAmount)\n {\n refundAmount = contributions[msg.sender];\n contributions[msg.sender] = 0;\n // Refund collateral tokens\n require(eventContract.collateralToken().transfer(msg.sender, refundAmount));\n emit CampaignRefund(msg.sender, refundAmount);\n }\n\n /// @dev Allows to create market after successful funding\n /// @return Market address\n function createMarket()\n public\n timedTransitions\n atStage(Stages.AuctionSuccessful)\n returns (Market)\n {\n market = marketFactory.createMarket(eventContract, marketMaker, fee);\n require(eventContract.collateralToken().approve(market, funding));\n market.fund(funding);\n stage = Stages.MarketCreated;\n emit MarketCreation(market);\n return market;\n }\n\n /// @dev Allows to withdraw fees from market contract to campaign contract\n /// @return Fee amount\n function closeMarket()\n public\n atStage(Stages.MarketCreated)\n {\n // Winning outcome should be set\n require(eventContract.isOutcomeSet());\n market.close();\n market.withdrawFees();\n eventContract.redeemWinnings();\n finalBalance = eventContract.collateralToken().balanceOf(this);\n stage = Stages.MarketClosed;\n emit MarketClosing();\n }\n\n /// @dev Allows to withdraw fees from campaign contract to contributor\n /// @return Fee amount\n function withdrawFees()\n public\n atStage(Stages.MarketClosed)\n returns (uint fees)\n {\n fees = finalBalance.mul(contributions[msg.sender]) / funding;\n contributions[msg.sender] = 0;\n // Send fee share to contributor\n require(eventContract.collateralToken().transfer(msg.sender, fees));\n emit FeeWithdrawal(msg.sender, fees);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","exportedSymbols":{"Campaign":[2011],"CampaignData":[1663],"CampaignProxy":[1745]},"id":2012,"nodeType":"SourceUnit","nodes":[{"id":1573,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:6"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":1574,"nodeType":"ImportDirective","scope":2012,"sourceUnit":385,"src":"25:29:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","file":"../Markets/StandardMarketFactory.sol","id":1575,"nodeType":"ImportDirective","scope":2012,"sourceUnit":3176,"src":"55:46:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":1576,"nodeType":"ImportDirective","scope":2012,"sourceUnit":7190,"src":"102:59:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":1577,"nodeType":"ImportDirective","scope":2012,"sourceUnit":6702,"src":"162:55:6","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1663,"linearizedBaseContracts":[1663],"name":"CampaignData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":1583,"name":"CampaignFunding","nodeType":"EventDefinition","parameters":{"id":1582,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1579,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1583,"src":"300:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1578,"name":"address","nodeType":"ElementaryTypeName","src":"300:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1581,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":1583,"src":"324:12:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1580,"name":"uint","nodeType":"ElementaryTypeName","src":"324:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:38:6"},"src":"278:60:6"},{"anonymous":false,"documentation":null,"id":1589,"name":"CampaignRefund","nodeType":"EventDefinition","parameters":{"id":1588,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1585,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1589,"src":"364:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1584,"name":"address","nodeType":"ElementaryTypeName","src":"364:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1587,"indexed":false,"name":"refund","nodeType":"VariableDeclaration","scope":1589,"src":"388:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1586,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"363:37:6"},"src":"343:58:6"},{"anonymous":false,"documentation":null,"id":1593,"name":"MarketCreation","nodeType":"EventDefinition","parameters":{"id":1592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1591,"indexed":true,"name":"market","nodeType":"VariableDeclaration","scope":1593,"src":"427:21:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1590,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"427:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"426:23:6"},"src":"406:44:6"},{"anonymous":false,"documentation":null,"id":1595,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":1594,"nodeType":"ParameterList","parameters":[],"src":"474:2:6"},"src":"455:22:6"},{"anonymous":false,"documentation":null,"id":1601,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":1600,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1597,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":1601,"src":"502:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1596,"name":"address","nodeType":"ElementaryTypeName","src":"502:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1599,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":1601,"src":"528:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1598,"name":"uint","nodeType":"ElementaryTypeName","src":"528:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"501:37:6"},"src":"482:57:6"},{"constant":true,"id":1604,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":1663,"src":"579:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1602,"name":"uint24","nodeType":"ElementaryTypeName","src":"579:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":1603,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"614:7:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":1606,"name":"eventContract","nodeType":"VariableDeclaration","scope":1663,"src":"667:26:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1605,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"667:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":1608,"name":"marketFactory","nodeType":"VariableDeclaration","scope":1663,"src":"699:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1607,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"699:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"public"},{"constant":false,"id":1610,"name":"marketMaker","nodeType":"VariableDeclaration","scope":1663,"src":"747:30:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1609,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"747:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":1612,"name":"market","nodeType":"VariableDeclaration","scope":1663,"src":"783:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1611,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"783:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"public"},{"constant":false,"id":1614,"name":"fee","nodeType":"VariableDeclaration","scope":1663,"src":"809:17:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1613,"name":"uint24","nodeType":"ElementaryTypeName","src":"809:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":1616,"name":"funding","nodeType":"VariableDeclaration","scope":1663,"src":"832:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1615,"name":"uint","nodeType":"ElementaryTypeName","src":"832:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1618,"name":"deadline","nodeType":"VariableDeclaration","scope":1663,"src":"857:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1617,"name":"uint","nodeType":"ElementaryTypeName","src":"857:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1620,"name":"finalBalance","nodeType":"VariableDeclaration","scope":1663,"src":"883:24:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1619,"name":"uint","nodeType":"ElementaryTypeName","src":"883:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1624,"name":"contributions","nodeType":"VariableDeclaration","scope":1663,"src":"913:46:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":1623,"keyType":{"id":1621,"name":"address","nodeType":"ElementaryTypeName","src":"922:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"913:25:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":1622,"name":"uint","nodeType":"ElementaryTypeName","src":"933:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":1626,"name":"stage","nodeType":"VariableDeclaration","scope":1663,"src":"965:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1625,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"965:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"CampaignData.Stages","id":1632,"members":[{"id":1627,"name":"AuctionStarted","nodeType":"EnumValue","src":"1013:14:6"},{"id":1628,"name":"AuctionSuccessful","nodeType":"EnumValue","src":"1037:17:6"},{"id":1629,"name":"AuctionFailed","nodeType":"EnumValue","src":"1064:13:6"},{"id":1630,"name":"MarketCreated","nodeType":"EnumValue","src":"1087:13:6"},{"id":1631,"name":"MarketClosed","nodeType":"EnumValue","src":"1110:12:6"}],"name":"Stages","nodeType":"EnumDefinition","src":"991:137:6"},{"body":{"id":1643,"nodeType":"Block","src":"1199:97:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1637,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1262:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1638,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1634,"src":"1271:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1262:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1636,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1254:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1640,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1254:24:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1641,"nodeType":"ExpressionStatement","src":"1254:24:6"},{"id":1642,"nodeType":"PlaceholderStatement","src":"1288:1:6"}]},"documentation":null,"id":1644,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":1635,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1634,"name":"_stage","nodeType":"VariableDeclaration","scope":1644,"src":"1184:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1633,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"1184:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"internal"}],"src":"1183:15:6"},"src":"1167:129:6","visibility":"internal"},{"body":{"id":1661,"nodeType":"Block","src":"1330:122:6","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1653,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1646,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1344:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1647,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1353:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1648,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1353:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1344:30:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1652,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1650,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"1378:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1651,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1389:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1378:14:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1344:48:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1659,"nodeType":"IfStatement","src":"1340:94:6","trueBody":{"expression":{"argumentTypes":null,"id":1657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1654,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1406:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1655,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1414:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1414:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1406:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1658,"nodeType":"ExpressionStatement","src":"1406:28:6"}},{"id":1660,"nodeType":"PlaceholderStatement","src":"1444:1:6"}]},"documentation":null,"id":1662,"name":"timedTransitions","nodeType":"ModifierDefinition","parameters":{"id":1645,"nodeType":"ParameterList","parameters":[],"src":"1327:2:6"},"src":"1302:150:6","visibility":"internal"}],"scope":2012,"src":"219:1235:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1664,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1482:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":1665,"nodeType":"InheritanceSpecifier","src":"1482:5:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1666,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"1489:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1667,"nodeType":"InheritanceSpecifier","src":"1489:12:6"}],"contractDependencies":[1663,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1745,"linearizedBaseContracts":[1745,1663,6701,6673],"name":"CampaignProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":1743,"nodeType":"Block","src":"2109:474:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1716,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1708,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1704,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1698,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1689,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2164:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":1688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2156:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1690,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2156:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1691,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2183:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2156:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1697,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1694,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2212:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}],"id":1693,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2204:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1695,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2204:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1696,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2231:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2204:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:76:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1703,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1700,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2260:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":1699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2252:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1701,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2252:21:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1702,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2277:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2252:26:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:122:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":1707,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1705,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2298:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1706,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1604,"src":"2305:9:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2298:16:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:158:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1711,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1709,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2334:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1710,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2345:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2334:12:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:190:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1713,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"2366:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1714,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2372:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2366:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:225:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1687,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2145:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1717,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2145:237:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1718,"nodeType":"ExpressionStatement","src":"2145:237:6"},{"expression":{"argumentTypes":null,"id":1721,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"2392:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1720,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2408:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"2392:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1722,"nodeType":"ExpressionStatement","src":"2392:30:6"},{"expression":{"argumentTypes":null,"id":1725,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1723,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"2432:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1724,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2448:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"src":"2432:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1726,"nodeType":"ExpressionStatement","src":"2432:30:6"},{"expression":{"argumentTypes":null,"id":1729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1727,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"2472:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1728,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2486:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"2472:26:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":1730,"nodeType":"ExpressionStatement","src":"2472:26:6"},{"expression":{"argumentTypes":null,"id":1733,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1731,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"2508:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1732,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2514:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2508:10:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":1734,"nodeType":"ExpressionStatement","src":"2508:10:6"},{"expression":{"argumentTypes":null,"id":1737,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1735,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"2528:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1736,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2538:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2528:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1738,"nodeType":"ExpressionStatement","src":"2528:18:6"},{"expression":{"argumentTypes":null,"id":1741,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1739,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"2556:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1740,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2567:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2556:20:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1742,"nodeType":"ExpressionStatement","src":"2556:20:6"}]},"documentation":"@dev Constructor validates and sets campaign properties\n @param _eventContract Event contract\n @param _marketFactory Market factory contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _funding Initial funding for market\n @param _deadline Campaign deadline","id":1744,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":1684,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1669,"src":"2081:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":1685,"modifierName":{"argumentTypes":null,"id":1683,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2075:5:6","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2075:14:6"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":1682,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1669,"name":"proxied","nodeType":"VariableDeclaration","scope":1744,"src":"1867:15:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1668,"name":"address","nodeType":"ElementaryTypeName","src":"1867:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1671,"name":"_eventContract","nodeType":"VariableDeclaration","scope":1744,"src":"1892:20:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1670,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1892:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":1673,"name":"_marketFactory","nodeType":"VariableDeclaration","scope":1744,"src":"1922:36:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1672,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"1922:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":1675,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":1744,"src":"1968:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1674,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1968:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":1677,"name":"_fee","nodeType":"VariableDeclaration","scope":1744,"src":"2002:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1676,"name":"uint24","nodeType":"ElementaryTypeName","src":"2002:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":1679,"name":"_funding","nodeType":"VariableDeclaration","scope":1744,"src":"2023:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1678,"name":"uint","nodeType":"ElementaryTypeName","src":"2023:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1681,"name":"_deadline","nodeType":"VariableDeclaration","scope":1744,"src":"2046:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1680,"name":"uint","nodeType":"ElementaryTypeName","src":"2046:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1857:209:6"},"payable":false,"returnParameters":{"id":1686,"nodeType":"ParameterList","parameters":[],"src":"2109:0:6"},"scope":1745,"src":"1846:737:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"1456:1129:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1746,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2715:7:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":1747,"nodeType":"InheritanceSpecifier","src":"2715:7:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1748,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"2724:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1749,"nodeType":"InheritanceSpecifier","src":"2724:12:6"}],"contractDependencies":[1663,6673],"contractKind":"contract","documentation":"@title Campaign contract - Allows to crowdfund a market\n @author Stefan George - ","fullyImplemented":true,"id":2011,"linearizedBaseContracts":[2011,1663,6673],"name":"Campaign","nodeType":"ContractDefinition","nodes":[{"id":1751,"libraryName":{"contractScope":null,"id":1750,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2749:8:6","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2743:21:6","typeName":null},{"body":{"id":1826,"nodeType":"Block","src":"3031:530:6","statements":[{"assignments":[1763],"declarations":[{"constant":false,"id":1763,"name":"raisedAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3041:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1762,"name":"uint","nodeType":"ElementaryTypeName","src":"3041:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1770,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1768,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3103:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1764,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3061:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1765,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3061:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1766,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"3061:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1769,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3041:67:6"},{"assignments":[1772],"declarations":[{"constant":false,"id":1772,"name":"maxAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3118:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1771,"name":"uint","nodeType":"ElementaryTypeName","src":"3118:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1777,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1775,"name":"raisedAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1763,"src":"3147:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1773,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"3135:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"3135:11:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1776,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3135:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3118:42:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1780,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1778,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3174:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1779,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3186:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3174:18:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1785,"nodeType":"IfStatement","src":"3170:54:6","trueBody":{"expression":{"argumentTypes":null,"id":1783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1781,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3206:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1782,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3215:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3206:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1784,"nodeType":"ExpressionStatement","src":"3206:18:6"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1791,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3324:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3324:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1793,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3336:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":1794,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3342:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1787,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3279:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1788,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3279:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1789,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3279:44:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":1795,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:70:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1786,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3271:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3271:79:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1797,"nodeType":"ExpressionStatement","src":"3271:79:6"},{"expression":{"argumentTypes":null,"id":1809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1798,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3360:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1801,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1799,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3374:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1800,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3374:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3360:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1807,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3418:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1802,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3388:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1805,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1803,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3402:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3402:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3388:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"3388:29:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1808,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3388:37:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3360:65:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1810,"nodeType":"ExpressionStatement","src":"3360:65:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1811,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3439:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1812,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3449:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:19:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1819,"nodeType":"IfStatement","src":"3435:69:6","trueBody":{"expression":{"argumentTypes":null,"id":1817,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1814,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"3472:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1815,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3480:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1816,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3480:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"3472:32:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1818,"nodeType":"ExpressionStatement","src":"3472:32:6"}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1821,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3535:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1822,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3535:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1823,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3547:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1820,"name":"CampaignFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1583,"src":"3519:15:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1824,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3519:35:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1825,"nodeType":"EmitStatement","src":"3514:40:6"}]},"documentation":"@dev Allows to contribute to required market funding\n @param amount Amount of collateral tokens","id":1827,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1756,"modifierName":{"argumentTypes":null,"id":1755,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"2971:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2971:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1758,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3004:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1759,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3004:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1760,"modifierName":{"argumentTypes":null,"id":1757,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"2996:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"2996:30:6"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":1754,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1753,"name":"amount","nodeType":"VariableDeclaration","scope":1827,"src":"2935:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1752,"name":"uint","nodeType":"ElementaryTypeName","src":"2935:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2934:13:6"},"payable":false,"returnParameters":{"id":1761,"nodeType":"ParameterList","parameters":[],"src":"3031:0:6"},"scope":2011,"src":"2921:640:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1869,"nodeType":"Block","src":"3770:272:6","statements":[{"expression":{"argumentTypes":null,"id":1843,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1838,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3780:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1839,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3795:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1842,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1840,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3809:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1841,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3809:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3795:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3780:40:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1844,"nodeType":"ExpressionStatement","src":"3780:40:6"},{"expression":{"argumentTypes":null,"id":1850,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1845,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3830:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1848,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1846,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3844:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3844:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3830:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1849,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3858:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3830:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1851,"nodeType":"ExpressionStatement","src":"3830:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1857,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3954:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3954:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1859,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3966:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1853,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3913:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1854,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3913:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1855,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3913:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1860,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:66:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1852,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3905:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1861,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3905:75:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1862,"nodeType":"ExpressionStatement","src":"3905:75:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1864,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4010:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1865,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4010:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1866,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"4022:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1863,"name":"CampaignRefund","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1589,"src":"3995:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3995:40:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1868,"nodeType":"EmitStatement","src":"3990:45:6"}]},"documentation":"@dev Withdraws refund amount\n @return Refund amount","id":1870,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1830,"modifierName":{"argumentTypes":null,"id":1829,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"3675:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3675:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1832,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3708:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1833,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3708:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1834,"modifierName":{"argumentTypes":null,"id":1831,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"3700:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"3700:29:6"}],"name":"refund","nodeType":"FunctionDefinition","parameters":{"id":1828,"nodeType":"ParameterList","parameters":[],"src":"3649:2:6"},"payable":false,"returnParameters":{"id":1837,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1836,"name":"refundAmount","nodeType":"VariableDeclaration","scope":1870,"src":"3747:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1835,"name":"uint","nodeType":"ElementaryTypeName","src":"3747:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3746:19:6"},"scope":2011,"src":"3634:408:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1917,"nodeType":"Block","src":"4276:288:6","statements":[{"expression":{"argumentTypes":null,"id":1888,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1881,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4286:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1884,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4322:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":1885,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"4337:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":1886,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"4350:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"expression":{"argumentTypes":null,"id":1882,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"4295:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1883,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3174,"src":"4295:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$_t_contract$_StandardMarket_$3112_$","typeString":"function (contract Event,contract MarketMaker,uint24) external returns (contract StandardMarket)"}},"id":1887,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4295:59:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"4286:68:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1889,"nodeType":"ExpressionStatement","src":"4286:68:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1895,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4412:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":1896,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4420:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1891,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4372:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1892,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4372:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1893,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"4372:39:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1897,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:56:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1890,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4364:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1898,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4364:65:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1899,"nodeType":"ExpressionStatement","src":"4364:65:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1903,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4451:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1900,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4439:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1902,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"4439:11:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":1904,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4439:20:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1905,"nodeType":"ExpressionStatement","src":"4439:20:6"},{"expression":{"argumentTypes":null,"id":1909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1906,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"4469:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1907,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4477:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1908,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4477:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"4469:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1910,"nodeType":"ExpressionStatement","src":"4469:28:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1912,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4527:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1911,"name":"MarketCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1593,"src":"4512:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_Market_$2238_$returns$__$","typeString":"function (contract Market)"}},"id":1913,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4512:22:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1914,"nodeType":"EmitStatement","src":"4507:27:6"},{"expression":{"argumentTypes":null,"id":1915,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4551:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"functionReturnParameters":1880,"id":1916,"nodeType":"Return","src":"4544:13:6"}]},"documentation":"@dev Allows to create market after successful funding\n @return Market address","id":1918,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1873,"modifierName":{"argumentTypes":null,"id":1872,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"4188:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4188:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1875,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4221:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1876,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4221:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1877,"modifierName":{"argumentTypes":null,"id":1874,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4213:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4213:33:6"}],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":1871,"nodeType":"ParameterList","parameters":[],"src":"4162:2:6"},"payable":false,"returnParameters":{"id":1880,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1879,"name":"","nodeType":"VariableDeclaration","scope":1918,"src":"4264:6:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1878,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4264:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"4263:8:6"},"scope":2011,"src":"4141:423:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1963,"nodeType":"Block","src":"4756:329:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1926,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4815:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4815:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":1928,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4815:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1925,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4807:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1929,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4807:37:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1930,"nodeType":"ExpressionStatement","src":"4807:37:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1931,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4854:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1933,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4854:12:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":1934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4854:14:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1935,"nodeType":"ExpressionStatement","src":"4854:14:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1936,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4878:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4878:19:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1939,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4878:21:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1940,"nodeType":"ExpressionStatement","src":"4878:21:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1941,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4909:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4909:28:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1944,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4909:30:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1945,"nodeType":"ExpressionStatement","src":"4909:30:6"},{"expression":{"argumentTypes":null,"id":1953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1946,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"4949:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1951,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"5006:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1947,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4964:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4964:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1949,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1950,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4964:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1952,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4949:62:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1954,"nodeType":"ExpressionStatement","src":"4949:62:6"},{"expression":{"argumentTypes":null,"id":1958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1955,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"5021:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1956,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5029:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1957,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5029:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"5021:27:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1959,"nodeType":"ExpressionStatement","src":"5021:27:6"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":1960,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1595,"src":"5063:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":1961,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5063:15:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1962,"nodeType":"EmitStatement","src":"5058:20:6"}]},"documentation":"@dev Allows to withdraw fees from market contract to campaign contract\n @return Fee amount","id":1964,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1921,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4730:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1922,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4730:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1923,"modifierName":{"argumentTypes":null,"id":1920,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4722:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4722:29:6"}],"name":"closeMarket","nodeType":"FunctionDefinition","parameters":{"id":1919,"nodeType":"ParameterList","parameters":[],"src":"4696:2:6"},"payable":false,"returnParameters":{"id":1924,"nodeType":"ParameterList","parameters":[],"src":"4756:0:6"},"scope":2011,"src":"4676:409:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":2009,"nodeType":"Block","src":"5301:280:6","statements":[{"expression":{"argumentTypes":null,"id":1983,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1973,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5311:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1976,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5335:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1979,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1977,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5349:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5349:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5335:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1974,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"5318:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1975,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5318:16:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1980,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5318:43:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1981,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"5364:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5318:53:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5311:60:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1984,"nodeType":"ExpressionStatement","src":"5311:60:6"},{"expression":{"argumentTypes":null,"id":1990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1985,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5381:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1988,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1986,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5395:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1987,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5395:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5381:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1989,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5409:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5381:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1991,"nodeType":"ExpressionStatement","src":"5381:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1997,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5510:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1998,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5510:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1999,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5522:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1993,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"5469:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1994,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"5469:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1996,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5469:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2000,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:58:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1992,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5461:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2001,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5461:67:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2002,"nodeType":"ExpressionStatement","src":"5461:67:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2004,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5557:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5557:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2006,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5569:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2003,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1601,"src":"5543:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":2007,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:31:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2008,"nodeType":"EmitStatement","src":"5538:36:6"}]},"documentation":"@dev Allows to withdraw fees from campaign contract to contributor\n @return Fee amount","id":2010,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1967,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5248:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1968,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5248:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1969,"modifierName":{"argumentTypes":null,"id":1966,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"5240:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"5240:28:6"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":1965,"nodeType":"ParameterList","parameters":[],"src":"5214:2:6"},"payable":false,"returnParameters":{"id":1972,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1971,"name":"fees","nodeType":"VariableDeclaration","scope":2010,"src":"5286:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1970,"name":"uint","nodeType":"ElementaryTypeName","src":"5286:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5285:11:6"},"scope":2011,"src":"5193:388:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"2694:2889:6"}],"src":"0:5584:6"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Campaign.sol","exportedSymbols":{"Campaign":[2011],"CampaignData":[1663],"CampaignProxy":[1745]},"id":2012,"nodeType":"SourceUnit","nodes":[{"id":1573,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:6"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":1574,"nodeType":"ImportDirective","scope":2012,"sourceUnit":385,"src":"25:29:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","file":"../Markets/StandardMarketFactory.sol","id":1575,"nodeType":"ImportDirective","scope":2012,"sourceUnit":3176,"src":"55:46:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":1576,"nodeType":"ImportDirective","scope":2012,"sourceUnit":7190,"src":"102:59:6","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":1577,"nodeType":"ImportDirective","scope":2012,"sourceUnit":6702,"src":"162:55:6","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1663,"linearizedBaseContracts":[1663],"name":"CampaignData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":1583,"name":"CampaignFunding","nodeType":"EventDefinition","parameters":{"id":1582,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1579,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1583,"src":"300:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1578,"name":"address","nodeType":"ElementaryTypeName","src":"300:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1581,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":1583,"src":"324:12:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1580,"name":"uint","nodeType":"ElementaryTypeName","src":"324:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:38:6"},"src":"278:60:6"},{"anonymous":false,"documentation":null,"id":1589,"name":"CampaignRefund","nodeType":"EventDefinition","parameters":{"id":1588,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1585,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":1589,"src":"364:22:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1584,"name":"address","nodeType":"ElementaryTypeName","src":"364:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1587,"indexed":false,"name":"refund","nodeType":"VariableDeclaration","scope":1589,"src":"388:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1586,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"363:37:6"},"src":"343:58:6"},{"anonymous":false,"documentation":null,"id":1593,"name":"MarketCreation","nodeType":"EventDefinition","parameters":{"id":1592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1591,"indexed":true,"name":"market","nodeType":"VariableDeclaration","scope":1593,"src":"427:21:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1590,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"427:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"426:23:6"},"src":"406:44:6"},{"anonymous":false,"documentation":null,"id":1595,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":1594,"nodeType":"ParameterList","parameters":[],"src":"474:2:6"},"src":"455:22:6"},{"anonymous":false,"documentation":null,"id":1601,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":1600,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1597,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":1601,"src":"502:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1596,"name":"address","nodeType":"ElementaryTypeName","src":"502:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1599,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":1601,"src":"528:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1598,"name":"uint","nodeType":"ElementaryTypeName","src":"528:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"501:37:6"},"src":"482:57:6"},{"constant":true,"id":1604,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":1663,"src":"579:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1602,"name":"uint24","nodeType":"ElementaryTypeName","src":"579:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":1603,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"614:7:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":1606,"name":"eventContract","nodeType":"VariableDeclaration","scope":1663,"src":"667:26:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1605,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"667:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":1608,"name":"marketFactory","nodeType":"VariableDeclaration","scope":1663,"src":"699:42:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1607,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"699:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"public"},{"constant":false,"id":1610,"name":"marketMaker","nodeType":"VariableDeclaration","scope":1663,"src":"747:30:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1609,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"747:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":1612,"name":"market","nodeType":"VariableDeclaration","scope":1663,"src":"783:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1611,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"783:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"public"},{"constant":false,"id":1614,"name":"fee","nodeType":"VariableDeclaration","scope":1663,"src":"809:17:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1613,"name":"uint24","nodeType":"ElementaryTypeName","src":"809:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":1616,"name":"funding","nodeType":"VariableDeclaration","scope":1663,"src":"832:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1615,"name":"uint","nodeType":"ElementaryTypeName","src":"832:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1618,"name":"deadline","nodeType":"VariableDeclaration","scope":1663,"src":"857:20:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1617,"name":"uint","nodeType":"ElementaryTypeName","src":"857:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1620,"name":"finalBalance","nodeType":"VariableDeclaration","scope":1663,"src":"883:24:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1619,"name":"uint","nodeType":"ElementaryTypeName","src":"883:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":1624,"name":"contributions","nodeType":"VariableDeclaration","scope":1663,"src":"913:46:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":1623,"keyType":{"id":1621,"name":"address","nodeType":"ElementaryTypeName","src":"922:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"913:25:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":1622,"name":"uint","nodeType":"ElementaryTypeName","src":"933:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":1626,"name":"stage","nodeType":"VariableDeclaration","scope":1663,"src":"965:19:6","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1625,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"965:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"CampaignData.Stages","id":1632,"members":[{"id":1627,"name":"AuctionStarted","nodeType":"EnumValue","src":"1013:14:6"},{"id":1628,"name":"AuctionSuccessful","nodeType":"EnumValue","src":"1037:17:6"},{"id":1629,"name":"AuctionFailed","nodeType":"EnumValue","src":"1064:13:6"},{"id":1630,"name":"MarketCreated","nodeType":"EnumValue","src":"1087:13:6"},{"id":1631,"name":"MarketClosed","nodeType":"EnumValue","src":"1110:12:6"}],"name":"Stages","nodeType":"EnumDefinition","src":"991:137:6"},{"body":{"id":1643,"nodeType":"Block","src":"1199:97:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1637,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1262:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1638,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1634,"src":"1271:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1262:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1636,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1254:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1640,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1254:24:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1641,"nodeType":"ExpressionStatement","src":"1254:24:6"},{"id":1642,"nodeType":"PlaceholderStatement","src":"1288:1:6"}]},"documentation":null,"id":1644,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":1635,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1634,"name":"_stage","nodeType":"VariableDeclaration","scope":1644,"src":"1184:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"typeName":{"contractScope":null,"id":1633,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":1632,"src":"1184:6:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"value":null,"visibility":"internal"}],"src":"1183:15:6"},"src":"1167:129:6","visibility":"internal"},{"body":{"id":1661,"nodeType":"Block","src":"1330:122:6","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1653,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"},"id":1649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1646,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1344:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1647,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1353:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1648,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1353:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1344:30:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1652,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1650,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"1378:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1651,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1389:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1378:14:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1344:48:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1659,"nodeType":"IfStatement","src":"1340:94:6","trueBody":{"expression":{"argumentTypes":null,"id":1657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1654,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"1406:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1655,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"1414:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1414:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"1406:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1658,"nodeType":"ExpressionStatement","src":"1406:28:6"}},{"id":1660,"nodeType":"PlaceholderStatement","src":"1444:1:6"}]},"documentation":null,"id":1662,"name":"timedTransitions","nodeType":"ModifierDefinition","parameters":{"id":1645,"nodeType":"ParameterList","parameters":[],"src":"1327:2:6"},"src":"1302:150:6","visibility":"internal"}],"scope":2012,"src":"219:1235:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1664,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1482:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":1665,"nodeType":"InheritanceSpecifier","src":"1482:5:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1666,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"1489:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1667,"nodeType":"InheritanceSpecifier","src":"1489:12:6"}],"contractDependencies":[1663,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":1745,"linearizedBaseContracts":[1745,1663,6701,6673],"name":"CampaignProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":1743,"nodeType":"Block","src":"2109:474:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1716,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1708,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1704,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1698,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1689,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2164:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":1688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2156:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1690,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2156:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1691,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2183:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2156:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1697,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1694,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2212:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}],"id":1693,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2204:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1695,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2204:23:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1696,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2231:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2204:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:76:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":1703,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1700,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2260:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":1699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2252:7:6","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":1701,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2252:21:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1702,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2277:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2252:26:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:122:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":1707,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1705,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2298:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1706,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1604,"src":"2305:9:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2298:16:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:158:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1711,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1709,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2334:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1710,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2345:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2334:12:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:190:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1713,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"2366:3:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1714,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2372:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2366:15:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2156:225:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1687,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2145:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1717,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2145:237:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1718,"nodeType":"ExpressionStatement","src":"2145:237:6"},{"expression":{"argumentTypes":null,"id":1721,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"2392:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1720,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1671,"src":"2408:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"2392:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1722,"nodeType":"ExpressionStatement","src":"2392:30:6"},{"expression":{"argumentTypes":null,"id":1725,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1723,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"2432:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1724,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1673,"src":"2448:14:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"src":"2432:30:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1726,"nodeType":"ExpressionStatement","src":"2432:30:6"},{"expression":{"argumentTypes":null,"id":1729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1727,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"2472:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1728,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1675,"src":"2486:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"2472:26:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":1730,"nodeType":"ExpressionStatement","src":"2472:26:6"},{"expression":{"argumentTypes":null,"id":1733,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1731,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"2508:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1732,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1677,"src":"2514:4:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2508:10:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":1734,"nodeType":"ExpressionStatement","src":"2508:10:6"},{"expression":{"argumentTypes":null,"id":1737,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1735,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"2528:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1736,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1679,"src":"2538:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2528:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1738,"nodeType":"ExpressionStatement","src":"2528:18:6"},{"expression":{"argumentTypes":null,"id":1741,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1739,"name":"deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1618,"src":"2556:8:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1740,"name":"_deadline","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1681,"src":"2567:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2556:20:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1742,"nodeType":"ExpressionStatement","src":"2556:20:6"}]},"documentation":"@dev Constructor validates and sets campaign properties\n @param _eventContract Event contract\n @param _marketFactory Market factory contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _funding Initial funding for market\n @param _deadline Campaign deadline","id":1744,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":1684,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1669,"src":"2081:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":1685,"modifierName":{"argumentTypes":null,"id":1683,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2075:5:6","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2075:14:6"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":1682,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1669,"name":"proxied","nodeType":"VariableDeclaration","scope":1744,"src":"1867:15:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":1668,"name":"address","nodeType":"ElementaryTypeName","src":"1867:7:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":1671,"name":"_eventContract","nodeType":"VariableDeclaration","scope":1744,"src":"1892:20:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":1670,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1892:5:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":1673,"name":"_marketFactory","nodeType":"VariableDeclaration","scope":1744,"src":"1922:36:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"},"typeName":{"contractScope":null,"id":1672,"name":"StandardMarketFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3175,"src":"1922:21:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":1675,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":1744,"src":"1968:24:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":1674,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1968:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":1677,"name":"_fee","nodeType":"VariableDeclaration","scope":1744,"src":"2002:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":1676,"name":"uint24","nodeType":"ElementaryTypeName","src":"2002:6:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":1679,"name":"_funding","nodeType":"VariableDeclaration","scope":1744,"src":"2023:13:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1678,"name":"uint","nodeType":"ElementaryTypeName","src":"2023:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1681,"name":"_deadline","nodeType":"VariableDeclaration","scope":1744,"src":"2046:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1680,"name":"uint","nodeType":"ElementaryTypeName","src":"2046:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1857:209:6"},"payable":false,"returnParameters":{"id":1686,"nodeType":"ParameterList","parameters":[],"src":"2109:0:6"},"scope":1745,"src":"1846:737:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"1456:1129:6"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":1746,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2715:7:6","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":1747,"nodeType":"InheritanceSpecifier","src":"2715:7:6"},{"arguments":null,"baseName":{"contractScope":null,"id":1748,"name":"CampaignData","nodeType":"UserDefinedTypeName","referencedDeclaration":1663,"src":"2724:12:6","typeDescriptions":{"typeIdentifier":"t_contract$_CampaignData_$1663","typeString":"contract CampaignData"}},"id":1749,"nodeType":"InheritanceSpecifier","src":"2724:12:6"}],"contractDependencies":[1663,6673],"contractKind":"contract","documentation":"@title Campaign contract - Allows to crowdfund a market\n @author Stefan George - ","fullyImplemented":true,"id":2011,"linearizedBaseContracts":[2011,1663,6673],"name":"Campaign","nodeType":"ContractDefinition","nodes":[{"id":1751,"libraryName":{"contractScope":null,"id":1750,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2749:8:6","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2743:21:6","typeName":null},{"body":{"id":1826,"nodeType":"Block","src":"3031:530:6","statements":[{"assignments":[1763],"declarations":[{"constant":false,"id":1763,"name":"raisedAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3041:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1762,"name":"uint","nodeType":"ElementaryTypeName","src":"3041:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1770,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1768,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3103:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1764,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3061:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1765,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3061:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1766,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"3061:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1769,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3061:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3041:67:6"},{"assignments":[1772],"declarations":[{"constant":false,"id":1772,"name":"maxAmount","nodeType":"VariableDeclaration","scope":1827,"src":"3118:14:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1771,"name":"uint","nodeType":"ElementaryTypeName","src":"3118:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1777,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1775,"name":"raisedAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1763,"src":"3147:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1773,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"3135:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"3135:11:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1776,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3135:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3118:42:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1780,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1778,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3174:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1779,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3186:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3174:18:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1785,"nodeType":"IfStatement","src":"3170:54:6","trueBody":{"expression":{"argumentTypes":null,"id":1783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1781,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3206:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1782,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3215:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3206:18:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1784,"nodeType":"ExpressionStatement","src":"3206:18:6"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1791,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3324:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3324:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1793,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"3336:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}},{"argumentTypes":null,"id":1794,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3342:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1787,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3279:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1788,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3279:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1789,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3279:44:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":1795,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3279:70:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1786,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3271:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3271:79:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1797,"nodeType":"ExpressionStatement","src":"3271:79:6"},{"expression":{"argumentTypes":null,"id":1809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1798,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3360:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1801,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1799,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3374:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1800,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3374:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3360:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1807,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3418:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1802,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3388:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1805,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1803,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3402:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3402:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3388:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"3388:29:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1808,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3388:37:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3360:65:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1810,"nodeType":"ExpressionStatement","src":"3360:65:6"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1811,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3439:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1812,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1772,"src":"3449:9:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:19:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1819,"nodeType":"IfStatement","src":"3435:69:6","trueBody":{"expression":{"argumentTypes":null,"id":1817,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1814,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"3472:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1815,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3480:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1816,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3480:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"3472:32:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1818,"nodeType":"ExpressionStatement","src":"3472:32:6"}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1821,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3535:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1822,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3535:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1823,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1753,"src":"3547:6:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1820,"name":"CampaignFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1583,"src":"3519:15:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1824,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3519:35:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1825,"nodeType":"EmitStatement","src":"3514:40:6"}]},"documentation":"@dev Allows to contribute to required market funding\n @param amount Amount of collateral tokens","id":1827,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1756,"modifierName":{"argumentTypes":null,"id":1755,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"2971:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2971:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1758,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3004:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1759,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionStarted","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3004:21:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1760,"modifierName":{"argumentTypes":null,"id":1757,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"2996:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"2996:30:6"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":1754,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1753,"name":"amount","nodeType":"VariableDeclaration","scope":1827,"src":"2935:11:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1752,"name":"uint","nodeType":"ElementaryTypeName","src":"2935:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2934:13:6"},"payable":false,"returnParameters":{"id":1761,"nodeType":"ParameterList","parameters":[],"src":"3031:0:6"},"scope":2011,"src":"2921:640:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1869,"nodeType":"Block","src":"3770:272:6","statements":[{"expression":{"argumentTypes":null,"id":1843,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1838,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3780:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1839,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3795:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1842,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1840,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3809:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1841,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3809:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3795:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3780:40:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1844,"nodeType":"ExpressionStatement","src":"3780:40:6"},{"expression":{"argumentTypes":null,"id":1850,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1845,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"3830:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1848,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1846,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3844:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3844:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3830:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1849,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3858:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3830:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1851,"nodeType":"ExpressionStatement","src":"3830:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1857,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3954:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3954:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1859,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"3966:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1853,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"3913:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1854,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3913:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1855,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3913:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1860,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:66:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1852,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3905:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1861,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3905:75:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1862,"nodeType":"ExpressionStatement","src":"3905:75:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1864,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4010:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1865,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4010:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1866,"name":"refundAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1836,"src":"4022:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1863,"name":"CampaignRefund","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1589,"src":"3995:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":1867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3995:40:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1868,"nodeType":"EmitStatement","src":"3990:45:6"}]},"documentation":"@dev Withdraws refund amount\n @return Refund amount","id":1870,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1830,"modifierName":{"argumentTypes":null,"id":1829,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"3675:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3675:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1832,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"3708:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1833,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionFailed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3708:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1834,"modifierName":{"argumentTypes":null,"id":1831,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"3700:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"3700:29:6"}],"name":"refund","nodeType":"FunctionDefinition","parameters":{"id":1828,"nodeType":"ParameterList","parameters":[],"src":"3649:2:6"},"payable":false,"returnParameters":{"id":1837,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1836,"name":"refundAmount","nodeType":"VariableDeclaration","scope":1870,"src":"3747:17:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1835,"name":"uint","nodeType":"ElementaryTypeName","src":"3747:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3746:19:6"},"scope":2011,"src":"3634:408:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1917,"nodeType":"Block","src":"4276:288:6","statements":[{"expression":{"argumentTypes":null,"id":1888,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1881,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4286:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1884,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4322:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":1885,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1610,"src":"4337:11:6","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":1886,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1614,"src":"4350:3:6","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"expression":{"argumentTypes":null,"id":1882,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1608,"src":"4295:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketFactory_$3175","typeString":"contract StandardMarketFactory"}},"id":1883,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3174,"src":"4295:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$_t_contract$_StandardMarket_$3112_$","typeString":"function (contract Event,contract MarketMaker,uint24) external returns (contract StandardMarket)"}},"id":1887,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4295:59:6","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"4286:68:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1889,"nodeType":"ExpressionStatement","src":"4286:68:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1895,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4412:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":1896,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4420:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1891,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4372:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1892,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4372:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1893,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"4372:39:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":1897,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4372:56:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1890,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4364:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1898,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4364:65:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1899,"nodeType":"ExpressionStatement","src":"4364:65:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1903,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"4451:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1900,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4439:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1902,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"4439:11:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":1904,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4439:20:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1905,"nodeType":"ExpressionStatement","src":"4439:20:6"},{"expression":{"argumentTypes":null,"id":1909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1906,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"4469:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1907,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4477:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1908,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4477:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"4469:28:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1910,"nodeType":"ExpressionStatement","src":"4469:28:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1912,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4527:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1911,"name":"MarketCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1593,"src":"4512:14:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_Market_$2238_$returns$__$","typeString":"function (contract Market)"}},"id":1913,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4512:22:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1914,"nodeType":"EmitStatement","src":"4507:27:6"},{"expression":{"argumentTypes":null,"id":1915,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4551:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"functionReturnParameters":1880,"id":1916,"nodeType":"Return","src":"4544:13:6"}]},"documentation":"@dev Allows to create market after successful funding\n @return Market address","id":1918,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":1873,"modifierName":{"argumentTypes":null,"id":1872,"name":"timedTransitions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1662,"src":"4188:16:6","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4188:16:6"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1875,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4221:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1876,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"AuctionSuccessful","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4221:24:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1877,"modifierName":{"argumentTypes":null,"id":1874,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4213:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4213:33:6"}],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":1871,"nodeType":"ParameterList","parameters":[],"src":"4162:2:6"},"payable":false,"returnParameters":{"id":1880,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1879,"name":"","nodeType":"VariableDeclaration","scope":1918,"src":"4264:6:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1878,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4264:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"4263:8:6"},"scope":2011,"src":"4141:423:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":1963,"nodeType":"Block","src":"4756:329:6","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1926,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4815:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4815:26:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":1928,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4815:28:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1925,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4807:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1929,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4807:37:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1930,"nodeType":"ExpressionStatement","src":"4807:37:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1931,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4854:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1933,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4854:12:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":1934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4854:14:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1935,"nodeType":"ExpressionStatement","src":"4854:14:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1936,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1612,"src":"4878:6:6","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4878:19:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1939,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4878:21:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1940,"nodeType":"ExpressionStatement","src":"4878:21:6"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1941,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4909:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4909:28:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":1944,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4909:30:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1945,"nodeType":"ExpressionStatement","src":"4909:30:6"},{"expression":{"argumentTypes":null,"id":1953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1946,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"4949:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1951,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7693,"src":"5006:4:6","typeDescriptions":{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Campaign_$2011","typeString":"contract Campaign"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1947,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"4964:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4964:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1949,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1950,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4964:41:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":1952,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4964:47:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4949:62:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1954,"nodeType":"ExpressionStatement","src":"4949:62:6"},{"expression":{"argumentTypes":null,"id":1958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1955,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1626,"src":"5021:5:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1956,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5029:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1957,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5029:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"src":"5021:27:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}},"id":1959,"nodeType":"ExpressionStatement","src":"5021:27:6"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":1960,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1595,"src":"5063:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":1961,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5063:15:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1962,"nodeType":"EmitStatement","src":"5058:20:6"}]},"documentation":"@dev Allows to withdraw fees from market contract to campaign contract\n @return Fee amount","id":1964,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1921,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"4730:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1922,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4730:20:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1923,"modifierName":{"argumentTypes":null,"id":1920,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"4722:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"4722:29:6"}],"name":"closeMarket","nodeType":"FunctionDefinition","parameters":{"id":1919,"nodeType":"ParameterList","parameters":[],"src":"4696:2:6"},"payable":false,"returnParameters":{"id":1924,"nodeType":"ParameterList","parameters":[],"src":"4756:0:6"},"scope":2011,"src":"4676:409:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":2009,"nodeType":"Block","src":"5301:280:6","statements":[{"expression":{"argumentTypes":null,"id":1983,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1973,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5311:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1976,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5335:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1979,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1977,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5349:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5349:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5335:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1974,"name":"finalBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1620,"src":"5318:12:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1975,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5318:16:6","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1980,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5318:43:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1981,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1616,"src":"5364:7:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5318:53:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5311:60:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1984,"nodeType":"ExpressionStatement","src":"5311:60:6"},{"expression":{"argumentTypes":null,"id":1990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1985,"name":"contributions","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1624,"src":"5381:13:6","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":1988,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1986,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5395:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1987,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5395:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5381:25:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":1989,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5409:1:6","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5381:29:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1991,"nodeType":"ExpressionStatement","src":"5381:29:6"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1997,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5510:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":1998,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5510:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":1999,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5522:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1993,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1606,"src":"5469:13:6","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1994,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"5469:29:6","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":1995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:31:6","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":1996,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5469:40:6","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2000,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5469:58:6","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1992,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5461:7:6","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2001,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5461:67:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2002,"nodeType":"ExpressionStatement","src":"5461:67:6"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2004,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5557:3:6","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5557:10:6","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2006,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1971,"src":"5569:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2003,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1601,"src":"5543:13:6","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":2007,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:31:6","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2008,"nodeType":"EmitStatement","src":"5538:36:6"}]},"documentation":"@dev Allows to withdraw fees from campaign contract to contributor\n @return Fee amount","id":2010,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1967,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1632,"src":"5248:6:6","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$1632_$","typeString":"type(enum CampaignData.Stages)"}},"id":1968,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5248:19:6","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$1632","typeString":"enum CampaignData.Stages"}}],"id":1969,"modifierName":{"argumentTypes":null,"id":1966,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1644,"src":"5240:7:6","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$1632_$","typeString":"modifier (enum CampaignData.Stages)"}},"nodeType":"ModifierInvocation","src":"5240:28:6"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":1965,"nodeType":"ParameterList","parameters":[],"src":"5214:2:6"},"payable":false,"returnParameters":{"id":1972,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1971,"name":"fees","nodeType":"VariableDeclaration","scope":2010,"src":"5286:9:6","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1970,"name":"uint","nodeType":"ElementaryTypeName","src":"5286:4:6","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5285:11:6"},"scope":2011,"src":"5193:388:6","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":2012,"src":"2694:2889:6"}],"src":"0:5584:6"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.995Z"}; /***/ }), @@ -165,10 +230,21 @@ module.exports = {"contract_name":"CampaignFactory","abi":[{"constant":false,"in /*!************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CategoricalEvent.json ***! \************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"CategoricalEvent","abi":[{"constant":false,"inputs":[],"name":"setOutcome","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"collateralTokenCount","type":"uint256"}],"name":"buyAllOutcomes","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"getOutcomeTokenDistribution","outputs":[{"name":"outcomeTokenDistribution","type":"uint256[]"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenCount","type":"uint256"}],"name":"sellAllOutcomes","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcomeCount","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"outcomeTokens","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"redeemWinnings","outputs":[{"name":"winnings","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"collateralToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getEventHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcomeTokens","outputs":[{"name":"","type":"address[]"}],"payable":false,"type":"function"},{"inputs":[{"name":"_collateralToken","type":"address"},{"name":"_oracle","type":"address"},{"name":"outcomeCount","type":"uint8"}],"payable":false,"type":"constructor"},{"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"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263313}; +module.exports = {"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"}],"bytecode":"0x608060405234801561001057600080fd5b506113c3806100206000396000f3006080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d146100d557806327793f87146100ec57806328da850b1461011757806369c19d4c146101445780636fb1edcd146101dc5780637dc0d1d0146102095780637dc8f086146102605780638abe59ea14610291578063a619486e146102fe578063ad0b2bec14610355578063b2016bd414610380578063ccdf68f3146103d7578063e96e595014610406578063f21a146814610439575b600080fd5b3480156100e157600080fd5b506100ea6104a5565b005b3480156100f857600080fd5b506101016106a7565b6040518082815260200191505060405180910390f35b34801561012357600080fd5b50610142600480360381019080803590602001909291905050506106ad565b005b34801561015057600080fd5b50610185600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610959565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156101c85780820151818401526020810190506101ad565b505050509050019250505060405180910390f35b3480156101e857600080fd5b5061020760048036038101908080359060200190929190505050610ae9565b005b34801561021557600080fd5b5061021e610d60565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026c57600080fd5b50610275610d86565b604051808260ff1660ff16815260200191505060405180910390f35b34801561029d57600080fd5b506102bc60048036038101908080359060200190929190505050610d93565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561030a57600080fd5b50610313610dd1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036157600080fd5b5061036a610df6565b6040518082815260200191505060405180910390f35b34801561038c57600080fd5b50610395611178565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103e357600080fd5b506103ec61119e565b604051808215151515815260200191505060405180910390f35b34801561041257600080fd5b5061041b6111b1565b60405180826000191660001916815260200191505060405180910390f35b34801561044557600080fd5b5061044e611309565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610491578082015181840152602081019050610476565b505050509050019250505060405180910390f35b600260149054906101000a900460ff1615801561057f5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561054357600080fd5b505af1158015610557573d6000803e3d6000fd5b505050506040513d602081101561056d57600080fd5b81019080805190602001909291905050505b151561058a57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561061057600080fd5b505af1158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b81019080805190602001909291905050506003819055506001600260146101000a81548160ff0219169083151502179055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb716003546040518082815260200191505060405180910390a1565b60035481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156107a857600080fd5b505af11580156107bc573d6000803e3d6000fd5b505050506040513d60208110156107d257600080fd5b810190808051906020019092919050505015156107ee57600080fd5b600090505b6004805490508160ff1610156109075760048160ff1681548110151561081557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663867904b433846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156108e257600080fd5b505af11580156108f6573d6000803e3d6000fd5b5050505080806001019150506107f3565b3373ffffffffffffffffffffffffffffffffffffffff167fad2a02292986148558019ae4abf172732228e32e131a91d3fa7e0cada61932c0836040518082815260200191505060405180910390a25050565b606060006004805490506040519080825280602002602001820160405280156109915781602001602082028038833980820191505090505b509150600090505b81518160ff161015610ae35760048160ff168154811015156109b757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d6020811015610aa657600080fd5b8101908080519060200190929190505050828260ff16815181101515610ac857fe5b90602001906020020181815250508080600101915050610999565b50919050565b60008090505b6004805490508160ff161015610c035760048160ff16815481101515610b1157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610bde57600080fd5b505af1158015610bf2573d6000803e3d6000fd5b505050508080600101915050610aef565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610cc857600080fd5b505af1158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b81019080805190602001909291905050501515610d0e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7ac9271efd660c24459c447459e46f7366d2b4a692e572f108619d0d7273fcc5836040518082815260200191505060405180910390a25050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600480549050905090565b600481815481101515610da257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260149054906101000a900460ff161515610e1357600080fd5b6004600354815481101515610e2457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610ee957600080fd5b505af1158015610efd573d6000803e3d6000fd5b505050506040513d6020811015610f1357600080fd5b810190808051906020019092919050505090506004600354815481101515610f3757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156110e157600080fd5b505af11580156110f5573d6000803e3d6000fd5b505050506040513d602081101561110b57600080fd5b8101908080519060200190929190505050151561112757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f2fe921bb50a459800ae7eae7c0124e9e875094a539eb7dc5b3f728017347e0fb826040518082815260200191505060405180910390a290565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600480549050604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040516020818303038152906040526040518082805190602001908083835b6020831015156112d757805182526020820191506020810190506020830392506112b2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020905090565b6060600480548060200260200160405190810160405280929190818152602001828054801561138d57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611343575b50505050509050905600a165627a7a723058200a389ca23bc5d453396ece6ed2e6a983910435a3d7a12ef12aa4793fbd75b4400029","deployedBytecode":"0x6080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d146100d557806327793f87146100ec57806328da850b1461011757806369c19d4c146101445780636fb1edcd146101dc5780637dc0d1d0146102095780637dc8f086146102605780638abe59ea14610291578063a619486e146102fe578063ad0b2bec14610355578063b2016bd414610380578063ccdf68f3146103d7578063e96e595014610406578063f21a146814610439575b600080fd5b3480156100e157600080fd5b506100ea6104a5565b005b3480156100f857600080fd5b506101016106a7565b6040518082815260200191505060405180910390f35b34801561012357600080fd5b50610142600480360381019080803590602001909291905050506106ad565b005b34801561015057600080fd5b50610185600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610959565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156101c85780820151818401526020810190506101ad565b505050509050019250505060405180910390f35b3480156101e857600080fd5b5061020760048036038101908080359060200190929190505050610ae9565b005b34801561021557600080fd5b5061021e610d60565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026c57600080fd5b50610275610d86565b604051808260ff1660ff16815260200191505060405180910390f35b34801561029d57600080fd5b506102bc60048036038101908080359060200190929190505050610d93565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561030a57600080fd5b50610313610dd1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036157600080fd5b5061036a610df6565b6040518082815260200191505060405180910390f35b34801561038c57600080fd5b50610395611178565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103e357600080fd5b506103ec61119e565b604051808215151515815260200191505060405180910390f35b34801561041257600080fd5b5061041b6111b1565b60405180826000191660001916815260200191505060405180910390f35b34801561044557600080fd5b5061044e611309565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610491578082015181840152602081019050610476565b505050509050019250505060405180910390f35b600260149054906101000a900460ff1615801561057f5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561054357600080fd5b505af1158015610557573d6000803e3d6000fd5b505050506040513d602081101561056d57600080fd5b81019080805190602001909291905050505b151561058a57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561061057600080fd5b505af1158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b81019080805190602001909291905050506003819055506001600260146101000a81548160ff0219169083151502179055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb716003546040518082815260200191505060405180910390a1565b60035481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156107a857600080fd5b505af11580156107bc573d6000803e3d6000fd5b505050506040513d60208110156107d257600080fd5b810190808051906020019092919050505015156107ee57600080fd5b600090505b6004805490508160ff1610156109075760048160ff1681548110151561081557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663867904b433846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156108e257600080fd5b505af11580156108f6573d6000803e3d6000fd5b5050505080806001019150506107f3565b3373ffffffffffffffffffffffffffffffffffffffff167fad2a02292986148558019ae4abf172732228e32e131a91d3fa7e0cada61932c0836040518082815260200191505060405180910390a25050565b606060006004805490506040519080825280602002602001820160405280156109915781602001602082028038833980820191505090505b509150600090505b81518160ff161015610ae35760048160ff168154811015156109b757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d6020811015610aa657600080fd5b8101908080519060200190929190505050828260ff16815181101515610ac857fe5b90602001906020020181815250508080600101915050610999565b50919050565b60008090505b6004805490508160ff161015610c035760048160ff16815481101515610b1157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610bde57600080fd5b505af1158015610bf2573d6000803e3d6000fd5b505050508080600101915050610aef565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610cc857600080fd5b505af1158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b81019080805190602001909291905050501515610d0e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7ac9271efd660c24459c447459e46f7366d2b4a692e572f108619d0d7273fcc5836040518082815260200191505060405180910390a25050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600480549050905090565b600481815481101515610da257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260149054906101000a900460ff161515610e1357600080fd5b6004600354815481101515610e2457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610ee957600080fd5b505af1158015610efd573d6000803e3d6000fd5b505050506040513d6020811015610f1357600080fd5b810190808051906020019092919050505090506004600354815481101515610f3757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156110e157600080fd5b505af11580156110f5573d6000803e3d6000fd5b505050506040513d602081101561110b57600080fd5b8101908080519060200190929190505050151561112757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f2fe921bb50a459800ae7eae7c0124e9e875094a539eb7dc5b3f728017347e0fb826040518082815260200191505060405180910390a290565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600480549050604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040516020818303038152906040526040518082805190602001908083835b6020831015156112d757805182526020820191506020810190506020830392506112b2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020905090565b6060600480548060200260200160405190810160405280929190818152602001828054801561138d57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611343575b50505050509050905600a165627a7a723058200a389ca23bc5d453396ece6ed2e6a983910435a3d7a12ef12aa4793fbd75b4400029","sourceMap":"1286:981:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1286:981:0;;;;;;;","deployedSourceMap":"1286:981:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2353:328:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2353:328:1;;;;;;749:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;749:18:1;;;;;;;;;;;;;;;;;;;;;;;1207:466;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1207:466:1;;;;;;;;;;;;;;;;;;;;;;;;;;3208:355;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3208:355:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;3208:355:1;;;;;;;;;;;;;;;;;1856:451;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1856:451:1;;;;;;;;;;;;;;;;;;;;;;;;;;693:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;693:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;2752:134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2752:134:1;;;;;;;;;;;;;;;;;;;;;;;;;;;773:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;773:35:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;1488:517:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1488:517:0;;;;;;;;;;;;;;;;;;;;;;;659:28:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;659:28:1;;;;;;;;;;;;;;;;;;;;;;;;;;;719:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;719:24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;2085:180:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2085:180:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2965:130:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2965:130:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;2965:130:1;;;;;;;;;;;;;;;;;2353:328;2496:12;;;;;;;;;;;2495:13;:38;;;;;2512:6;;;;;;;;;;;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2512:21:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2512:21:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2512:21:1;;;;;;;;;;;;;;;;2495:38;2487:47;;;;;;;;2585:6;;;;;;;;;;;:17;;;:19;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2585:19:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2585:19:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2585:19:1;;;;;;;;;;;;;;;;2575:7;:29;;;;2629:4;2614:12;;:19;;;;;;;;;;;;;;;;;;2648:26;2666:7;;2648:26;;;;;;;;;;;;;;;;;;2353:328::o;749:18::-;;;;:::o;1207:466::-;1482:7;1352:15;;;;;;;;;;;:28;;;1381:10;1393:4;1399:20;1352:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1352:68:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1352:68:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1352:68:1;;;;;;;;;;;;;;;;1344:77;;;;;;;;1492:1;1482:11;;1477:117;1499:13;:20;;;;1495:1;:24;;;1477:117;;;1538:13;1552:1;1538:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:22;;;1561:10;1573:20;1538:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1538:56:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1538:56:1;;;;1521:3;;;;;;;1477:117;;;1633:10;1609:57;;;1645:20;1609:57;;;;;;;;;;;;;;;;;;1207:466;;:::o;3208:355::-;3305:31;3426:7;3390:13;:20;;;;3379: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;3379:32:1;;;;3352:59;;3436:1;3426:11;;3421:135;3443:24;:31;3439:1;:35;;;3421:135;;;3523:13;3537:1;3523:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;3550:5;3523:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3523:33:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3523:33:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3523:33:1;;;;;;;;;;;;;;;;3493:24;3518:1;3493:27;;;;;;;;;;;;;;;;;;;:63;;;;;3476:3;;;;;;;3421:135;;;3208:355;;;;:::o;1856:451::-;1997:7;2007:1;1997:11;;1992:115;2014:13;:20;;;;2010:1;:24;;;1992:115;;;2053:13;2067:1;2053:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:23;;;2077:10;2089:17;2053:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2053:54:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2053:54:1;;;;2036:3;;;;;;;1992:115;;;2173:15;;;;;;;;;;;:24;;;2198:10;2210:17;2173:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2173:55:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2173:55:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2173:55:1;;;;;;;;;;;;;;;;2165:64;;;;;;;;2270:10;2244:56;;;2282:17;2244:56;;;;;;;;;;;;;;;;;;1856:451;;:::o;693:20::-;;;;;;;;;;;;;:::o;2752:134::-;2824:5;2858:13;:20;;;;2845:34;;2752:134;:::o;773:35::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;1488:517:0:-;1546:13;1624:12;;;;;;;;;;;1616:21;;;;;;;;1688:13;1707:7;;1688:28;;;;;;;;;;;;;;;;;;;;;;;;;;;:38;;;1727:10;1688:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1688:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1688:50:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1688:50:0;;;;;;;;;;;;;;;;1677:61;;1794:13;1813:7;;1794:28;;;;;;;;;;;;;;;;;;;;;;;;;;;:35;;;1830:10;1842:8;1794:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1794:57:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1794:57:0;;;;1896:15;;;;;;;;;;;:24;;;1921:10;1933:8;1896:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1896:46:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1896:46:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1896:46:0;;;;;;;;;;;;;;;;1888:55;;;;;;;;1977:10;1958:40;;;1989:8;1958:40;;;;;;;;;;;;;;;;;;1488:517;:::o;659:28:1:-;;;;;;;;;;;;;:::o;719:24::-;;;;;;;;;;;;;:::o;2085:180:0:-;2154:7;2211:15;;;;;;;;;;;2228:6;;;;;;;;;;;2236:13;:20;;;;2194:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2194:63:0;;;2184:74;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2184:74:0;;;;;;;;;;;;;;;;2177:81;;2085:180;:::o;2965:130:1:-;3038:14;3075:13;3068:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2965:130;:::o","source":"pragma solidity ^0.4.24;\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) != 0 && address(_oracle) != 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(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 - \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":[152],"CategoricalEventProxy":[83]},"id":153,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:0"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2,"nodeType":"ImportDirective","scope":153,"sourceUnit":385,"src":"25: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":153,"sourceUnit":6702,"src":"55:55:0","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"147:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5,"nodeType":"InheritanceSpecifier","src":"147:5:0"},{"arguments":null,"baseName":{"contractScope":null,"id":6,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"154:9:0","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":7,"nodeType":"InheritanceSpecifier","src":"154:9:0"}],"contractDependencies":[198,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":83,"linearizedBaseContracts":[83,198,6701,6673],"name":"CategoricalEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":81,"nodeType":"Block","src":"617:514:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":38,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":34,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":25,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":13,"src":"669:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":24,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"661: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":"661:25:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":27,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"690:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"661:30:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":33,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":30,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"703:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":29,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"695:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":31,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"695:16:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":32,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"715:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"695:21:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"661:55:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":37,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":35,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"720:12:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":36,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"736:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"720:17:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"661:76:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":23,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"653:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":39,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"653:85:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":40,"nodeType":"ExpressionStatement","src":"653:85:0"},{"expression":{"argumentTypes":null,"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":41,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"748:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":42,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":13,"src":"766:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"748:34:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":44,"nodeType":"ExpressionStatement","src":"748:34:0"},{"expression":{"argumentTypes":null,"id":47,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":45,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"792:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":46,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"801:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"792:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":48,"nodeType":"ExpressionStatement","src":"792:16:0"},{"body":{"id":79,"nodeType":"Block","src":"911:214:0","statements":[{"assignments":[60],"declarations":[{"constant":false,"id":60,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":82,"src":"925:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":59,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"925:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":67,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":64,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":11,"src":"988:22:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":63,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"966:21:0","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":62,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"970:17:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":65,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"966:45:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":61,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"953:12:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":66,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"953:59:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"925:87:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":71,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"1045:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":68,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1026:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":70,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1026:18:0","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":72,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1026:32:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":73,"nodeType":"ExpressionStatement","src":"1026:32:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":75,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"1098:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":76,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"1112:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":74,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1077:20:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:37:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":78,"nodeType":"EmitStatement","src":"1072:42:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":53,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"888:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":54,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"892:12:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"888:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":80,"initializationExpression":{"assignments":[50],"declarations":[{"constant":false,"id":50,"name":"i","nodeType":"VariableDeclaration","scope":82,"src":"875:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":49,"name":"uint8","nodeType":"ElementaryTypeName","src":"875:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":52,"initialValue":{"argumentTypes":null,"hexValue":"30","id":51,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"885:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"875:11:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"906:3:0","subExpression":{"argumentTypes":null,"id":56,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"906:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":58,"nodeType":"ExpressionStatement","src":"906:3:0"},"nodeType":"ForStatement","src":"870:255:0"}]},"documentation":"@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","id":82,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":20,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":9,"src":"589:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":21,"modifierName":{"argumentTypes":null,"id":19,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"583:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"583:14:0"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":18,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"name":"proxied","nodeType":"VariableDeclaration","scope":82,"src":"466:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":8,"name":"address","nodeType":"ElementaryTypeName","src":"466:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":11,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":82,"src":"483:30:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":10,"name":"address","nodeType":"ElementaryTypeName","src":"483:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":13,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":82,"src":"515:22:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":12,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"515:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":15,"name":"_oracle","nodeType":"VariableDeclaration","scope":82,"src":"539:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":14,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"539:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":17,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":82,"src":"555:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":16,"name":"uint8","nodeType":"ElementaryTypeName","src":"555:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"465:109:0"},"payable":false,"returnParameters":{"id":22,"nodeType":"ParameterList","parameters":[],"src":"617:0:0"},"scope":83,"src":"454:677:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":153,"src":"113:1020:0"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":84,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1315:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":85,"nodeType":"InheritanceSpecifier","src":"1315:7:0"},{"arguments":null,"baseName":{"contractScope":null,"id":86,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1324:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":87,"nodeType":"InheritanceSpecifier","src":"1324:5:0"}],"contractDependencies":[198,384,6673],"contractKind":"contract","documentation":"@title Categorical event contract - Categorical events resolve to an outcome from a set of outcomes\n @author Stefan George - ","fullyImplemented":true,"id":152,"linearizedBaseContracts":[152,384,198,6673],"name":"CategoricalEvent","nodeType":"ContractDefinition","nodes":[{"body":{"id":134,"nodeType":"Block","src":"1565:440:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":93,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"1624:12:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":92,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1616:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":94,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1616:21:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":95,"nodeType":"ExpressionStatement","src":"1616:21:0"},{"expression":{"argumentTypes":null,"id":106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":96,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1677:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":103,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1727:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":97,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1688:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":101,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":99,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"1707:7:0","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":98,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1702:4:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":100,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1702:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1688:28:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":102,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"1688:38:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":105,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1688:50:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1677:61:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":107,"nodeType":"ExpressionStatement","src":"1677:61:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":114,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1830:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":115,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1830:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":116,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1842:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":108,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1794:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":112,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":110,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"1813:7:0","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":109,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1808:4:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1808:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:28:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"1794:35:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1794:57:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":118,"nodeType":"ExpressionStatement","src":"1794:57:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":122,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1921:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1921:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":124,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1933:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":120,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1896:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"1896:24:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":125,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1896:46:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":119,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1888:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":126,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1888:55:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":127,"nodeType":"ExpressionStatement","src":"1888:55:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":129,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1977:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1977:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":131,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1989:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":128,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"1958:18:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":132,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1958:40:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":133,"nodeType":"EmitStatement","src":"1953:45:0"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":135,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[],"src":"1511:2:0"},"payable":false,"returnParameters":{"id":91,"nodeType":"ParameterList","parameters":[{"constant":false,"id":90,"name":"winnings","nodeType":"VariableDeclaration","scope":135,"src":"1546:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":89,"name":"uint","nodeType":"ElementaryTypeName","src":"1546:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1545:15:0"},"scope":152,"src":"1488:517:0","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":150,"nodeType":"Block","src":"2167:98:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":143,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2211:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":144,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2228:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":145,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2236:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":146,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2236:20:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":141,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2194:3:0","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":142,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2194:16:0","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":147,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2194:63:0","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":140,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2184:9:0","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2184:74:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":139,"id":149,"nodeType":"Return","src":"2177:81:0"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":151,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":136,"nodeType":"ParameterList","parameters":[],"src":"2106:2:0"},"payable":false,"returnParameters":{"id":139,"nodeType":"ParameterList","parameters":[{"constant":false,"id":138,"name":"","nodeType":"VariableDeclaration","scope":151,"src":"2154:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":137,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2154:7:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2153:9:0"},"scope":152,"src":"2085:180:0","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":153,"src":"1286:981:0"}],"src":"0:2268:0"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/CategoricalEvent.sol","exportedSymbols":{"CategoricalEvent":[152],"CategoricalEventProxy":[83]},"id":153,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:0"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2,"nodeType":"ImportDirective","scope":153,"sourceUnit":385,"src":"25: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":153,"sourceUnit":6702,"src":"55:55:0","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"147:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5,"nodeType":"InheritanceSpecifier","src":"147:5:0"},{"arguments":null,"baseName":{"contractScope":null,"id":6,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"154:9:0","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":7,"nodeType":"InheritanceSpecifier","src":"154:9:0"}],"contractDependencies":[198,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":83,"linearizedBaseContracts":[83,198,6701,6673],"name":"CategoricalEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":81,"nodeType":"Block","src":"617:514:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":38,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":34,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":25,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":13,"src":"669:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":24,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"661: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":"661:25:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":27,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"690:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"661:30:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":33,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":30,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"703:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":29,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"695:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":31,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"695:16:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":32,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"715:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"695:21:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"661:55:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":37,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":35,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"720:12:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":36,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"736:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"720:17:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"661:76:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":23,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"653:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":39,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"653:85:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":40,"nodeType":"ExpressionStatement","src":"653:85:0"},{"expression":{"argumentTypes":null,"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":41,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"748:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":42,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":13,"src":"766:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"748:34:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":44,"nodeType":"ExpressionStatement","src":"748:34:0"},{"expression":{"argumentTypes":null,"id":47,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":45,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"792:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":46,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"801:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"792:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":48,"nodeType":"ExpressionStatement","src":"792:16:0"},{"body":{"id":79,"nodeType":"Block","src":"911:214:0","statements":[{"assignments":[60],"declarations":[{"constant":false,"id":60,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":82,"src":"925:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":59,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"925:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":67,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":64,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":11,"src":"988:22:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":63,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"966:21:0","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":62,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"970:17:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":65,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"966:45:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":61,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"953:12:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":66,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"953:59:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"925:87:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":71,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"1045:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":68,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1026:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":70,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1026:18:0","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":72,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1026:32:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":73,"nodeType":"ExpressionStatement","src":"1026:32:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":75,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"1098:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":76,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"1112:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":74,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1077:20:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:37:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":78,"nodeType":"EmitStatement","src":"1072:42:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":53,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"888:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":54,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"892:12:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"888:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":80,"initializationExpression":{"assignments":[50],"declarations":[{"constant":false,"id":50,"name":"i","nodeType":"VariableDeclaration","scope":82,"src":"875:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":49,"name":"uint8","nodeType":"ElementaryTypeName","src":"875:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":52,"initialValue":{"argumentTypes":null,"hexValue":"30","id":51,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"885:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"875:11:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"906:3:0","subExpression":{"argumentTypes":null,"id":56,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"906:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":58,"nodeType":"ExpressionStatement","src":"906:3:0"},"nodeType":"ForStatement","src":"870:255:0"}]},"documentation":"@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","id":82,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":20,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":9,"src":"589:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":21,"modifierName":{"argumentTypes":null,"id":19,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"583:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"583:14:0"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":18,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"name":"proxied","nodeType":"VariableDeclaration","scope":82,"src":"466:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":8,"name":"address","nodeType":"ElementaryTypeName","src":"466:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":11,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":82,"src":"483:30:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":10,"name":"address","nodeType":"ElementaryTypeName","src":"483:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":13,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":82,"src":"515:22:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":12,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"515:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":15,"name":"_oracle","nodeType":"VariableDeclaration","scope":82,"src":"539:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":14,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"539:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":17,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":82,"src":"555:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":16,"name":"uint8","nodeType":"ElementaryTypeName","src":"555:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"465:109:0"},"payable":false,"returnParameters":{"id":22,"nodeType":"ParameterList","parameters":[],"src":"617:0:0"},"scope":83,"src":"454:677:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":153,"src":"113:1020:0"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":84,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1315:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":85,"nodeType":"InheritanceSpecifier","src":"1315:7:0"},{"arguments":null,"baseName":{"contractScope":null,"id":86,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1324:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":87,"nodeType":"InheritanceSpecifier","src":"1324:5:0"}],"contractDependencies":[198,384,6673],"contractKind":"contract","documentation":"@title Categorical event contract - Categorical events resolve to an outcome from a set of outcomes\n @author Stefan George - ","fullyImplemented":true,"id":152,"linearizedBaseContracts":[152,384,198,6673],"name":"CategoricalEvent","nodeType":"ContractDefinition","nodes":[{"body":{"id":134,"nodeType":"Block","src":"1565:440:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":93,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"1624:12:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":92,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1616:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":94,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1616:21:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":95,"nodeType":"ExpressionStatement","src":"1616:21:0"},{"expression":{"argumentTypes":null,"id":106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":96,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1677:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":103,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1727:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":97,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1688:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":101,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":99,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"1707:7:0","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":98,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1702:4:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":100,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1702:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1688:28:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":102,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"1688:38:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":105,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1688:50:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1677:61:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":107,"nodeType":"ExpressionStatement","src":"1677:61:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":114,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1830:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":115,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1830:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":116,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1842:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":108,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1794:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":112,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":110,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"1813:7:0","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":109,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1808:4:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1808:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:28:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"1794:35:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1794:57:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":118,"nodeType":"ExpressionStatement","src":"1794:57:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":122,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1921:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1921:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":124,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1933:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":120,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1896:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"1896:24:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":125,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1896:46:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":119,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1888:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":126,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1888:55:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":127,"nodeType":"ExpressionStatement","src":"1888:55:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":129,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1977:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1977:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":131,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1989:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":128,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"1958:18:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":132,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1958:40:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":133,"nodeType":"EmitStatement","src":"1953:45:0"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":135,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[],"src":"1511:2:0"},"payable":false,"returnParameters":{"id":91,"nodeType":"ParameterList","parameters":[{"constant":false,"id":90,"name":"winnings","nodeType":"VariableDeclaration","scope":135,"src":"1546:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":89,"name":"uint","nodeType":"ElementaryTypeName","src":"1546:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1545:15:0"},"scope":152,"src":"1488:517:0","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":150,"nodeType":"Block","src":"2167:98:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":143,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2211:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":144,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2228:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":145,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2236:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":146,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2236:20:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":141,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2194:3:0","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":142,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2194:16:0","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":147,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2194:63:0","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":140,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2184:9:0","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2184:74:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":139,"id":149,"nodeType":"Return","src":"2177:81:0"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":151,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":136,"nodeType":"ParameterList","parameters":[],"src":"2106:2:0"},"payable":false,"returnParameters":{"id":139,"nodeType":"ParameterList","parameters":[{"constant":false,"id":138,"name":"","nodeType":"VariableDeclaration","scope":151,"src":"2154:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":137,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2154:7:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2153:9:0"},"scope":152,"src":"2085:180:0","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":153,"src":"1286:981:0"}],"src":"0:2268:0"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0x5dc430e0ee8b5b8670024dcf6e51fa5704dfa1b4","transactionHash":"0x6206446d860b879e7f99353d4b38b815057ad97c075ca681a3164c657c7336a5"},"3":{"address":"0x3879e4791ed887932bdeab68b37843514147237c","transactionHash":"0x6043153a1eb0f874cbb102ff17894164e74e6e647e5d567705ea25d43f4063cf"},"4":{"address":"0x5d075fcb17fb9f667694a082685a633b67dc4803","transactionHash":"0x848b4050407f2727b543db08a13120c8c91ab676472b322026e769f07be3ea0b"},"42":{"address":"0xdb861139a3547ce888da6db4d0fa71e7c0e7dd6e","transactionHash":"0xb5932eba34b82d586486edf3908aa79611a2f887fca4f72dd897520506c55329"},"437894314312":{"address":"0x0290fb167208af455bb137780163b7b7a9a10c16","transactionHash":"0x7df03e14b93538088c20eb7d0c3eff4d3e6df80b01630571aac42472ca7cb82c"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:47.537Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CategoricalEventProxy.json": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CategoricalEventProxy.json ***! + \*****************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"CategoricalEventProxy","abi":[{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"name":"","type":"address"}],"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"},{"inputs":[{"name":"proxied","type":"address"},{"name":"outcomeTokenMasterCopy","type":"address"},{"name":"_collateralToken","type":"address"},{"name":"_oracle","type":"address"},{"name":"outcomeCount","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"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"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160a0806108ca83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808660008173ffffffffffffffffffffffffffffffffffffffff161415151561008557600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008573ffffffffffffffffffffffffffffffffffffffff1614158015610104575060008473ffffffffffffffffffffffffffffffffffffffff1614155b8015610114575060028360ff1610155b151561011f57600080fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b8260ff168260ff1610156102f657856101bd610302565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f08015801561020f573d6000803e3d6000fd5b50905060048190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550507fad24776dc347085865b6988e249c191fc22d9b31cf54cb62233c3c16be1736ee8183604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019250505060405180910390a181806001019250506101a6565b50505050505050610312565b604051610223806106a783390190565b610386806103216000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100c65780637dc0d1d0146100f15780638abe59ea14610148578063a619486e146101b5578063b2016bd41461020c578063ccdf68f314610263575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100c1573d6000f35b3d6000fd5b3480156100d257600080fd5b506100db610292565b6040518082815260200191505060405180910390f35b3480156100fd57600080fd5b50610106610298565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015457600080fd5b50610173600480360381019080803590602001909291905050506102be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c157600080fd5b506101ca6102fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021857600080fd5b50610221610321565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026f57600080fd5b50610278610347565b604051808215151515815260200191505060405180910390f35b60035481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811015156102cd57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16815600a165627a7a72305820ed6fbe9239a43957ef7615e6ce0b39eb5fab993fdc585dbef6bedeb350d1b63e0029608060405234801561001057600080fd5b50604051602080610223833981018060405281019080805190602001909291905050508060008173ffffffffffffffffffffffffffffffffffffffff161415151561005a57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610137806100ec6000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582086062f64a8ac16b84a22859a0aaf50fd8f37056793cb37e21a8760b9712c9eed0029","deployedBytecode":"0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100c65780637dc0d1d0146100f15780638abe59ea14610148578063a619486e146101b5578063b2016bd41461020c578063ccdf68f314610263575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100c1573d6000f35b3d6000fd5b3480156100d257600080fd5b506100db610292565b6040518082815260200191505060405180910390f35b3480156100fd57600080fd5b50610106610298565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015457600080fd5b50610173600480360381019080803590602001909291905050506102be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c157600080fd5b506101ca6102fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021857600080fd5b50610221610321565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026f57600080fd5b50610278610347565b604051808215151515815260200191505060405180910390f35b60035481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811015156102cd57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16815600a165627a7a72305820ed6fbe9239a43957ef7615e6ce0b39eb5fab993fdc585dbef6bedeb350d1b63e0029","sourceMap":"113:1020:0:-;;;454:677;8:9:-1;5:2;;;30:1;27;20:12;5:2;454:677:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;875:7;925:25;589:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;690:1:0;669:16;661:30;;;;:55;;;;;715:1;703:7;695:21;;;;661:55;:76;;;;;736:1;720:12;:17;;;;661:76;653:85;;;;;;;;766:16;748:15;;:34;;;;;;;;;;;;;;;;;;801:7;792:6;;:16;;;;;;;;;;;;;;;;;;885:1;875:11;;870:255;892:12;888:16;;:1;:16;;;870:255;;;988:22;966:45;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;966:45:0;925:87;;1026:13;1045:12;1026:32;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;1026:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1077:37;1098:12;1112:1;1077:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;906:3;;;;;;;870:255;;;454:677;;;;;;;113:1020;;;;;;;;;;;;:::o;:::-;;;;;;;","deployedSourceMap":"113:1020:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;749:18:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;749:18:1;;;;;;;;;;;;;;;;;;;;;;;693:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;693:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;773:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;773:35:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;659:28:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;659:28:1;;;;;;;;;;;;;;;;;;;;;;;;;;;719:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;719:24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;749:18;;;;:::o;693:20::-;;;;;;;;;;;;;:::o;773:35::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;659:28:1:-;;;;;;;;;;;;;:::o;719:24::-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\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) != 0 && address(_oracle) != 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(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 - \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":[152],"CategoricalEventProxy":[83]},"id":153,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:0"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2,"nodeType":"ImportDirective","scope":153,"sourceUnit":385,"src":"25: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":153,"sourceUnit":6702,"src":"55:55:0","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"147:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5,"nodeType":"InheritanceSpecifier","src":"147:5:0"},{"arguments":null,"baseName":{"contractScope":null,"id":6,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"154:9:0","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":7,"nodeType":"InheritanceSpecifier","src":"154:9:0"}],"contractDependencies":[198,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":83,"linearizedBaseContracts":[83,198,6701,6673],"name":"CategoricalEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":81,"nodeType":"Block","src":"617:514:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":38,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":34,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":25,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":13,"src":"669:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":24,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"661: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":"661:25:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":27,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"690:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"661:30:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":33,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":30,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"703:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":29,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"695:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":31,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"695:16:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":32,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"715:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"695:21:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"661:55:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":37,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":35,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"720:12:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":36,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"736:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"720:17:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"661:76:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":23,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"653:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":39,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"653:85:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":40,"nodeType":"ExpressionStatement","src":"653:85:0"},{"expression":{"argumentTypes":null,"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":41,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"748:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":42,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":13,"src":"766:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"748:34:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":44,"nodeType":"ExpressionStatement","src":"748:34:0"},{"expression":{"argumentTypes":null,"id":47,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":45,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"792:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":46,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"801:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"792:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":48,"nodeType":"ExpressionStatement","src":"792:16:0"},{"body":{"id":79,"nodeType":"Block","src":"911:214:0","statements":[{"assignments":[60],"declarations":[{"constant":false,"id":60,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":82,"src":"925:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":59,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"925:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":67,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":64,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":11,"src":"988:22:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":63,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"966:21:0","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":62,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"970:17:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":65,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"966:45:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":61,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"953:12:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":66,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"953:59:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"925:87:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":71,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"1045:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":68,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1026:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":70,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1026:18:0","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":72,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1026:32:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":73,"nodeType":"ExpressionStatement","src":"1026:32:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":75,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"1098:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":76,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"1112:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":74,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1077:20:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:37:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":78,"nodeType":"EmitStatement","src":"1072:42:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":53,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"888:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":54,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"892:12:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"888:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":80,"initializationExpression":{"assignments":[50],"declarations":[{"constant":false,"id":50,"name":"i","nodeType":"VariableDeclaration","scope":82,"src":"875:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":49,"name":"uint8","nodeType":"ElementaryTypeName","src":"875:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":52,"initialValue":{"argumentTypes":null,"hexValue":"30","id":51,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"885:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"875:11:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"906:3:0","subExpression":{"argumentTypes":null,"id":56,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"906:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":58,"nodeType":"ExpressionStatement","src":"906:3:0"},"nodeType":"ForStatement","src":"870:255:0"}]},"documentation":"@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","id":82,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":20,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":9,"src":"589:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":21,"modifierName":{"argumentTypes":null,"id":19,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"583:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"583:14:0"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":18,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"name":"proxied","nodeType":"VariableDeclaration","scope":82,"src":"466:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":8,"name":"address","nodeType":"ElementaryTypeName","src":"466:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":11,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":82,"src":"483:30:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":10,"name":"address","nodeType":"ElementaryTypeName","src":"483:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":13,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":82,"src":"515:22:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":12,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"515:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":15,"name":"_oracle","nodeType":"VariableDeclaration","scope":82,"src":"539:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":14,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"539:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":17,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":82,"src":"555:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":16,"name":"uint8","nodeType":"ElementaryTypeName","src":"555:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"465:109:0"},"payable":false,"returnParameters":{"id":22,"nodeType":"ParameterList","parameters":[],"src":"617:0:0"},"scope":83,"src":"454:677:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":153,"src":"113:1020:0"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":84,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1315:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":85,"nodeType":"InheritanceSpecifier","src":"1315:7:0"},{"arguments":null,"baseName":{"contractScope":null,"id":86,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1324:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":87,"nodeType":"InheritanceSpecifier","src":"1324:5:0"}],"contractDependencies":[198,384,6673],"contractKind":"contract","documentation":"@title Categorical event contract - Categorical events resolve to an outcome from a set of outcomes\n @author Stefan George - ","fullyImplemented":true,"id":152,"linearizedBaseContracts":[152,384,198,6673],"name":"CategoricalEvent","nodeType":"ContractDefinition","nodes":[{"body":{"id":134,"nodeType":"Block","src":"1565:440:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":93,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"1624:12:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":92,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1616:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":94,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1616:21:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":95,"nodeType":"ExpressionStatement","src":"1616:21:0"},{"expression":{"argumentTypes":null,"id":106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":96,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1677:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":103,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1727:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":97,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1688:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":101,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":99,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"1707:7:0","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":98,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1702:4:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":100,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1702:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1688:28:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":102,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"1688:38:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":105,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1688:50:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1677:61:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":107,"nodeType":"ExpressionStatement","src":"1677:61:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":114,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1830:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":115,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1830:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":116,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1842:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":108,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1794:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":112,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":110,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"1813:7:0","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":109,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1808:4:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1808:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:28:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"1794:35:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1794:57:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":118,"nodeType":"ExpressionStatement","src":"1794:57:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":122,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1921:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1921:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":124,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1933:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":120,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1896:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"1896:24:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":125,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1896:46:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":119,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1888:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":126,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1888:55:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":127,"nodeType":"ExpressionStatement","src":"1888:55:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":129,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1977:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1977:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":131,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1989:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":128,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"1958:18:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":132,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1958:40:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":133,"nodeType":"EmitStatement","src":"1953:45:0"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":135,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[],"src":"1511:2:0"},"payable":false,"returnParameters":{"id":91,"nodeType":"ParameterList","parameters":[{"constant":false,"id":90,"name":"winnings","nodeType":"VariableDeclaration","scope":135,"src":"1546:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":89,"name":"uint","nodeType":"ElementaryTypeName","src":"1546:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1545:15:0"},"scope":152,"src":"1488:517:0","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":150,"nodeType":"Block","src":"2167:98:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":143,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2211:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":144,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2228:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":145,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2236:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":146,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2236:20:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":141,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2194:3:0","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":142,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2194:16:0","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":147,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2194:63:0","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":140,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2184:9:0","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2184:74:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":139,"id":149,"nodeType":"Return","src":"2177:81:0"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":151,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":136,"nodeType":"ParameterList","parameters":[],"src":"2106:2:0"},"payable":false,"returnParameters":{"id":139,"nodeType":"ParameterList","parameters":[{"constant":false,"id":138,"name":"","nodeType":"VariableDeclaration","scope":151,"src":"2154:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":137,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2154:7:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2153:9:0"},"scope":152,"src":"2085:180:0","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":153,"src":"1286:981:0"}],"src":"0:2268:0"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/CategoricalEvent.sol","exportedSymbols":{"CategoricalEvent":[152],"CategoricalEventProxy":[83]},"id":153,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:0"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2,"nodeType":"ImportDirective","scope":153,"sourceUnit":385,"src":"25: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":153,"sourceUnit":6702,"src":"55:55:0","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"147:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5,"nodeType":"InheritanceSpecifier","src":"147:5:0"},{"arguments":null,"baseName":{"contractScope":null,"id":6,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"154:9:0","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":7,"nodeType":"InheritanceSpecifier","src":"154:9:0"}],"contractDependencies":[198,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":83,"linearizedBaseContracts":[83,198,6701,6673],"name":"CategoricalEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":81,"nodeType":"Block","src":"617:514:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":38,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":34,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":25,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":13,"src":"669:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":24,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"661: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":"661:25:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":27,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"690:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"661:30:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":33,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":30,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"703:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":29,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"695:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":31,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"695:16:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":32,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"715:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"695:21:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"661:55:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":37,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":35,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"720:12:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":36,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"736:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"720:17:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"661:76:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":23,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"653:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":39,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"653:85:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":40,"nodeType":"ExpressionStatement","src":"653:85:0"},{"expression":{"argumentTypes":null,"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":41,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"748:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":42,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":13,"src":"766:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"748:34:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":44,"nodeType":"ExpressionStatement","src":"748:34:0"},{"expression":{"argumentTypes":null,"id":47,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":45,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"792:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":46,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"801:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"792:16:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":48,"nodeType":"ExpressionStatement","src":"792:16:0"},{"body":{"id":79,"nodeType":"Block","src":"911:214:0","statements":[{"assignments":[60],"declarations":[{"constant":false,"id":60,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":82,"src":"925:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":59,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"925:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":67,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":64,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":11,"src":"988:22:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":63,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"966:21:0","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":62,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"970:17:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":65,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"966:45:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":61,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"953:12:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":66,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"953:59:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"925:87:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":71,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"1045:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":68,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1026:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":70,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1026:18:0","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":72,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1026:32:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":73,"nodeType":"ExpressionStatement","src":"1026:32:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":75,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"1098:12:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":76,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"1112:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":74,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1077:20:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:37:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":78,"nodeType":"EmitStatement","src":"1072:42:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":53,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"888:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":54,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"892:12:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"888:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":80,"initializationExpression":{"assignments":[50],"declarations":[{"constant":false,"id":50,"name":"i","nodeType":"VariableDeclaration","scope":82,"src":"875:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":49,"name":"uint8","nodeType":"ElementaryTypeName","src":"875:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":52,"initialValue":{"argumentTypes":null,"hexValue":"30","id":51,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"885:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"875:11:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"906:3:0","subExpression":{"argumentTypes":null,"id":56,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"906:1:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":58,"nodeType":"ExpressionStatement","src":"906:3:0"},"nodeType":"ForStatement","src":"870:255:0"}]},"documentation":"@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","id":82,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":20,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":9,"src":"589:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":21,"modifierName":{"argumentTypes":null,"id":19,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"583:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"583:14:0"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":18,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"name":"proxied","nodeType":"VariableDeclaration","scope":82,"src":"466:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":8,"name":"address","nodeType":"ElementaryTypeName","src":"466:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":11,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":82,"src":"483:30:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":10,"name":"address","nodeType":"ElementaryTypeName","src":"483:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":13,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":82,"src":"515:22:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":12,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"515:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":15,"name":"_oracle","nodeType":"VariableDeclaration","scope":82,"src":"539:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":14,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"539:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":17,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":82,"src":"555:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":16,"name":"uint8","nodeType":"ElementaryTypeName","src":"555:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"465:109:0"},"payable":false,"returnParameters":{"id":22,"nodeType":"ParameterList","parameters":[],"src":"617:0:0"},"scope":83,"src":"454:677:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":153,"src":"113:1020:0"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":84,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1315:7:0","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":85,"nodeType":"InheritanceSpecifier","src":"1315:7:0"},{"arguments":null,"baseName":{"contractScope":null,"id":86,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1324:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":87,"nodeType":"InheritanceSpecifier","src":"1324:5:0"}],"contractDependencies":[198,384,6673],"contractKind":"contract","documentation":"@title Categorical event contract - Categorical events resolve to an outcome from a set of outcomes\n @author Stefan George - ","fullyImplemented":true,"id":152,"linearizedBaseContracts":[152,384,198,6673],"name":"CategoricalEvent","nodeType":"ContractDefinition","nodes":[{"body":{"id":134,"nodeType":"Block","src":"1565:440:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":93,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"1624:12:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":92,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1616:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":94,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1616:21:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":95,"nodeType":"ExpressionStatement","src":"1616:21:0"},{"expression":{"argumentTypes":null,"id":106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":96,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1677:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":103,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1727:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":97,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1688:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":101,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":99,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"1707:7:0","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":98,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1702:4:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":100,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1702:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1688:28:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":102,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"1688:38:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":105,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1688:50:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1677:61:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":107,"nodeType":"ExpressionStatement","src":"1677:61:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":114,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1830:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":115,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1830:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":116,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1842:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":108,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1794:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":112,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":110,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"1813:7:0","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":109,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1808:4:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1808:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:28:0","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"1794:35:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1794:57:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":118,"nodeType":"ExpressionStatement","src":"1794:57:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":122,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1921:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1921:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":124,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1933:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":120,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1896:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"1896:24:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":125,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1896:46:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":119,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1888:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":126,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1888:55:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":127,"nodeType":"ExpressionStatement","src":"1888:55:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":129,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1977:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1977:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":131,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"1989:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":128,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"1958:18:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":132,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1958:40:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":133,"nodeType":"EmitStatement","src":"1953:45:0"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":135,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[],"src":"1511:2:0"},"payable":false,"returnParameters":{"id":91,"nodeType":"ParameterList","parameters":[{"constant":false,"id":90,"name":"winnings","nodeType":"VariableDeclaration","scope":135,"src":"1546:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":89,"name":"uint","nodeType":"ElementaryTypeName","src":"1546:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1545:15:0"},"scope":152,"src":"1488:517:0","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":150,"nodeType":"Block","src":"2167:98:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":143,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2211:15:0","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":144,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2228:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":145,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2236:13:0","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":146,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2236:20:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":141,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2194:3:0","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":142,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2194:16:0","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":147,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2194:63:0","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":140,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2184:9:0","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2184:74:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":139,"id":149,"nodeType":"Return","src":"2177:81:0"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":151,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":136,"nodeType":"ParameterList","parameters":[],"src":"2106:2:0"},"payable":false,"returnParameters":{"id":139,"nodeType":"ParameterList","parameters":[{"constant":false,"id":138,"name":"","nodeType":"VariableDeclaration","scope":151,"src":"2154:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":137,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2154:7:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2153:9:0"},"scope":152,"src":"2085:180:0","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":153,"src":"1286:981:0"}],"src":"0:2268:0"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.982Z"}; /***/ }), @@ -176,10 +252,21 @@ module.exports = {"contract_name":"CategoricalEvent","abi":[{"constant":false,"i /*!*************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracle.json ***! \*************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"CentralizedOracle","abi":[{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_outcome","type":"int256"}],"name":"setOutcome","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"replaceOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ipfsHash","outputs":[{"name":"","type":"bytes"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[{"name":"_owner","type":"address"},{"name":"_ipfsHash","type":"bytes"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnerReplacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeAssignment","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263310}; +module.exports = {"contractName":"CentralizedOracle","abi":[{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","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":"ipfsHash","outputs":[{"name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnerReplacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeAssignment","type":"event"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"replaceOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_outcome","type":"int256"}],"name":"setOutcome","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50610622806100206000396000f300608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f871461009e578063717a195a146100c95780637e7e4b47146100f65780638da5cb5b14610121578063a39a45b714610178578063a619486e146101bb578063c623674f14610212578063c65fb380146102a2578063ccdf68f3146102d1575b600080fd5b3480156100aa57600080fd5b506100b3610300565b6040518082815260200191505060405180910390f35b3480156100d557600080fd5b506100f460048036038101908080359060200190929190505050610306565b005b34801561010257600080fd5b5061010b6103da565b6040518082815260200191505060405180910390f35b34801561012d57600080fd5b506101366103e4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018457600080fd5b506101b9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061040a565b005b3480156101c757600080fd5b506101d0610509565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021e57600080fd5b5061022761052e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561026757808201518184015260208101905061024c565b50505050905090810190601f1680156102945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ae57600080fd5b506102b76105cc565b604051808215151515815260200191505060405180910390f35b3480156102dd57600080fd5b506102e66105df565b604051808215151515815260200191505060405180910390f35b60045481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561036257600080fd5b600360009054906101000a900460ff1615151561037e57600080fd5b6001600360006101000a81548160ff021916908315150217905550806004819055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb71816040518082815260200191505060405180910390a150565b6000600454905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561046657600080fd5b600360009054906101000a900460ff1615151561048257600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f191a2405c52452c381a62f3b7480f9d3e77a76d7737659fc1030aff54b395dd560405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c45780601f10610599576101008083540402835291602001916105c4565b820191906000526020600020905b8154815290600101906020018083116105a757829003601f168201915b505050505081565b600360009054906101000a900460ff1681565b6000600360009054906101000a900460ff169050905600a165627a7a72305820291c20b9fd3c427ce5efe4a26095e55e290ac95cadb466873187037699d10f9d0029","deployedBytecode":"0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f871461009e578063717a195a146100c95780637e7e4b47146100f65780638da5cb5b14610121578063a39a45b714610178578063a619486e146101bb578063c623674f14610212578063c65fb380146102a2578063ccdf68f3146102d1575b600080fd5b3480156100aa57600080fd5b506100b3610300565b6040518082815260200191505060405180910390f35b3480156100d557600080fd5b506100f460048036038101908080359060200190929190505050610306565b005b34801561010257600080fd5b5061010b6103da565b6040518082815260200191505060405180910390f35b34801561012d57600080fd5b506101366103e4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018457600080fd5b506101b9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061040a565b005b3480156101c757600080fd5b506101d0610509565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021e57600080fd5b5061022761052e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561026757808201518184015260208101905061024c565b50505050905090810190601f1680156102945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ae57600080fd5b506102b76105cc565b604051808215151515815260200191505060405180910390f35b3480156102dd57600080fd5b506102e66105df565b604051808215151515815260200191505060405180910390f35b60045481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561036257600080fd5b600360009054906101000a900460ff1615151561037e57600080fd5b6001600360006101000a81548160ff021916908315150217905550806004819055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb71816040518082815260200191505060405180910390a150565b6000600454905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561046657600080fd5b600360009054906101000a900460ff1615151561048257600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f191a2405c52452c381a62f3b7480f9d3e77a76d7737659fc1030aff54b395dd560405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c45780601f10610599576101008083540402835291602001916105c4565b820191906000526020600020905b8154815290600101906020018083116105a757829003601f168201915b505050505081565b600360009054906101000a900460ff1681565b6000600360009054906101000a900460ff169050905600a165627a7a72305820291c20b9fd3c427ce5efe4a26095e55e290ac95cadb466873187037699d10f9d0029","sourceMap":"1153:1048:14:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1153:1048:14;;;;;;;","deployedSourceMap":"1153:1048:14:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;387:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;387:18:14;;;;;;;;;;;;;;;;;;;;;;;1614:226;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1614:226:14;;;;;;;;;;;;;;;;;;;;;;;;;;2092:107;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2092:107:14;;;;;;;;;;;;;;;;;;;;;;;311:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;311:20:14;;;;;;;;;;;;;;;;;;;;;;;;;;;1331:207;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1331:207:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;337:21:14;;8:9:-1;5:2;;;30:1;27;20:12;5:2;337:21:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;337:21:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;364:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;364:17:14;;;;;;;;;;;;;;;;;;;;;;;;;;;1925:108;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1925:108:14;;;;;;;;;;;;;;;;;;;;;;;;;;;387:18;;;;:::o;1614:226::-;541:5;;;;;;;;;;;527:19;;:10;:19;;;519:28;;;;;;;;1735:5;;;;;;;;;;;1734:6;1726:15;;;;;;;;1759:4;1751:5;;:12;;;;;;;;;;;;;;;;;;1783:8;1773:7;:18;;;;1806:27;1824:8;1806:27;;;;;;;;;;;;;;;;;;1614:226;:::o;2092:107::-;2159:3;2185:7;;2178:14;;2092:107;:::o;311:20::-;;;;;;;;;;;;;:::o;1331:207::-;541:5;;;;;;;;;;;527:19;;:10;:19;;;519:28;;;;;;;;1458:5;;;;;;;;;;;1457:6;1449:15;;;;;;;;1482:8;1474:5;;:16;;;;;;;;;;;;;;;;;;1522:8;1505:26;;;;;;;;;;;;1331:207;:::o;197:25:29:-;;;;;;;;;;;;;:::o;337:21:14:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;364:17::-;;;;;;;;;;;;;:::o;1925:108::-;1994:4;2021:5;;;;;;;;;;;2014:12;;1925:108;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract CentralizedOracleData {\n\n /*\n * Events\n */\n event OwnerReplacement(address indexed newOwner);\n event OutcomeAssignment(int outcome);\n\n /*\n * Storage\n */\n address public owner;\n bytes public ipfsHash;\n bool public isSet;\n int public outcome;\n\n /*\n * Modifiers\n */\n modifier isOwner () {\n // Only owner is allowed to proceed\n require(msg.sender == owner);\n _;\n }\n}\n\ncontract CentralizedOracleProxy is Proxy, CentralizedOracleData {\n\n /// @dev Constructor sets owner address and IPFS hash\n /// @param _ipfsHash Hash identifying off chain event description\n constructor(address proxied, address _owner, bytes _ipfsHash)\n public\n Proxy(proxied)\n {\n // Description hash cannot be null\n require(_ipfsHash.length == 46);\n owner = _owner;\n ipfsHash = _ipfsHash;\n }\n}\n\n/// @title Centralized oracle contract - Allows the contract owner to set an outcome\n/// @author Stefan George - \ncontract CentralizedOracle is Proxied, Oracle, CentralizedOracleData {\n\n /*\n * Public functions\n */\n /// @dev Replaces owner\n /// @param newOwner New owner\n function replaceOwner(address newOwner)\n public\n isOwner\n {\n // Result is not set yet\n require(!isSet);\n owner = newOwner;\n emit OwnerReplacement(newOwner);\n }\n\n /// @dev Sets event outcome\n /// @param _outcome Event outcome\n function setOutcome(int _outcome)\n public\n isOwner\n {\n // Result is not set yet\n require(!isSet);\n isSet = true;\n outcome = _outcome;\n emit OutcomeAssignment(_outcome);\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return outcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","exportedSymbols":{"CentralizedOracle":[3719],"CentralizedOracleData":[3617],"CentralizedOracleProxy":[3650]},"id":3720,"nodeType":"SourceUnit","nodes":[{"id":3587,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:14"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3588,"nodeType":"ImportDirective","scope":3720,"sourceUnit":4718,"src":"25:31:14","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3589,"nodeType":"ImportDirective","scope":3720,"sourceUnit":6702,"src":"57:55:14","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3617,"linearizedBaseContracts":[3617],"name":"CentralizedOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3593,"name":"OwnerReplacement","nodeType":"EventDefinition","parameters":{"id":3592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3591,"indexed":true,"name":"newOwner","nodeType":"VariableDeclaration","scope":3593,"src":"206:24:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3590,"name":"address","nodeType":"ElementaryTypeName","src":"206:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"205:26:14"},"src":"183:49:14"},{"anonymous":false,"documentation":null,"id":3597,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3596,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3595,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":3597,"src":"261:11:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3594,"name":"int","nodeType":"ElementaryTypeName","src":"261:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"260:13:14"},"src":"237:37:14"},{"constant":false,"id":3599,"name":"owner","nodeType":"VariableDeclaration","scope":3617,"src":"311:20:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3598,"name":"address","nodeType":"ElementaryTypeName","src":"311:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":3601,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3617,"src":"337:21:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes"},"typeName":{"id":3600,"name":"bytes","nodeType":"ElementaryTypeName","src":"337:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"public"},{"constant":false,"id":3603,"name":"isSet","nodeType":"VariableDeclaration","scope":3617,"src":"364:17:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3602,"name":"bool","nodeType":"ElementaryTypeName","src":"364:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":3605,"name":"outcome","nodeType":"VariableDeclaration","scope":3617,"src":"387:18:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3604,"name":"int","nodeType":"ElementaryTypeName","src":"387:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":3615,"nodeType":"Block","src":"465:100:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3608,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"527:3:14","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3609,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"527:10:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3610,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"541:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"527:19:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3607,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"519:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3612,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"519:28:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3613,"nodeType":"ExpressionStatement","src":"519:28:14"},{"id":3614,"nodeType":"PlaceholderStatement","src":"557:1:14"}]},"documentation":null,"id":3616,"name":"isOwner","nodeType":"ModifierDefinition","parameters":{"id":3606,"nodeType":"ParameterList","parameters":[],"src":"462:2:14"},"src":"445:120:14","visibility":"internal"}],"scope":3720,"src":"115:452:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3618,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"604:5:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3619,"nodeType":"InheritanceSpecifier","src":"604:5:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3620,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"611:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3621,"nodeType":"InheritanceSpecifier","src":"611:21:14"}],"contractDependencies":[3617,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3650,"linearizedBaseContracts":[3650,3617,6701,6673],"name":"CentralizedOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3648,"nodeType":"Block","src":"872:145:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3637,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3634,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"933:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"id":3635,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"933:16:14","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"3436","id":3636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"953:2:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_46_by_1","typeString":"int_const 46"},"value":"46"},"src":"933:22:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"925:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3638,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"925:31:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3639,"nodeType":"ExpressionStatement","src":"925:31:14"},{"expression":{"argumentTypes":null,"id":3642,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3640,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"966:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3641,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3625,"src":"974:6:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"966:14:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3643,"nodeType":"ExpressionStatement","src":"966:14:14"},{"expression":{"argumentTypes":null,"id":3646,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3644,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3601,"src":"990:8:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3645,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"1001:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"990:20:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"id":3647,"nodeType":"ExpressionStatement","src":"990:20:14"}]},"documentation":"@dev Constructor sets owner address and IPFS hash\n @param _ipfsHash Hash identifying off chain event description","id":3649,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3630,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3623,"src":"859:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3631,"modifierName":{"argumentTypes":null,"id":3629,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"853:5:14","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"853:14:14"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3628,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3623,"name":"proxied","nodeType":"VariableDeclaration","scope":3649,"src":"780:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3622,"name":"address","nodeType":"ElementaryTypeName","src":"780:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3625,"name":"_owner","nodeType":"VariableDeclaration","scope":3649,"src":"797:14:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3624,"name":"address","nodeType":"ElementaryTypeName","src":"797:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3627,"name":"_ipfsHash","nodeType":"VariableDeclaration","scope":3649,"src":"813:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3626,"name":"bytes","nodeType":"ElementaryTypeName","src":"813:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"779:50:14"},"payable":false,"returnParameters":{"id":3632,"nodeType":"ParameterList","parameters":[],"src":"872:0:14"},"scope":3650,"src":"768:249:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3720,"src":"569:450:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3651,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1183:7:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":3652,"nodeType":"InheritanceSpecifier","src":"1183:7:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3653,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1192:6:14","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":3654,"nodeType":"InheritanceSpecifier","src":"1192:6:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3655,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"1200:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3656,"nodeType":"InheritanceSpecifier","src":"1200:21:14"}],"contractDependencies":[3617,4717,6673],"contractKind":"contract","documentation":"@title Centralized oracle contract - Allows the contract owner to set an outcome\n @author Stefan George - ","fullyImplemented":true,"id":3719,"linearizedBaseContracts":[3719,3617,4717,6673],"name":"CentralizedOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":3676,"nodeType":"Block","src":"1406:132:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1457:6:14","subExpression":{"argumentTypes":null,"id":3664,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1458:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3663,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1449:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3666,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1449:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3667,"nodeType":"ExpressionStatement","src":"1449:15:14"},{"expression":{"argumentTypes":null,"id":3670,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3668,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"1474:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3669,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1482:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1474:16:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3671,"nodeType":"ExpressionStatement","src":"1474:16:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3673,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1522:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":3672,"name":"OwnerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3593,"src":"1505:16:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":3674,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1505:26:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3675,"nodeType":"EmitStatement","src":"1500:31:14"}]},"documentation":"@dev Replaces owner\n @param newOwner New owner","id":3677,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3661,"modifierName":{"argumentTypes":null,"id":3660,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1394:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1394:7:14"}],"name":"replaceOwner","nodeType":"FunctionDefinition","parameters":{"id":3659,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3658,"name":"newOwner","nodeType":"VariableDeclaration","scope":3677,"src":"1353:16:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3657,"name":"address","nodeType":"ElementaryTypeName","src":"1353:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1352:18:14"},"payable":false,"returnParameters":{"id":3662,"nodeType":"ParameterList","parameters":[],"src":"1406:0:14"},"scope":3719,"src":"1331:207:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3701,"nodeType":"Block","src":"1683:157:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1734:6:14","subExpression":{"argumentTypes":null,"id":3685,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1735:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3684,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1726:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3687,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1726:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3688,"nodeType":"ExpressionStatement","src":"1726:15:14"},{"expression":{"argumentTypes":null,"id":3691,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3689,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1751:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":3690,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1759:4:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"1751:12:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3692,"nodeType":"ExpressionStatement","src":"1751:12:14"},{"expression":{"argumentTypes":null,"id":3695,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3693,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"1773:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3694,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1783:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1773:18:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3696,"nodeType":"ExpressionStatement","src":"1773:18:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3698,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1824:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3697,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3597,"src":"1806:17:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":3699,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1806:27:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3700,"nodeType":"EmitStatement","src":"1801:32:14"}]},"documentation":"@dev Sets event outcome\n @param _outcome Event outcome","id":3702,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3682,"modifierName":{"argumentTypes":null,"id":3681,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1671:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1671:7:14"}],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":3680,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3679,"name":"_outcome","nodeType":"VariableDeclaration","scope":3702,"src":"1634:12:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3678,"name":"int","nodeType":"ElementaryTypeName","src":"1634:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1633:14:14"},"payable":false,"returnParameters":{"id":3683,"nodeType":"ParameterList","parameters":[],"src":"1683:0:14"},"scope":3719,"src":"1614:226:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3709,"nodeType":"Block","src":"2004:29:14","statements":[{"expression":{"argumentTypes":null,"id":3707,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"2021:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":3706,"id":3708,"nodeType":"Return","src":"2014:12:14"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":3710,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":3703,"nodeType":"ParameterList","parameters":[],"src":"1946:2:14"},"payable":false,"returnParameters":{"id":3706,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3705,"name":"","nodeType":"VariableDeclaration","scope":3710,"src":"1994:4:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3704,"name":"bool","nodeType":"ElementaryTypeName","src":"1994:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1993:6:14"},"scope":3719,"src":"1925:108:14","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":3717,"nodeType":"Block","src":"2168:31:14","statements":[{"expression":{"argumentTypes":null,"id":3715,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"2185:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":3714,"id":3716,"nodeType":"Return","src":"2178:14:14"}]},"documentation":"@dev Returns outcome\n @return Outcome","id":3718,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":3711,"nodeType":"ParameterList","parameters":[],"src":"2111:2:14"},"payable":false,"returnParameters":{"id":3714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3713,"name":"","nodeType":"VariableDeclaration","scope":3718,"src":"2159:3:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3712,"name":"int","nodeType":"ElementaryTypeName","src":"2159:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2158:5:14"},"scope":3719,"src":"2092:107:14","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":3720,"src":"1153:1048:14"}],"src":"0:2202:14"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","exportedSymbols":{"CentralizedOracle":[3719],"CentralizedOracleData":[3617],"CentralizedOracleProxy":[3650]},"id":3720,"nodeType":"SourceUnit","nodes":[{"id":3587,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:14"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3588,"nodeType":"ImportDirective","scope":3720,"sourceUnit":4718,"src":"25:31:14","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3589,"nodeType":"ImportDirective","scope":3720,"sourceUnit":6702,"src":"57:55:14","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3617,"linearizedBaseContracts":[3617],"name":"CentralizedOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3593,"name":"OwnerReplacement","nodeType":"EventDefinition","parameters":{"id":3592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3591,"indexed":true,"name":"newOwner","nodeType":"VariableDeclaration","scope":3593,"src":"206:24:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3590,"name":"address","nodeType":"ElementaryTypeName","src":"206:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"205:26:14"},"src":"183:49:14"},{"anonymous":false,"documentation":null,"id":3597,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3596,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3595,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":3597,"src":"261:11:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3594,"name":"int","nodeType":"ElementaryTypeName","src":"261:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"260:13:14"},"src":"237:37:14"},{"constant":false,"id":3599,"name":"owner","nodeType":"VariableDeclaration","scope":3617,"src":"311:20:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3598,"name":"address","nodeType":"ElementaryTypeName","src":"311:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":3601,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3617,"src":"337:21:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes"},"typeName":{"id":3600,"name":"bytes","nodeType":"ElementaryTypeName","src":"337:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"public"},{"constant":false,"id":3603,"name":"isSet","nodeType":"VariableDeclaration","scope":3617,"src":"364:17:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3602,"name":"bool","nodeType":"ElementaryTypeName","src":"364:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":3605,"name":"outcome","nodeType":"VariableDeclaration","scope":3617,"src":"387:18:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3604,"name":"int","nodeType":"ElementaryTypeName","src":"387:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":3615,"nodeType":"Block","src":"465:100:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3608,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"527:3:14","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3609,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"527:10:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3610,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"541:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"527:19:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3607,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"519:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3612,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"519:28:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3613,"nodeType":"ExpressionStatement","src":"519:28:14"},{"id":3614,"nodeType":"PlaceholderStatement","src":"557:1:14"}]},"documentation":null,"id":3616,"name":"isOwner","nodeType":"ModifierDefinition","parameters":{"id":3606,"nodeType":"ParameterList","parameters":[],"src":"462:2:14"},"src":"445:120:14","visibility":"internal"}],"scope":3720,"src":"115:452:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3618,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"604:5:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3619,"nodeType":"InheritanceSpecifier","src":"604:5:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3620,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"611:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3621,"nodeType":"InheritanceSpecifier","src":"611:21:14"}],"contractDependencies":[3617,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3650,"linearizedBaseContracts":[3650,3617,6701,6673],"name":"CentralizedOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3648,"nodeType":"Block","src":"872:145:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3637,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3634,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"933:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"id":3635,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"933:16:14","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"3436","id":3636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"953:2:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_46_by_1","typeString":"int_const 46"},"value":"46"},"src":"933:22:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"925:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3638,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"925:31:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3639,"nodeType":"ExpressionStatement","src":"925:31:14"},{"expression":{"argumentTypes":null,"id":3642,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3640,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"966:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3641,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3625,"src":"974:6:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"966:14:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3643,"nodeType":"ExpressionStatement","src":"966:14:14"},{"expression":{"argumentTypes":null,"id":3646,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3644,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3601,"src":"990:8:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3645,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"1001:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"990:20:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"id":3647,"nodeType":"ExpressionStatement","src":"990:20:14"}]},"documentation":"@dev Constructor sets owner address and IPFS hash\n @param _ipfsHash Hash identifying off chain event description","id":3649,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3630,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3623,"src":"859:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3631,"modifierName":{"argumentTypes":null,"id":3629,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"853:5:14","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"853:14:14"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3628,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3623,"name":"proxied","nodeType":"VariableDeclaration","scope":3649,"src":"780:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3622,"name":"address","nodeType":"ElementaryTypeName","src":"780:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3625,"name":"_owner","nodeType":"VariableDeclaration","scope":3649,"src":"797:14:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3624,"name":"address","nodeType":"ElementaryTypeName","src":"797:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3627,"name":"_ipfsHash","nodeType":"VariableDeclaration","scope":3649,"src":"813:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3626,"name":"bytes","nodeType":"ElementaryTypeName","src":"813:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"779:50:14"},"payable":false,"returnParameters":{"id":3632,"nodeType":"ParameterList","parameters":[],"src":"872:0:14"},"scope":3650,"src":"768:249:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3720,"src":"569:450:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3651,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1183:7:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":3652,"nodeType":"InheritanceSpecifier","src":"1183:7:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3653,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1192:6:14","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":3654,"nodeType":"InheritanceSpecifier","src":"1192:6:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3655,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"1200:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3656,"nodeType":"InheritanceSpecifier","src":"1200:21:14"}],"contractDependencies":[3617,4717,6673],"contractKind":"contract","documentation":"@title Centralized oracle contract - Allows the contract owner to set an outcome\n @author Stefan George - ","fullyImplemented":true,"id":3719,"linearizedBaseContracts":[3719,3617,4717,6673],"name":"CentralizedOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":3676,"nodeType":"Block","src":"1406:132:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1457:6:14","subExpression":{"argumentTypes":null,"id":3664,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1458:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3663,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1449:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3666,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1449:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3667,"nodeType":"ExpressionStatement","src":"1449:15:14"},{"expression":{"argumentTypes":null,"id":3670,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3668,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"1474:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3669,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1482:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1474:16:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3671,"nodeType":"ExpressionStatement","src":"1474:16:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3673,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1522:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":3672,"name":"OwnerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3593,"src":"1505:16:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":3674,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1505:26:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3675,"nodeType":"EmitStatement","src":"1500:31:14"}]},"documentation":"@dev Replaces owner\n @param newOwner New owner","id":3677,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3661,"modifierName":{"argumentTypes":null,"id":3660,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1394:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1394:7:14"}],"name":"replaceOwner","nodeType":"FunctionDefinition","parameters":{"id":3659,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3658,"name":"newOwner","nodeType":"VariableDeclaration","scope":3677,"src":"1353:16:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3657,"name":"address","nodeType":"ElementaryTypeName","src":"1353:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1352:18:14"},"payable":false,"returnParameters":{"id":3662,"nodeType":"ParameterList","parameters":[],"src":"1406:0:14"},"scope":3719,"src":"1331:207:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3701,"nodeType":"Block","src":"1683:157:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1734:6:14","subExpression":{"argumentTypes":null,"id":3685,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1735:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3684,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1726:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3687,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1726:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3688,"nodeType":"ExpressionStatement","src":"1726:15:14"},{"expression":{"argumentTypes":null,"id":3691,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3689,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1751:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":3690,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1759:4:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"1751:12:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3692,"nodeType":"ExpressionStatement","src":"1751:12:14"},{"expression":{"argumentTypes":null,"id":3695,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3693,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"1773:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3694,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1783:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1773:18:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3696,"nodeType":"ExpressionStatement","src":"1773:18:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3698,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1824:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3697,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3597,"src":"1806:17:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":3699,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1806:27:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3700,"nodeType":"EmitStatement","src":"1801:32:14"}]},"documentation":"@dev Sets event outcome\n @param _outcome Event outcome","id":3702,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3682,"modifierName":{"argumentTypes":null,"id":3681,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1671:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1671:7:14"}],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":3680,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3679,"name":"_outcome","nodeType":"VariableDeclaration","scope":3702,"src":"1634:12:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3678,"name":"int","nodeType":"ElementaryTypeName","src":"1634:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1633:14:14"},"payable":false,"returnParameters":{"id":3683,"nodeType":"ParameterList","parameters":[],"src":"1683:0:14"},"scope":3719,"src":"1614:226:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3709,"nodeType":"Block","src":"2004:29:14","statements":[{"expression":{"argumentTypes":null,"id":3707,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"2021:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":3706,"id":3708,"nodeType":"Return","src":"2014:12:14"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":3710,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":3703,"nodeType":"ParameterList","parameters":[],"src":"1946:2:14"},"payable":false,"returnParameters":{"id":3706,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3705,"name":"","nodeType":"VariableDeclaration","scope":3710,"src":"1994:4:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3704,"name":"bool","nodeType":"ElementaryTypeName","src":"1994:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1993:6:14"},"scope":3719,"src":"1925:108:14","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":3717,"nodeType":"Block","src":"2168:31:14","statements":[{"expression":{"argumentTypes":null,"id":3715,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"2185:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":3714,"id":3716,"nodeType":"Return","src":"2178:14:14"}]},"documentation":"@dev Returns outcome\n @return Outcome","id":3718,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":3711,"nodeType":"ParameterList","parameters":[],"src":"2111:2:14"},"payable":false,"returnParameters":{"id":3714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3713,"name":"","nodeType":"VariableDeclaration","scope":3718,"src":"2159:3:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3712,"name":"int","nodeType":"ElementaryTypeName","src":"2159:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2158:5:14"},"scope":3719,"src":"2092:107:14","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":3720,"src":"1153:1048:14"}],"src":"0:2202:14"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0x3dda43f4e13815767eb9649bf611fcb48533eb5a","transactionHash":"0x66a74fd323a0f35f0527cc0034ecf77b4eeb7f3a3f2cda271bd9a145c7cedd76"},"3":{"address":"0x83f2a2c3a53b85da240e860d5029fbaf986dbd74","transactionHash":"0x57c1648bd3a605b930357cad27e0ce5c7be1856ffc301116b18e5e94197ed667"},"4":{"address":"0xd23c5d52ca9962ef2b796ca8de3fddf4759836da","transactionHash":"0x3ee7c8317b0dc27509bc5bdd46cf0c6fccf4e8db34e6fd92f506ebfa97f25bc3"},"42":{"address":"0xa5a6b57e05d97f5c0d8bff50e0e3b64e81f1f75d","transactionHash":"0xa314fee6d7544bc37b01cefd7fbcbc7baafb2d0968533576fa4f136f92072f73"},"437894314312":{"address":"0xc89ce4735882c9f0f0fe26686c53074e09b0d550","transactionHash":"0xfd303fb34007dc974eb17519b3ed5c43b8d435df4fa1d3128eead400d6e25fe2"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.802Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracleData.json": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracleData.json ***! + \*****************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"CentralizedOracleData","abi":[{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ipfsHash","outputs":[{"name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnerReplacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeAssignment","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b506102b0806100206000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100675780638da5cb5b14610092578063c623674f146100e9578063c65fb38014610179575b600080fd5b34801561007357600080fd5b5061007c6101a8565b6040518082815260200191505060405180910390f35b34801561009e57600080fd5b506100a76101ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100f557600080fd5b506100fe6101d3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561013e578082015181840152602081019050610123565b50505050905090810190601f16801561016b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018557600080fd5b5061018e610271565b604051808215151515815260200191505060405180910390f35b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102695780601f1061023e57610100808354040283529160200191610269565b820191906000526020600020905b81548152906001019060200180831161024c57829003601f168201915b505050505081565b600260009054906101000a900460ff16815600a165627a7a72305820f6c5b3ddd680dacb32cef8534ce202f1f647cdefb5b5fa8ce5af9f11863e67fd0029","deployedBytecode":"0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100675780638da5cb5b14610092578063c623674f146100e9578063c65fb38014610179575b600080fd5b34801561007357600080fd5b5061007c6101a8565b6040518082815260200191505060405180910390f35b34801561009e57600080fd5b506100a76101ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100f557600080fd5b506100fe6101d3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561013e578082015181840152602081019050610123565b50505050905090810190601f16801561016b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018557600080fd5b5061018e610271565b604051808215151515815260200191505060405180910390f35b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102695780601f1061023e57610100808354040283529160200191610269565b820191906000526020600020905b81548152906001019060200180831161024c57829003601f168201915b505050505081565b600260009054906101000a900460ff16815600a165627a7a72305820f6c5b3ddd680dacb32cef8534ce202f1f647cdefb5b5fa8ce5af9f11863e67fd0029","sourceMap":"115:452:14:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;115:452:14;;;;;;;","deployedSourceMap":"115:452:14:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;387:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;387:18:14;;;;;;;;;;;;;;;;;;;;;;;311:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;311:20:14;;;;;;;;;;;;;;;;;;;;;;;;;;;337:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;337:21:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;337:21:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;364:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;364:17:14;;;;;;;;;;;;;;;;;;;;;;;;;;;387:18;;;;:::o;311:20::-;;;;;;;;;;;;;:::o;337:21::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;364:17::-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract CentralizedOracleData {\n\n /*\n * Events\n */\n event OwnerReplacement(address indexed newOwner);\n event OutcomeAssignment(int outcome);\n\n /*\n * Storage\n */\n address public owner;\n bytes public ipfsHash;\n bool public isSet;\n int public outcome;\n\n /*\n * Modifiers\n */\n modifier isOwner () {\n // Only owner is allowed to proceed\n require(msg.sender == owner);\n _;\n }\n}\n\ncontract CentralizedOracleProxy is Proxy, CentralizedOracleData {\n\n /// @dev Constructor sets owner address and IPFS hash\n /// @param _ipfsHash Hash identifying off chain event description\n constructor(address proxied, address _owner, bytes _ipfsHash)\n public\n Proxy(proxied)\n {\n // Description hash cannot be null\n require(_ipfsHash.length == 46);\n owner = _owner;\n ipfsHash = _ipfsHash;\n }\n}\n\n/// @title Centralized oracle contract - Allows the contract owner to set an outcome\n/// @author Stefan George - \ncontract CentralizedOracle is Proxied, Oracle, CentralizedOracleData {\n\n /*\n * Public functions\n */\n /// @dev Replaces owner\n /// @param newOwner New owner\n function replaceOwner(address newOwner)\n public\n isOwner\n {\n // Result is not set yet\n require(!isSet);\n owner = newOwner;\n emit OwnerReplacement(newOwner);\n }\n\n /// @dev Sets event outcome\n /// @param _outcome Event outcome\n function setOutcome(int _outcome)\n public\n isOwner\n {\n // Result is not set yet\n require(!isSet);\n isSet = true;\n outcome = _outcome;\n emit OutcomeAssignment(_outcome);\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return outcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","exportedSymbols":{"CentralizedOracle":[3719],"CentralizedOracleData":[3617],"CentralizedOracleProxy":[3650]},"id":3720,"nodeType":"SourceUnit","nodes":[{"id":3587,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:14"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3588,"nodeType":"ImportDirective","scope":3720,"sourceUnit":4718,"src":"25:31:14","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3589,"nodeType":"ImportDirective","scope":3720,"sourceUnit":6702,"src":"57:55:14","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3617,"linearizedBaseContracts":[3617],"name":"CentralizedOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3593,"name":"OwnerReplacement","nodeType":"EventDefinition","parameters":{"id":3592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3591,"indexed":true,"name":"newOwner","nodeType":"VariableDeclaration","scope":3593,"src":"206:24:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3590,"name":"address","nodeType":"ElementaryTypeName","src":"206:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"205:26:14"},"src":"183:49:14"},{"anonymous":false,"documentation":null,"id":3597,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3596,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3595,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":3597,"src":"261:11:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3594,"name":"int","nodeType":"ElementaryTypeName","src":"261:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"260:13:14"},"src":"237:37:14"},{"constant":false,"id":3599,"name":"owner","nodeType":"VariableDeclaration","scope":3617,"src":"311:20:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3598,"name":"address","nodeType":"ElementaryTypeName","src":"311:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":3601,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3617,"src":"337:21:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes"},"typeName":{"id":3600,"name":"bytes","nodeType":"ElementaryTypeName","src":"337:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"public"},{"constant":false,"id":3603,"name":"isSet","nodeType":"VariableDeclaration","scope":3617,"src":"364:17:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3602,"name":"bool","nodeType":"ElementaryTypeName","src":"364:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":3605,"name":"outcome","nodeType":"VariableDeclaration","scope":3617,"src":"387:18:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3604,"name":"int","nodeType":"ElementaryTypeName","src":"387:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":3615,"nodeType":"Block","src":"465:100:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3608,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"527:3:14","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3609,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"527:10:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3610,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"541:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"527:19:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3607,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"519:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3612,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"519:28:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3613,"nodeType":"ExpressionStatement","src":"519:28:14"},{"id":3614,"nodeType":"PlaceholderStatement","src":"557:1:14"}]},"documentation":null,"id":3616,"name":"isOwner","nodeType":"ModifierDefinition","parameters":{"id":3606,"nodeType":"ParameterList","parameters":[],"src":"462:2:14"},"src":"445:120:14","visibility":"internal"}],"scope":3720,"src":"115:452:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3618,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"604:5:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3619,"nodeType":"InheritanceSpecifier","src":"604:5:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3620,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"611:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3621,"nodeType":"InheritanceSpecifier","src":"611:21:14"}],"contractDependencies":[3617,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3650,"linearizedBaseContracts":[3650,3617,6701,6673],"name":"CentralizedOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3648,"nodeType":"Block","src":"872:145:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3637,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3634,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"933:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"id":3635,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"933:16:14","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"3436","id":3636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"953:2:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_46_by_1","typeString":"int_const 46"},"value":"46"},"src":"933:22:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"925:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3638,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"925:31:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3639,"nodeType":"ExpressionStatement","src":"925:31:14"},{"expression":{"argumentTypes":null,"id":3642,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3640,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"966:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3641,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3625,"src":"974:6:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"966:14:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3643,"nodeType":"ExpressionStatement","src":"966:14:14"},{"expression":{"argumentTypes":null,"id":3646,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3644,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3601,"src":"990:8:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3645,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"1001:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"990:20:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"id":3647,"nodeType":"ExpressionStatement","src":"990:20:14"}]},"documentation":"@dev Constructor sets owner address and IPFS hash\n @param _ipfsHash Hash identifying off chain event description","id":3649,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3630,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3623,"src":"859:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3631,"modifierName":{"argumentTypes":null,"id":3629,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"853:5:14","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"853:14:14"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3628,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3623,"name":"proxied","nodeType":"VariableDeclaration","scope":3649,"src":"780:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3622,"name":"address","nodeType":"ElementaryTypeName","src":"780:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3625,"name":"_owner","nodeType":"VariableDeclaration","scope":3649,"src":"797:14:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3624,"name":"address","nodeType":"ElementaryTypeName","src":"797:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3627,"name":"_ipfsHash","nodeType":"VariableDeclaration","scope":3649,"src":"813:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3626,"name":"bytes","nodeType":"ElementaryTypeName","src":"813:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"779:50:14"},"payable":false,"returnParameters":{"id":3632,"nodeType":"ParameterList","parameters":[],"src":"872:0:14"},"scope":3650,"src":"768:249:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3720,"src":"569:450:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3651,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1183:7:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":3652,"nodeType":"InheritanceSpecifier","src":"1183:7:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3653,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1192:6:14","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":3654,"nodeType":"InheritanceSpecifier","src":"1192:6:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3655,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"1200:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3656,"nodeType":"InheritanceSpecifier","src":"1200:21:14"}],"contractDependencies":[3617,4717,6673],"contractKind":"contract","documentation":"@title Centralized oracle contract - Allows the contract owner to set an outcome\n @author Stefan George - ","fullyImplemented":true,"id":3719,"linearizedBaseContracts":[3719,3617,4717,6673],"name":"CentralizedOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":3676,"nodeType":"Block","src":"1406:132:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1457:6:14","subExpression":{"argumentTypes":null,"id":3664,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1458:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3663,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1449:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3666,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1449:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3667,"nodeType":"ExpressionStatement","src":"1449:15:14"},{"expression":{"argumentTypes":null,"id":3670,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3668,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"1474:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3669,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1482:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1474:16:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3671,"nodeType":"ExpressionStatement","src":"1474:16:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3673,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1522:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":3672,"name":"OwnerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3593,"src":"1505:16:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":3674,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1505:26:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3675,"nodeType":"EmitStatement","src":"1500:31:14"}]},"documentation":"@dev Replaces owner\n @param newOwner New owner","id":3677,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3661,"modifierName":{"argumentTypes":null,"id":3660,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1394:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1394:7:14"}],"name":"replaceOwner","nodeType":"FunctionDefinition","parameters":{"id":3659,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3658,"name":"newOwner","nodeType":"VariableDeclaration","scope":3677,"src":"1353:16:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3657,"name":"address","nodeType":"ElementaryTypeName","src":"1353:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1352:18:14"},"payable":false,"returnParameters":{"id":3662,"nodeType":"ParameterList","parameters":[],"src":"1406:0:14"},"scope":3719,"src":"1331:207:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3701,"nodeType":"Block","src":"1683:157:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1734:6:14","subExpression":{"argumentTypes":null,"id":3685,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1735:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3684,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1726:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3687,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1726:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3688,"nodeType":"ExpressionStatement","src":"1726:15:14"},{"expression":{"argumentTypes":null,"id":3691,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3689,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1751:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":3690,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1759:4:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"1751:12:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3692,"nodeType":"ExpressionStatement","src":"1751:12:14"},{"expression":{"argumentTypes":null,"id":3695,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3693,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"1773:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3694,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1783:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1773:18:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3696,"nodeType":"ExpressionStatement","src":"1773:18:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3698,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1824:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3697,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3597,"src":"1806:17:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":3699,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1806:27:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3700,"nodeType":"EmitStatement","src":"1801:32:14"}]},"documentation":"@dev Sets event outcome\n @param _outcome Event outcome","id":3702,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3682,"modifierName":{"argumentTypes":null,"id":3681,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1671:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1671:7:14"}],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":3680,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3679,"name":"_outcome","nodeType":"VariableDeclaration","scope":3702,"src":"1634:12:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3678,"name":"int","nodeType":"ElementaryTypeName","src":"1634:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1633:14:14"},"payable":false,"returnParameters":{"id":3683,"nodeType":"ParameterList","parameters":[],"src":"1683:0:14"},"scope":3719,"src":"1614:226:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3709,"nodeType":"Block","src":"2004:29:14","statements":[{"expression":{"argumentTypes":null,"id":3707,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"2021:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":3706,"id":3708,"nodeType":"Return","src":"2014:12:14"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":3710,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":3703,"nodeType":"ParameterList","parameters":[],"src":"1946:2:14"},"payable":false,"returnParameters":{"id":3706,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3705,"name":"","nodeType":"VariableDeclaration","scope":3710,"src":"1994:4:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3704,"name":"bool","nodeType":"ElementaryTypeName","src":"1994:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1993:6:14"},"scope":3719,"src":"1925:108:14","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":3717,"nodeType":"Block","src":"2168:31:14","statements":[{"expression":{"argumentTypes":null,"id":3715,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"2185:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":3714,"id":3716,"nodeType":"Return","src":"2178:14:14"}]},"documentation":"@dev Returns outcome\n @return Outcome","id":3718,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":3711,"nodeType":"ParameterList","parameters":[],"src":"2111:2:14"},"payable":false,"returnParameters":{"id":3714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3713,"name":"","nodeType":"VariableDeclaration","scope":3718,"src":"2159:3:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3712,"name":"int","nodeType":"ElementaryTypeName","src":"2159:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2158:5:14"},"scope":3719,"src":"2092:107:14","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":3720,"src":"1153:1048:14"}],"src":"0:2202:14"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","exportedSymbols":{"CentralizedOracle":[3719],"CentralizedOracleData":[3617],"CentralizedOracleProxy":[3650]},"id":3720,"nodeType":"SourceUnit","nodes":[{"id":3587,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:14"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3588,"nodeType":"ImportDirective","scope":3720,"sourceUnit":4718,"src":"25:31:14","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3589,"nodeType":"ImportDirective","scope":3720,"sourceUnit":6702,"src":"57:55:14","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3617,"linearizedBaseContracts":[3617],"name":"CentralizedOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3593,"name":"OwnerReplacement","nodeType":"EventDefinition","parameters":{"id":3592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3591,"indexed":true,"name":"newOwner","nodeType":"VariableDeclaration","scope":3593,"src":"206:24:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3590,"name":"address","nodeType":"ElementaryTypeName","src":"206:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"205:26:14"},"src":"183:49:14"},{"anonymous":false,"documentation":null,"id":3597,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3596,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3595,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":3597,"src":"261:11:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3594,"name":"int","nodeType":"ElementaryTypeName","src":"261:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"260:13:14"},"src":"237:37:14"},{"constant":false,"id":3599,"name":"owner","nodeType":"VariableDeclaration","scope":3617,"src":"311:20:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3598,"name":"address","nodeType":"ElementaryTypeName","src":"311:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":3601,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3617,"src":"337:21:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes"},"typeName":{"id":3600,"name":"bytes","nodeType":"ElementaryTypeName","src":"337:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"public"},{"constant":false,"id":3603,"name":"isSet","nodeType":"VariableDeclaration","scope":3617,"src":"364:17:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3602,"name":"bool","nodeType":"ElementaryTypeName","src":"364:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":3605,"name":"outcome","nodeType":"VariableDeclaration","scope":3617,"src":"387:18:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3604,"name":"int","nodeType":"ElementaryTypeName","src":"387:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":3615,"nodeType":"Block","src":"465:100:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3608,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"527:3:14","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3609,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"527:10:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3610,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"541:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"527:19:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3607,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"519:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3612,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"519:28:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3613,"nodeType":"ExpressionStatement","src":"519:28:14"},{"id":3614,"nodeType":"PlaceholderStatement","src":"557:1:14"}]},"documentation":null,"id":3616,"name":"isOwner","nodeType":"ModifierDefinition","parameters":{"id":3606,"nodeType":"ParameterList","parameters":[],"src":"462:2:14"},"src":"445:120:14","visibility":"internal"}],"scope":3720,"src":"115:452:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3618,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"604:5:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3619,"nodeType":"InheritanceSpecifier","src":"604:5:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3620,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"611:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3621,"nodeType":"InheritanceSpecifier","src":"611:21:14"}],"contractDependencies":[3617,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3650,"linearizedBaseContracts":[3650,3617,6701,6673],"name":"CentralizedOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3648,"nodeType":"Block","src":"872:145:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3637,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3634,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"933:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"id":3635,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"933:16:14","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"3436","id":3636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"953:2:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_46_by_1","typeString":"int_const 46"},"value":"46"},"src":"933:22:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"925:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3638,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"925:31:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3639,"nodeType":"ExpressionStatement","src":"925:31:14"},{"expression":{"argumentTypes":null,"id":3642,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3640,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"966:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3641,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3625,"src":"974:6:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"966:14:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3643,"nodeType":"ExpressionStatement","src":"966:14:14"},{"expression":{"argumentTypes":null,"id":3646,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3644,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3601,"src":"990:8:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3645,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"1001:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"990:20:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"id":3647,"nodeType":"ExpressionStatement","src":"990:20:14"}]},"documentation":"@dev Constructor sets owner address and IPFS hash\n @param _ipfsHash Hash identifying off chain event description","id":3649,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3630,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3623,"src":"859:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3631,"modifierName":{"argumentTypes":null,"id":3629,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"853:5:14","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"853:14:14"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3628,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3623,"name":"proxied","nodeType":"VariableDeclaration","scope":3649,"src":"780:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3622,"name":"address","nodeType":"ElementaryTypeName","src":"780:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3625,"name":"_owner","nodeType":"VariableDeclaration","scope":3649,"src":"797:14:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3624,"name":"address","nodeType":"ElementaryTypeName","src":"797:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3627,"name":"_ipfsHash","nodeType":"VariableDeclaration","scope":3649,"src":"813:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3626,"name":"bytes","nodeType":"ElementaryTypeName","src":"813:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"779:50:14"},"payable":false,"returnParameters":{"id":3632,"nodeType":"ParameterList","parameters":[],"src":"872:0:14"},"scope":3650,"src":"768:249:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3720,"src":"569:450:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3651,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1183:7:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":3652,"nodeType":"InheritanceSpecifier","src":"1183:7:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3653,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1192:6:14","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":3654,"nodeType":"InheritanceSpecifier","src":"1192:6:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3655,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"1200:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3656,"nodeType":"InheritanceSpecifier","src":"1200:21:14"}],"contractDependencies":[3617,4717,6673],"contractKind":"contract","documentation":"@title Centralized oracle contract - Allows the contract owner to set an outcome\n @author Stefan George - ","fullyImplemented":true,"id":3719,"linearizedBaseContracts":[3719,3617,4717,6673],"name":"CentralizedOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":3676,"nodeType":"Block","src":"1406:132:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1457:6:14","subExpression":{"argumentTypes":null,"id":3664,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1458:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3663,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1449:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3666,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1449:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3667,"nodeType":"ExpressionStatement","src":"1449:15:14"},{"expression":{"argumentTypes":null,"id":3670,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3668,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"1474:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3669,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1482:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1474:16:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3671,"nodeType":"ExpressionStatement","src":"1474:16:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3673,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1522:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":3672,"name":"OwnerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3593,"src":"1505:16:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":3674,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1505:26:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3675,"nodeType":"EmitStatement","src":"1500:31:14"}]},"documentation":"@dev Replaces owner\n @param newOwner New owner","id":3677,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3661,"modifierName":{"argumentTypes":null,"id":3660,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1394:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1394:7:14"}],"name":"replaceOwner","nodeType":"FunctionDefinition","parameters":{"id":3659,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3658,"name":"newOwner","nodeType":"VariableDeclaration","scope":3677,"src":"1353:16:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3657,"name":"address","nodeType":"ElementaryTypeName","src":"1353:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1352:18:14"},"payable":false,"returnParameters":{"id":3662,"nodeType":"ParameterList","parameters":[],"src":"1406:0:14"},"scope":3719,"src":"1331:207:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3701,"nodeType":"Block","src":"1683:157:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1734:6:14","subExpression":{"argumentTypes":null,"id":3685,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1735:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3684,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1726:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3687,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1726:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3688,"nodeType":"ExpressionStatement","src":"1726:15:14"},{"expression":{"argumentTypes":null,"id":3691,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3689,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1751:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":3690,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1759:4:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"1751:12:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3692,"nodeType":"ExpressionStatement","src":"1751:12:14"},{"expression":{"argumentTypes":null,"id":3695,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3693,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"1773:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3694,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1783:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1773:18:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3696,"nodeType":"ExpressionStatement","src":"1773:18:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3698,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1824:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3697,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3597,"src":"1806:17:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":3699,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1806:27:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3700,"nodeType":"EmitStatement","src":"1801:32:14"}]},"documentation":"@dev Sets event outcome\n @param _outcome Event outcome","id":3702,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3682,"modifierName":{"argumentTypes":null,"id":3681,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1671:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1671:7:14"}],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":3680,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3679,"name":"_outcome","nodeType":"VariableDeclaration","scope":3702,"src":"1634:12:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3678,"name":"int","nodeType":"ElementaryTypeName","src":"1634:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1633:14:14"},"payable":false,"returnParameters":{"id":3683,"nodeType":"ParameterList","parameters":[],"src":"1683:0:14"},"scope":3719,"src":"1614:226:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3709,"nodeType":"Block","src":"2004:29:14","statements":[{"expression":{"argumentTypes":null,"id":3707,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"2021:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":3706,"id":3708,"nodeType":"Return","src":"2014:12:14"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":3710,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":3703,"nodeType":"ParameterList","parameters":[],"src":"1946:2:14"},"payable":false,"returnParameters":{"id":3706,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3705,"name":"","nodeType":"VariableDeclaration","scope":3710,"src":"1994:4:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3704,"name":"bool","nodeType":"ElementaryTypeName","src":"1994:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1993:6:14"},"scope":3719,"src":"1925:108:14","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":3717,"nodeType":"Block","src":"2168:31:14","statements":[{"expression":{"argumentTypes":null,"id":3715,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"2185:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":3714,"id":3716,"nodeType":"Return","src":"2178:14:14"}]},"documentation":"@dev Returns outcome\n @return Outcome","id":3718,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":3711,"nodeType":"ParameterList","parameters":[],"src":"2111:2:14"},"payable":false,"returnParameters":{"id":3714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3713,"name":"","nodeType":"VariableDeclaration","scope":3718,"src":"2159:3:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3712,"name":"int","nodeType":"ElementaryTypeName","src":"2159:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2158:5:14"},"scope":3719,"src":"2092:107:14","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":3720,"src":"1153:1048:14"}],"src":"0:2202:14"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.018Z"}; /***/ }), @@ -187,10 +274,43 @@ module.exports = {"contract_name":"CentralizedOracle","abi":[{"constant":true,"i /*!********************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracleFactory.json ***! \********************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"CentralizedOracleFactory","abi":[{"constant":true,"inputs":[],"name":"centralizedOracleMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_centralizedOracleMasterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"centralizedOracle","type":"address"},{"indexed":false,"name":"ipfsHash","type":"bytes"}],"name":"CentralizedOracleCreation","type":"event"},{"constant":false,"inputs":[{"name":"ipfsHash","type":"bytes"}],"name":"createCentralizedOracle","outputs":[{"name":"centralizedOracle","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160208061099783398101806040528101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610914806100836000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634e2f220c14610051578063af09ff55146100fa575b600080fd5b34801561005d57600080fd5b506100b8600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610151565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010657600080fd5b5061010f61035f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16338361017f610384565b808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610220578082015181840152602081019050610205565b50505050905090810190601f16801561024d5780820380516001836020036101000a031916815260200191505b50945050505050604051809103906000f080158015610270573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f33a1926cf5c2f7306ac1685bf19260d678fea874f5f59c00b69fa5e2643ecfd28284604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561031f578082015181840152602081019050610304565b50505050905090810190601f16801561034c5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60405161055480610395833901905600608060405234801561001057600080fd5b506040516105543803806105548339810180604052810190808051906020019092919080519060200190929190805182019291905050508260008173ffffffffffffffffffffffffffffffffffffffff161415151561006e57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050602e81511415156100bf57600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806002908051906020019061011692919061011f565b505050506101c4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061016057805160ff191683800117855561018e565b8280016001018555821561018e579182015b8281111561018d578251825591602001919060010190610172565b5b50905061019b919061019f565b5090565b6101c191905b808211156101bd5760008160009055506001016101a5565b5090565b90565b610381806101d36000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100bb5780638da5cb5b146100e6578063a619486e1461013d578063c623674f14610194578063c65fb38014610224575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100b6573d6000f35b3d6000fd5b3480156100c757600080fd5b506100d0610253565b6040518082815260200191505060405180910390f35b3480156100f257600080fd5b506100fb610259565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014957600080fd5b5061015261027f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a057600080fd5b506101a96102a4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e95780820151818401526020810190506101ce565b50505050905090810190601f1680156102165780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023057600080fd5b50610239610342565b604051808215151515815260200191505060405180910390f35b60045481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b505050505081565b600360009054906101000a900460ff16815600a165627a7a72305820bb3f2844f203a8387f32a60a556ec891f91f0b5c41b00eb4c82aba0bc9849b800029a165627a7a7230582081e5efec6ef74e77fbf85d820b15a38f8630dc6e2ebbc38d66ec69ba1fe620000029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634e2f220c14610051578063af09ff55146100fa575b600080fd5b34801561005d57600080fd5b506100b8600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610151565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010657600080fd5b5061010f61035f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16338361017f610384565b808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610220578082015181840152602081019050610205565b50505050905090810190601f16801561024d5780820380516001836020036101000a031916815260200191505b50945050505050604051809103906000f080158015610270573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f33a1926cf5c2f7306ac1685bf19260d678fea874f5f59c00b69fa5e2643ecfd28284604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561031f578082015181840152602081019050610304565b50505050905090810190601f16801561034c5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60405161055480610395833901905600608060405234801561001057600080fd5b506040516105543803806105548339810180604052810190808051906020019092919080519060200190929190805182019291905050508260008173ffffffffffffffffffffffffffffffffffffffff161415151561006e57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050602e81511415156100bf57600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806002908051906020019061011692919061011f565b505050506101c4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061016057805160ff191683800117855561018e565b8280016001018555821561018e579182015b8281111561018d578251825591602001919060010190610172565b5b50905061019b919061019f565b5090565b6101c191905b808211156101bd5760008160009055506001016101a5565b5090565b90565b610381806101d36000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100bb5780638da5cb5b146100e6578063a619486e1461013d578063c623674f14610194578063c65fb38014610224575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100b6573d6000f35b3d6000fd5b3480156100c757600080fd5b506100d0610253565b6040518082815260200191505060405180910390f35b3480156100f257600080fd5b506100fb610259565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014957600080fd5b5061015261027f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a057600080fd5b506101a96102a4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e95780820151818401526020810190506101ce565b50505050905090810190601f1680156102165780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023057600080fd5b50610239610342565b604051808215151515815260200191505060405180910390f35b60045481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b505050505081565b600360009054906101000a900460ff16815600a165627a7a72305820bb3f2844f203a8387f32a60a556ec891f91f0b5c41b00eb4c82aba0bc9849b800029a165627a7a7230582081e5efec6ef74e77fbf85d820b15a38f8630dc6e2ebbc38d66ec69ba1fe620000029","sourceMap":"212:971:15:-;;;529:154;8:9:-1;5:2;;;30:1;27;20:12;5:2;529:154:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;648:28;618:27;;:58;;;;;;;;;;;;;;;;;;529:154;212:971;;;;;;","deployedSourceMap":"212:971:15:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;845:336;;8:9:-1;5:2;;;30:1;27;20:12;5:2;845:336:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;430:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;430:52:15;;;;;;;;;;;;;;;;;;;;;;;;;;;845:336;926:35;1042:27;;;;;;;;;;;1071:10;1083:8;1015:77;;:::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;1015:77:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1015:77:15;977:116;;1134:10;1108:66;;;1146:17;1165:8;1108:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1108:66:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;845:336;;;:::o;430:52::-;;;;;;;;;;;;;:::o;212:971::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/CentralizedOracle.sol\";\n\n\n/// @title Centralized oracle factory contract - Allows to create centralized oracle contracts\n/// @author Stefan George - \ncontract CentralizedOracleFactory {\n\n /*\n * Events\n */\n event CentralizedOracleCreation(address indexed creator, CentralizedOracle centralizedOracle, bytes ipfsHash);\n\n /*\n * Storage\n */\n CentralizedOracle public centralizedOracleMasterCopy;\n\n /*\n * Public functions\n */\n constructor(CentralizedOracle _centralizedOracleMasterCopy)\n public\n {\n centralizedOracleMasterCopy = _centralizedOracleMasterCopy;\n }\n\n /// @dev Creates a new centralized oracle contract\n /// @param ipfsHash Hash identifying off chain event description\n /// @return Oracle contract\n function createCentralizedOracle(bytes ipfsHash)\n public\n returns (CentralizedOracle centralizedOracle)\n {\n centralizedOracle = CentralizedOracle(new CentralizedOracleProxy(centralizedOracleMasterCopy, msg.sender, ipfsHash));\n emit CentralizedOracleCreation(msg.sender, centralizedOracle, ipfsHash);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracleFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracleFactory.sol","exportedSymbols":{"CentralizedOracleFactory":[3770]},"id":3771,"nodeType":"SourceUnit","nodes":[{"id":3721,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:15"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","file":"../Oracles/CentralizedOracle.sol","id":3722,"nodeType":"ImportDirective","scope":3771,"sourceUnit":3720,"src":"25:42:15","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[3650],"contractKind":"contract","documentation":"@title Centralized oracle factory contract - Allows to create centralized oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":3770,"linearizedBaseContracts":[3770],"name":"CentralizedOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3730,"name":"CentralizedOracleCreation","nodeType":"EventDefinition","parameters":{"id":3729,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3724,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":3730,"src":"315:23:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3723,"name":"address","nodeType":"ElementaryTypeName","src":"315:7:15","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3726,"indexed":false,"name":"centralizedOracle","nodeType":"VariableDeclaration","scope":3730,"src":"340:35:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},"typeName":{"contractScope":null,"id":3725,"name":"CentralizedOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3719,"src":"340:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3728,"indexed":false,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3730,"src":"377:14:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3727,"name":"bytes","nodeType":"ElementaryTypeName","src":"377:5:15","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"314:78:15"},"src":"283:110:15"},{"constant":false,"id":3732,"name":"centralizedOracleMasterCopy","nodeType":"VariableDeclaration","scope":3770,"src":"430:52:15","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},"typeName":{"contractScope":null,"id":3731,"name":"CentralizedOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3719,"src":"430:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"value":null,"visibility":"public"},{"body":{"id":3741,"nodeType":"Block","src":"608:75:15","statements":[{"expression":{"argumentTypes":null,"id":3739,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3737,"name":"centralizedOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3732,"src":"618:27:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3738,"name":"_centralizedOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3734,"src":"648:28:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"src":"618:58:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"id":3740,"nodeType":"ExpressionStatement","src":"618:58:15"}]},"documentation":null,"id":3742,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3735,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3734,"name":"_centralizedOracleMasterCopy","nodeType":"VariableDeclaration","scope":3742,"src":"541:46:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},"typeName":{"contractScope":null,"id":3733,"name":"CentralizedOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3719,"src":"541:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"value":null,"visibility":"internal"}],"src":"540:48:15"},"payable":false,"returnParameters":{"id":3736,"nodeType":"ParameterList","parameters":[],"src":"608:0:15"},"scope":3770,"src":"529:154:15","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3768,"nodeType":"Block","src":"967:214:15","statements":[{"expression":{"argumentTypes":null,"id":3759,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3749,"name":"centralizedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3747,"src":"977:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3753,"name":"centralizedOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3732,"src":"1042:27:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3754,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1071:3:15","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3755,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1071:10:15","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3756,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3744,"src":"1083:8:15","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":3752,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1015:26:15","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_bytes_memory_ptr_$returns$_t_contract$_CentralizedOracleProxy_$3650_$","typeString":"function (address,address,bytes memory) returns (contract CentralizedOracleProxy)"},"typeName":{"contractScope":null,"id":3751,"name":"CentralizedOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":3650,"src":"1019:22:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleProxy_$3650","typeString":"contract CentralizedOracleProxy"}}},"id":3757,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1015:77:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleProxy_$3650","typeString":"contract CentralizedOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CentralizedOracleProxy_$3650","typeString":"contract CentralizedOracleProxy"}],"id":3750,"name":"CentralizedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3719,"src":"997:17:15","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_CentralizedOracle_$3719_$","typeString":"type(contract CentralizedOracle)"}},"id":3758,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"997:96:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"src":"977:116:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"id":3760,"nodeType":"ExpressionStatement","src":"977:116:15"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3762,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1134:3:15","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3763,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1134:10:15","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3764,"name":"centralizedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3747,"src":"1146:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},{"argumentTypes":null,"id":3765,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3744,"src":"1165:8:15","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":3761,"name":"CentralizedOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3730,"src":"1108:25:15","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_CentralizedOracle_$3719_$_t_bytes_memory_ptr_$returns$__$","typeString":"function (address,contract CentralizedOracle,bytes memory)"}},"id":3766,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1108:66:15","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3767,"nodeType":"EmitStatement","src":"1103:71:15"}]},"documentation":"@dev Creates a new centralized oracle contract\n @param ipfsHash Hash identifying off chain event description\n @return Oracle contract","id":3769,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createCentralizedOracle","nodeType":"FunctionDefinition","parameters":{"id":3745,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3744,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3769,"src":"878:14:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3743,"name":"bytes","nodeType":"ElementaryTypeName","src":"878:5:15","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"877:16:15"},"payable":false,"returnParameters":{"id":3748,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3747,"name":"centralizedOracle","nodeType":"VariableDeclaration","scope":3769,"src":"926:35:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},"typeName":{"contractScope":null,"id":3746,"name":"CentralizedOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3719,"src":"926:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"value":null,"visibility":"internal"}],"src":"925:37:15"},"scope":3770,"src":"845:336:15","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3771,"src":"212:971:15"}],"src":"0:1184:15"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracleFactory.sol","exportedSymbols":{"CentralizedOracleFactory":[3770]},"id":3771,"nodeType":"SourceUnit","nodes":[{"id":3721,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:15"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","file":"../Oracles/CentralizedOracle.sol","id":3722,"nodeType":"ImportDirective","scope":3771,"sourceUnit":3720,"src":"25:42:15","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[3650],"contractKind":"contract","documentation":"@title Centralized oracle factory contract - Allows to create centralized oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":3770,"linearizedBaseContracts":[3770],"name":"CentralizedOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3730,"name":"CentralizedOracleCreation","nodeType":"EventDefinition","parameters":{"id":3729,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3724,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":3730,"src":"315:23:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3723,"name":"address","nodeType":"ElementaryTypeName","src":"315:7:15","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3726,"indexed":false,"name":"centralizedOracle","nodeType":"VariableDeclaration","scope":3730,"src":"340:35:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},"typeName":{"contractScope":null,"id":3725,"name":"CentralizedOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3719,"src":"340:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3728,"indexed":false,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3730,"src":"377:14:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3727,"name":"bytes","nodeType":"ElementaryTypeName","src":"377:5:15","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"314:78:15"},"src":"283:110:15"},{"constant":false,"id":3732,"name":"centralizedOracleMasterCopy","nodeType":"VariableDeclaration","scope":3770,"src":"430:52:15","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},"typeName":{"contractScope":null,"id":3731,"name":"CentralizedOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3719,"src":"430:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"value":null,"visibility":"public"},{"body":{"id":3741,"nodeType":"Block","src":"608:75:15","statements":[{"expression":{"argumentTypes":null,"id":3739,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3737,"name":"centralizedOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3732,"src":"618:27:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3738,"name":"_centralizedOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3734,"src":"648:28:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"src":"618:58:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"id":3740,"nodeType":"ExpressionStatement","src":"618:58:15"}]},"documentation":null,"id":3742,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3735,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3734,"name":"_centralizedOracleMasterCopy","nodeType":"VariableDeclaration","scope":3742,"src":"541:46:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},"typeName":{"contractScope":null,"id":3733,"name":"CentralizedOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3719,"src":"541:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"value":null,"visibility":"internal"}],"src":"540:48:15"},"payable":false,"returnParameters":{"id":3736,"nodeType":"ParameterList","parameters":[],"src":"608:0:15"},"scope":3770,"src":"529:154:15","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3768,"nodeType":"Block","src":"967:214:15","statements":[{"expression":{"argumentTypes":null,"id":3759,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3749,"name":"centralizedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3747,"src":"977:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3753,"name":"centralizedOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3732,"src":"1042:27:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3754,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1071:3:15","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3755,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1071:10:15","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3756,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3744,"src":"1083:8:15","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":3752,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1015:26:15","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_bytes_memory_ptr_$returns$_t_contract$_CentralizedOracleProxy_$3650_$","typeString":"function (address,address,bytes memory) returns (contract CentralizedOracleProxy)"},"typeName":{"contractScope":null,"id":3751,"name":"CentralizedOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":3650,"src":"1019:22:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleProxy_$3650","typeString":"contract CentralizedOracleProxy"}}},"id":3757,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1015:77:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleProxy_$3650","typeString":"contract CentralizedOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CentralizedOracleProxy_$3650","typeString":"contract CentralizedOracleProxy"}],"id":3750,"name":"CentralizedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3719,"src":"997:17:15","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_CentralizedOracle_$3719_$","typeString":"type(contract CentralizedOracle)"}},"id":3758,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"997:96:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"src":"977:116:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"id":3760,"nodeType":"ExpressionStatement","src":"977:116:15"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3762,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1134:3:15","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3763,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1134:10:15","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3764,"name":"centralizedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3747,"src":"1146:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},{"argumentTypes":null,"id":3765,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3744,"src":"1165:8:15","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":3761,"name":"CentralizedOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3730,"src":"1108:25:15","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_CentralizedOracle_$3719_$_t_bytes_memory_ptr_$returns$__$","typeString":"function (address,contract CentralizedOracle,bytes memory)"}},"id":3766,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1108:66:15","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3767,"nodeType":"EmitStatement","src":"1103:71:15"}]},"documentation":"@dev Creates a new centralized oracle contract\n @param ipfsHash Hash identifying off chain event description\n @return Oracle contract","id":3769,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createCentralizedOracle","nodeType":"FunctionDefinition","parameters":{"id":3745,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3744,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3769,"src":"878:14:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3743,"name":"bytes","nodeType":"ElementaryTypeName","src":"878:5:15","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"877:16:15"},"payable":false,"returnParameters":{"id":3748,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3747,"name":"centralizedOracle","nodeType":"VariableDeclaration","scope":3769,"src":"926:35:15","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"},"typeName":{"contractScope":null,"id":3746,"name":"CentralizedOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3719,"src":"926:17:15","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracle_$3719","typeString":"contract CentralizedOracle"}},"value":null,"visibility":"internal"}],"src":"925:37:15"},"scope":3770,"src":"845:336:15","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3771,"src":"212:971:15"}],"src":"0:1184:15"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0xfb60b8ffdb16420b8afc3b77a9a3186bc905ef1f","transactionHash":"0x8ce4d0a8b29dcc78a4f59521c35c56020600d972926e4817aeb0fb7dddacad90"},"3":{"address":"0x35d79cf9134fc5c5fc66986dc628cf3f39d527ba","transactionHash":"0x04451c88b6186dec25eeef688a393639f56e3f243ba5d71a3a1c65e7cf11036b"},"4":{"address":"0x7905fb9ce7dec392deabeae0067ea7cbaaca06b9","transactionHash":"0xad9a300e9167e882c1a3b7c5ff111ab1abd96d803d858eabbf04c4b17ffa9b15"},"42":{"address":"0x52e253300ba065a44effb68e989e3c0ccbb5a035","transactionHash":"0xa04f724059e760afa2c024c01ead5ebf127e164c84aecb63bb27693590280ee9"},"437894314312":{"address":"0x630589690929e9cdefdef0734717a9ef3ec7fcfe","transactionHash":"0xebb4f7636ef2b505180889831169326f23ec81ebefd3fb1a53740db3bd7fe8d1"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.797Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracleProxy.json": +/*!******************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/CentralizedOracleProxy.json ***! + \******************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"CentralizedOracleProxy","abi":[{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","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":"ipfsHash","outputs":[{"name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"proxied","type":"address"},{"name":"_owner","type":"address"},{"name":"_ipfsHash","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnerReplacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeAssignment","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b506040516105543803806105548339810180604052810190808051906020019092919080519060200190929190805182019291905050508260008173ffffffffffffffffffffffffffffffffffffffff161415151561006e57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050602e81511415156100bf57600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806002908051906020019061011692919061011f565b505050506101c4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061016057805160ff191683800117855561018e565b8280016001018555821561018e579182015b8281111561018d578251825591602001919060010190610172565b5b50905061019b919061019f565b5090565b6101c191905b808211156101bd5760008160009055506001016101a5565b5090565b90565b610381806101d36000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100bb5780638da5cb5b146100e6578063a619486e1461013d578063c623674f14610194578063c65fb38014610224575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100b6573d6000f35b3d6000fd5b3480156100c757600080fd5b506100d0610253565b6040518082815260200191505060405180910390f35b3480156100f257600080fd5b506100fb610259565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014957600080fd5b5061015261027f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a057600080fd5b506101a96102a4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e95780820151818401526020810190506101ce565b50505050905090810190601f1680156102165780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023057600080fd5b50610239610342565b604051808215151515815260200191505060405180910390f35b60045481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b505050505081565b600360009054906101000a900460ff16815600a165627a7a72305820bb3f2844f203a8387f32a60a556ec891f91f0b5c41b00eb4c82aba0bc9849b800029","deployedBytecode":"0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100bb5780638da5cb5b146100e6578063a619486e1461013d578063c623674f14610194578063c65fb38014610224575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100b6573d6000f35b3d6000fd5b3480156100c757600080fd5b506100d0610253565b6040518082815260200191505060405180910390f35b3480156100f257600080fd5b506100fb610259565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014957600080fd5b5061015261027f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a057600080fd5b506101a96102a4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e95780820151818401526020810190506101ce565b50505050905090810190601f1680156102165780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023057600080fd5b50610239610342565b604051808215151515815260200191505060405180910390f35b60045481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b505050505081565b600360009054906101000a900460ff16815600a165627a7a72305820bb3f2844f203a8387f32a60a556ec891f91f0b5c41b00eb4c82aba0bc9849b800029","sourceMap":"569:450:14:-;;;768:249;8:9:-1;5:2;;;30:1;27;20:12;5:2;768:249:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;859:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;953:2:14;933:9;:16;:22;925:31;;;;;;;;974:6;966:5;;:14;;;;;;;;;;;;;;;;;;1001:9;990:8;:20;;;;;;;;;;;;:::i;:::-;;768:249;;;569:450;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;","deployedSourceMap":"569:450:14:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;387:18:14;;8:9:-1;5:2;;;30:1;27;20:12;5:2;387:18:14;;;;;;;;;;;;;;;;;;;;;;;311:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;311:20:14;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;337:21:14;;8:9:-1;5:2;;;30:1;27;20:12;5:2;337:21:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;337:21:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;364:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;364:17:14;;;;;;;;;;;;;;;;;;;;;;;;;;;387:18;;;;:::o;311:20::-;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;337:21:14:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;364:17::-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract CentralizedOracleData {\n\n /*\n * Events\n */\n event OwnerReplacement(address indexed newOwner);\n event OutcomeAssignment(int outcome);\n\n /*\n * Storage\n */\n address public owner;\n bytes public ipfsHash;\n bool public isSet;\n int public outcome;\n\n /*\n * Modifiers\n */\n modifier isOwner () {\n // Only owner is allowed to proceed\n require(msg.sender == owner);\n _;\n }\n}\n\ncontract CentralizedOracleProxy is Proxy, CentralizedOracleData {\n\n /// @dev Constructor sets owner address and IPFS hash\n /// @param _ipfsHash Hash identifying off chain event description\n constructor(address proxied, address _owner, bytes _ipfsHash)\n public\n Proxy(proxied)\n {\n // Description hash cannot be null\n require(_ipfsHash.length == 46);\n owner = _owner;\n ipfsHash = _ipfsHash;\n }\n}\n\n/// @title Centralized oracle contract - Allows the contract owner to set an outcome\n/// @author Stefan George - \ncontract CentralizedOracle is Proxied, Oracle, CentralizedOracleData {\n\n /*\n * Public functions\n */\n /// @dev Replaces owner\n /// @param newOwner New owner\n function replaceOwner(address newOwner)\n public\n isOwner\n {\n // Result is not set yet\n require(!isSet);\n owner = newOwner;\n emit OwnerReplacement(newOwner);\n }\n\n /// @dev Sets event outcome\n /// @param _outcome Event outcome\n function setOutcome(int _outcome)\n public\n isOwner\n {\n // Result is not set yet\n require(!isSet);\n isSet = true;\n outcome = _outcome;\n emit OutcomeAssignment(_outcome);\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return outcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","exportedSymbols":{"CentralizedOracle":[3719],"CentralizedOracleData":[3617],"CentralizedOracleProxy":[3650]},"id":3720,"nodeType":"SourceUnit","nodes":[{"id":3587,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:14"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3588,"nodeType":"ImportDirective","scope":3720,"sourceUnit":4718,"src":"25:31:14","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3589,"nodeType":"ImportDirective","scope":3720,"sourceUnit":6702,"src":"57:55:14","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3617,"linearizedBaseContracts":[3617],"name":"CentralizedOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3593,"name":"OwnerReplacement","nodeType":"EventDefinition","parameters":{"id":3592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3591,"indexed":true,"name":"newOwner","nodeType":"VariableDeclaration","scope":3593,"src":"206:24:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3590,"name":"address","nodeType":"ElementaryTypeName","src":"206:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"205:26:14"},"src":"183:49:14"},{"anonymous":false,"documentation":null,"id":3597,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3596,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3595,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":3597,"src":"261:11:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3594,"name":"int","nodeType":"ElementaryTypeName","src":"261:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"260:13:14"},"src":"237:37:14"},{"constant":false,"id":3599,"name":"owner","nodeType":"VariableDeclaration","scope":3617,"src":"311:20:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3598,"name":"address","nodeType":"ElementaryTypeName","src":"311:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":3601,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3617,"src":"337:21:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes"},"typeName":{"id":3600,"name":"bytes","nodeType":"ElementaryTypeName","src":"337:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"public"},{"constant":false,"id":3603,"name":"isSet","nodeType":"VariableDeclaration","scope":3617,"src":"364:17:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3602,"name":"bool","nodeType":"ElementaryTypeName","src":"364:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":3605,"name":"outcome","nodeType":"VariableDeclaration","scope":3617,"src":"387:18:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3604,"name":"int","nodeType":"ElementaryTypeName","src":"387:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":3615,"nodeType":"Block","src":"465:100:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3608,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"527:3:14","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3609,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"527:10:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3610,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"541:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"527:19:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3607,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"519:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3612,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"519:28:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3613,"nodeType":"ExpressionStatement","src":"519:28:14"},{"id":3614,"nodeType":"PlaceholderStatement","src":"557:1:14"}]},"documentation":null,"id":3616,"name":"isOwner","nodeType":"ModifierDefinition","parameters":{"id":3606,"nodeType":"ParameterList","parameters":[],"src":"462:2:14"},"src":"445:120:14","visibility":"internal"}],"scope":3720,"src":"115:452:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3618,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"604:5:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3619,"nodeType":"InheritanceSpecifier","src":"604:5:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3620,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"611:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3621,"nodeType":"InheritanceSpecifier","src":"611:21:14"}],"contractDependencies":[3617,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3650,"linearizedBaseContracts":[3650,3617,6701,6673],"name":"CentralizedOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3648,"nodeType":"Block","src":"872:145:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3637,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3634,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"933:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"id":3635,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"933:16:14","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"3436","id":3636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"953:2:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_46_by_1","typeString":"int_const 46"},"value":"46"},"src":"933:22:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"925:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3638,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"925:31:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3639,"nodeType":"ExpressionStatement","src":"925:31:14"},{"expression":{"argumentTypes":null,"id":3642,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3640,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"966:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3641,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3625,"src":"974:6:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"966:14:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3643,"nodeType":"ExpressionStatement","src":"966:14:14"},{"expression":{"argumentTypes":null,"id":3646,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3644,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3601,"src":"990:8:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3645,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"1001:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"990:20:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"id":3647,"nodeType":"ExpressionStatement","src":"990:20:14"}]},"documentation":"@dev Constructor sets owner address and IPFS hash\n @param _ipfsHash Hash identifying off chain event description","id":3649,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3630,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3623,"src":"859:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3631,"modifierName":{"argumentTypes":null,"id":3629,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"853:5:14","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"853:14:14"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3628,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3623,"name":"proxied","nodeType":"VariableDeclaration","scope":3649,"src":"780:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3622,"name":"address","nodeType":"ElementaryTypeName","src":"780:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3625,"name":"_owner","nodeType":"VariableDeclaration","scope":3649,"src":"797:14:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3624,"name":"address","nodeType":"ElementaryTypeName","src":"797:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3627,"name":"_ipfsHash","nodeType":"VariableDeclaration","scope":3649,"src":"813:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3626,"name":"bytes","nodeType":"ElementaryTypeName","src":"813:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"779:50:14"},"payable":false,"returnParameters":{"id":3632,"nodeType":"ParameterList","parameters":[],"src":"872:0:14"},"scope":3650,"src":"768:249:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3720,"src":"569:450:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3651,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1183:7:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":3652,"nodeType":"InheritanceSpecifier","src":"1183:7:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3653,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1192:6:14","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":3654,"nodeType":"InheritanceSpecifier","src":"1192:6:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3655,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"1200:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3656,"nodeType":"InheritanceSpecifier","src":"1200:21:14"}],"contractDependencies":[3617,4717,6673],"contractKind":"contract","documentation":"@title Centralized oracle contract - Allows the contract owner to set an outcome\n @author Stefan George - ","fullyImplemented":true,"id":3719,"linearizedBaseContracts":[3719,3617,4717,6673],"name":"CentralizedOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":3676,"nodeType":"Block","src":"1406:132:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1457:6:14","subExpression":{"argumentTypes":null,"id":3664,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1458:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3663,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1449:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3666,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1449:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3667,"nodeType":"ExpressionStatement","src":"1449:15:14"},{"expression":{"argumentTypes":null,"id":3670,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3668,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"1474:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3669,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1482:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1474:16:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3671,"nodeType":"ExpressionStatement","src":"1474:16:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3673,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1522:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":3672,"name":"OwnerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3593,"src":"1505:16:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":3674,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1505:26:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3675,"nodeType":"EmitStatement","src":"1500:31:14"}]},"documentation":"@dev Replaces owner\n @param newOwner New owner","id":3677,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3661,"modifierName":{"argumentTypes":null,"id":3660,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1394:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1394:7:14"}],"name":"replaceOwner","nodeType":"FunctionDefinition","parameters":{"id":3659,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3658,"name":"newOwner","nodeType":"VariableDeclaration","scope":3677,"src":"1353:16:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3657,"name":"address","nodeType":"ElementaryTypeName","src":"1353:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1352:18:14"},"payable":false,"returnParameters":{"id":3662,"nodeType":"ParameterList","parameters":[],"src":"1406:0:14"},"scope":3719,"src":"1331:207:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3701,"nodeType":"Block","src":"1683:157:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1734:6:14","subExpression":{"argumentTypes":null,"id":3685,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1735:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3684,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1726:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3687,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1726:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3688,"nodeType":"ExpressionStatement","src":"1726:15:14"},{"expression":{"argumentTypes":null,"id":3691,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3689,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1751:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":3690,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1759:4:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"1751:12:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3692,"nodeType":"ExpressionStatement","src":"1751:12:14"},{"expression":{"argumentTypes":null,"id":3695,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3693,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"1773:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3694,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1783:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1773:18:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3696,"nodeType":"ExpressionStatement","src":"1773:18:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3698,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1824:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3697,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3597,"src":"1806:17:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":3699,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1806:27:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3700,"nodeType":"EmitStatement","src":"1801:32:14"}]},"documentation":"@dev Sets event outcome\n @param _outcome Event outcome","id":3702,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3682,"modifierName":{"argumentTypes":null,"id":3681,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1671:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1671:7:14"}],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":3680,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3679,"name":"_outcome","nodeType":"VariableDeclaration","scope":3702,"src":"1634:12:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3678,"name":"int","nodeType":"ElementaryTypeName","src":"1634:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1633:14:14"},"payable":false,"returnParameters":{"id":3683,"nodeType":"ParameterList","parameters":[],"src":"1683:0:14"},"scope":3719,"src":"1614:226:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3709,"nodeType":"Block","src":"2004:29:14","statements":[{"expression":{"argumentTypes":null,"id":3707,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"2021:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":3706,"id":3708,"nodeType":"Return","src":"2014:12:14"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":3710,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":3703,"nodeType":"ParameterList","parameters":[],"src":"1946:2:14"},"payable":false,"returnParameters":{"id":3706,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3705,"name":"","nodeType":"VariableDeclaration","scope":3710,"src":"1994:4:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3704,"name":"bool","nodeType":"ElementaryTypeName","src":"1994:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1993:6:14"},"scope":3719,"src":"1925:108:14","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":3717,"nodeType":"Block","src":"2168:31:14","statements":[{"expression":{"argumentTypes":null,"id":3715,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"2185:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":3714,"id":3716,"nodeType":"Return","src":"2178:14:14"}]},"documentation":"@dev Returns outcome\n @return Outcome","id":3718,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":3711,"nodeType":"ParameterList","parameters":[],"src":"2111:2:14"},"payable":false,"returnParameters":{"id":3714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3713,"name":"","nodeType":"VariableDeclaration","scope":3718,"src":"2159:3:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3712,"name":"int","nodeType":"ElementaryTypeName","src":"2159:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2158:5:14"},"scope":3719,"src":"2092:107:14","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":3720,"src":"1153:1048:14"}],"src":"0:2202:14"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/CentralizedOracle.sol","exportedSymbols":{"CentralizedOracle":[3719],"CentralizedOracleData":[3617],"CentralizedOracleProxy":[3650]},"id":3720,"nodeType":"SourceUnit","nodes":[{"id":3587,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:14"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3588,"nodeType":"ImportDirective","scope":3720,"sourceUnit":4718,"src":"25:31:14","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3589,"nodeType":"ImportDirective","scope":3720,"sourceUnit":6702,"src":"57:55:14","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3617,"linearizedBaseContracts":[3617],"name":"CentralizedOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3593,"name":"OwnerReplacement","nodeType":"EventDefinition","parameters":{"id":3592,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3591,"indexed":true,"name":"newOwner","nodeType":"VariableDeclaration","scope":3593,"src":"206:24:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3590,"name":"address","nodeType":"ElementaryTypeName","src":"206:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"205:26:14"},"src":"183:49:14"},{"anonymous":false,"documentation":null,"id":3597,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3596,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3595,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":3597,"src":"261:11:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3594,"name":"int","nodeType":"ElementaryTypeName","src":"261:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"260:13:14"},"src":"237:37:14"},{"constant":false,"id":3599,"name":"owner","nodeType":"VariableDeclaration","scope":3617,"src":"311:20:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3598,"name":"address","nodeType":"ElementaryTypeName","src":"311:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":3601,"name":"ipfsHash","nodeType":"VariableDeclaration","scope":3617,"src":"337:21:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes"},"typeName":{"id":3600,"name":"bytes","nodeType":"ElementaryTypeName","src":"337:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"public"},{"constant":false,"id":3603,"name":"isSet","nodeType":"VariableDeclaration","scope":3617,"src":"364:17:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3602,"name":"bool","nodeType":"ElementaryTypeName","src":"364:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":3605,"name":"outcome","nodeType":"VariableDeclaration","scope":3617,"src":"387:18:14","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3604,"name":"int","nodeType":"ElementaryTypeName","src":"387:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":3615,"nodeType":"Block","src":"465:100:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3608,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"527:3:14","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3609,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"527:10:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3610,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"541:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"527:19:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3607,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"519:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3612,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"519:28:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3613,"nodeType":"ExpressionStatement","src":"519:28:14"},{"id":3614,"nodeType":"PlaceholderStatement","src":"557:1:14"}]},"documentation":null,"id":3616,"name":"isOwner","nodeType":"ModifierDefinition","parameters":{"id":3606,"nodeType":"ParameterList","parameters":[],"src":"462:2:14"},"src":"445:120:14","visibility":"internal"}],"scope":3720,"src":"115:452:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3618,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"604:5:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3619,"nodeType":"InheritanceSpecifier","src":"604:5:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3620,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"611:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3621,"nodeType":"InheritanceSpecifier","src":"611:21:14"}],"contractDependencies":[3617,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3650,"linearizedBaseContracts":[3650,3617,6701,6673],"name":"CentralizedOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3648,"nodeType":"Block","src":"872:145:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3637,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3634,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"933:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"id":3635,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"933:16:14","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"3436","id":3636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"953:2:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_46_by_1","typeString":"int_const 46"},"value":"46"},"src":"933:22:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"925:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3638,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"925:31:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3639,"nodeType":"ExpressionStatement","src":"925:31:14"},{"expression":{"argumentTypes":null,"id":3642,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3640,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"966:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3641,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3625,"src":"974:6:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"966:14:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3643,"nodeType":"ExpressionStatement","src":"966:14:14"},{"expression":{"argumentTypes":null,"id":3646,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3644,"name":"ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3601,"src":"990:8:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3645,"name":"_ipfsHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3627,"src":"1001:9:14","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"990:20:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"id":3647,"nodeType":"ExpressionStatement","src":"990:20:14"}]},"documentation":"@dev Constructor sets owner address and IPFS hash\n @param _ipfsHash Hash identifying off chain event description","id":3649,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3630,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3623,"src":"859:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3631,"modifierName":{"argumentTypes":null,"id":3629,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"853:5:14","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"853:14:14"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3628,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3623,"name":"proxied","nodeType":"VariableDeclaration","scope":3649,"src":"780:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3622,"name":"address","nodeType":"ElementaryTypeName","src":"780:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3625,"name":"_owner","nodeType":"VariableDeclaration","scope":3649,"src":"797:14:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3624,"name":"address","nodeType":"ElementaryTypeName","src":"797:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3627,"name":"_ipfsHash","nodeType":"VariableDeclaration","scope":3649,"src":"813:15:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":3626,"name":"bytes","nodeType":"ElementaryTypeName","src":"813:5:14","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"779:50:14"},"payable":false,"returnParameters":{"id":3632,"nodeType":"ParameterList","parameters":[],"src":"872:0:14"},"scope":3650,"src":"768:249:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3720,"src":"569:450:14"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3651,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1183:7:14","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":3652,"nodeType":"InheritanceSpecifier","src":"1183:7:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3653,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1192:6:14","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":3654,"nodeType":"InheritanceSpecifier","src":"1192:6:14"},{"arguments":null,"baseName":{"contractScope":null,"id":3655,"name":"CentralizedOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3617,"src":"1200:21:14","typeDescriptions":{"typeIdentifier":"t_contract$_CentralizedOracleData_$3617","typeString":"contract CentralizedOracleData"}},"id":3656,"nodeType":"InheritanceSpecifier","src":"1200:21:14"}],"contractDependencies":[3617,4717,6673],"contractKind":"contract","documentation":"@title Centralized oracle contract - Allows the contract owner to set an outcome\n @author Stefan George - ","fullyImplemented":true,"id":3719,"linearizedBaseContracts":[3719,3617,4717,6673],"name":"CentralizedOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":3676,"nodeType":"Block","src":"1406:132:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1457:6:14","subExpression":{"argumentTypes":null,"id":3664,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1458:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3663,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1449:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3666,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1449:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3667,"nodeType":"ExpressionStatement","src":"1449:15:14"},{"expression":{"argumentTypes":null,"id":3670,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3668,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3599,"src":"1474:5:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3669,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1482:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1474:16:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3671,"nodeType":"ExpressionStatement","src":"1474:16:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3673,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3658,"src":"1522:8:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":3672,"name":"OwnerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3593,"src":"1505:16:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":3674,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1505:26:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3675,"nodeType":"EmitStatement","src":"1500:31:14"}]},"documentation":"@dev Replaces owner\n @param newOwner New owner","id":3677,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3661,"modifierName":{"argumentTypes":null,"id":3660,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1394:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1394:7:14"}],"name":"replaceOwner","nodeType":"FunctionDefinition","parameters":{"id":3659,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3658,"name":"newOwner","nodeType":"VariableDeclaration","scope":3677,"src":"1353:16:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3657,"name":"address","nodeType":"ElementaryTypeName","src":"1353:7:14","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1352:18:14"},"payable":false,"returnParameters":{"id":3662,"nodeType":"ParameterList","parameters":[],"src":"1406:0:14"},"scope":3719,"src":"1331:207:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3701,"nodeType":"Block","src":"1683:157:14","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1734:6:14","subExpression":{"argumentTypes":null,"id":3685,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1735:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3684,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1726:7:14","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3687,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1726:15:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3688,"nodeType":"ExpressionStatement","src":"1726:15:14"},{"expression":{"argumentTypes":null,"id":3691,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3689,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"1751:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":3690,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1759:4:14","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"1751:12:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3692,"nodeType":"ExpressionStatement","src":"1751:12:14"},{"expression":{"argumentTypes":null,"id":3695,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3693,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"1773:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3694,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1783:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1773:18:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3696,"nodeType":"ExpressionStatement","src":"1773:18:14"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3698,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3679,"src":"1824:8:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3697,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3597,"src":"1806:17:14","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":3699,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1806:27:14","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3700,"nodeType":"EmitStatement","src":"1801:32:14"}]},"documentation":"@dev Sets event outcome\n @param _outcome Event outcome","id":3702,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":3682,"modifierName":{"argumentTypes":null,"id":3681,"name":"isOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3616,"src":"1671:7:14","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1671:7:14"}],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":3680,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3679,"name":"_outcome","nodeType":"VariableDeclaration","scope":3702,"src":"1634:12:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3678,"name":"int","nodeType":"ElementaryTypeName","src":"1634:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1633:14:14"},"payable":false,"returnParameters":{"id":3683,"nodeType":"ParameterList","parameters":[],"src":"1683:0:14"},"scope":3719,"src":"1614:226:14","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3709,"nodeType":"Block","src":"2004:29:14","statements":[{"expression":{"argumentTypes":null,"id":3707,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3603,"src":"2021:5:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":3706,"id":3708,"nodeType":"Return","src":"2014:12:14"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":3710,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":3703,"nodeType":"ParameterList","parameters":[],"src":"1946:2:14"},"payable":false,"returnParameters":{"id":3706,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3705,"name":"","nodeType":"VariableDeclaration","scope":3710,"src":"1994:4:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3704,"name":"bool","nodeType":"ElementaryTypeName","src":"1994:4:14","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1993:6:14"},"scope":3719,"src":"1925:108:14","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":3717,"nodeType":"Block","src":"2168:31:14","statements":[{"expression":{"argumentTypes":null,"id":3715,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3605,"src":"2185:7:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":3714,"id":3716,"nodeType":"Return","src":"2178:14:14"}]},"documentation":"@dev Returns outcome\n @return Outcome","id":3718,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":3711,"nodeType":"ParameterList","parameters":[],"src":"2111:2:14"},"payable":false,"returnParameters":{"id":3714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3713,"name":"","nodeType":"VariableDeclaration","scope":3718,"src":"2159:3:14","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3712,"name":"int","nodeType":"ElementaryTypeName","src":"2159:3:14","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2158:5:14"},"scope":3719,"src":"2092:107:14","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":3720,"src":"1153:1048:14"}],"src":"0:2202:14"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.018Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Contract.json": +/*!****************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Contract.json ***! + \****************************************************************************/ /*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ /***/ (function(module) { -module.exports = {"contract_name":"CentralizedOracleFactory","abi":[{"constant":false,"inputs":[{"name":"ipfsHash","type":"bytes"}],"name":"createCentralizedOracle","outputs":[{"name":"centralizedOracle","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"centralizedOracle","type":"address"},{"indexed":false,"name":"ipfsHash","type":"bytes"}],"name":"CentralizedOracleCreation","type":"event"}],"networks":{"1":{"address":"0xc4f4b8c0259c8264376fc32984e2a8cf4a3c70ca","updated_at":1513984936000},"3":{"address":"0x472099767cc73a371c1848cbc0d17357e9bba52a","updated_at":1503605014190},"4":{"address":"0xb3289eaac0fe3ed15df177f925c6f8ceeb908b8f","updated_at":1503603856237},"42":{"address":"0xe8d7862d2ad41dd0d4dda98b47523f1238cf2155","updated_at":1503602339889},"437894314312":{"address":"0xcfeb869f69431e42cdb54a4f4f105c19c080a601","updated_at":1507361155407}},"schema_version":"0.0.5","updated_at":1543915159048}; +module.exports = {"contract_name":"Contract","abi":[{"constant":true,"inputs":[],"name":"last_completed_migration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":false,"inputs":[{"name":"completed","type":"uint256"}],"name":"setCompleted","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"new_address","type":"address"}],"name":"upgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}],"networks":{"437894314312":{"updated_at":1544090528574}},"schema_version":"0.0.5","updated_at":1544090528574}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/DetailedERC20.json": +/*!*********************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/DetailedERC20.json ***! + \*********************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"DetailedERC20","abi":[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","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":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","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"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","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"},{"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_decimals","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"},{"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"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\n\nimport \"./ERC20.sol\";\n\n\n/**\n * @title DetailedERC20 token\n * @dev The decimals are only for visualization purposes.\n * All the operations are done using the smallest and indivisible token unit,\n * just as on Ethereum all the operations are done in wei.\n */\ncontract DetailedERC20 is ERC20 {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n constructor(string _name, string _symbol, uint8 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n","sourcePath":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","ast":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","exportedSymbols":{"DetailedERC20":[338]},"id":339,"nodeType":"SourceUnit","nodes":[{"id":306,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:2"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"./ERC20.sol","id":307,"nodeType":"ImportDirective","scope":339,"sourceUnit":382,"src":"26:21:2","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":308,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":381,"src":"309:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$381","typeString":"contract ERC20"}},"id":309,"nodeType":"InheritanceSpecifier","src":"309:5:2"}],"contractDependencies":[381,413],"contractKind":"contract","documentation":"@title DetailedERC20 token\n@dev The decimals are only for visualization purposes.\nAll the operations are done using the smallest and indivisible token unit,\njust as on Ethereum all the operations are done in wei.","fullyImplemented":false,"id":338,"linearizedBaseContracts":[338,381,413],"name":"DetailedERC20","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":311,"name":"name","nodeType":"VariableDeclaration","scope":338,"src":"319:18:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":310,"name":"string","nodeType":"ElementaryTypeName","src":"319:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":313,"name":"symbol","nodeType":"VariableDeclaration","scope":338,"src":"341:20:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":312,"name":"string","nodeType":"ElementaryTypeName","src":"341:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":315,"name":"decimals","nodeType":"VariableDeclaration","scope":338,"src":"365:21:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":314,"name":"uint8","nodeType":"ElementaryTypeName","src":"365:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"body":{"id":336,"nodeType":"Block","src":"457:71:2","statements":[{"expression":{"argumentTypes":null,"id":326,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":324,"name":"name","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":311,"src":"463:4:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":325,"name":"_name","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":317,"src":"470:5:2","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"src":"463:12:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":327,"nodeType":"ExpressionStatement","src":"463:12:2"},{"expression":{"argumentTypes":null,"id":330,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":328,"name":"symbol","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":313,"src":"481:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":329,"name":"_symbol","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":319,"src":"490:7:2","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"src":"481:16:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":331,"nodeType":"ExpressionStatement","src":"481:16:2"},{"expression":{"argumentTypes":null,"id":334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":332,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":315,"src":"503:8:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":333,"name":"_decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":321,"src":"514:9:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"503:20:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":335,"nodeType":"ExpressionStatement","src":"503:20:2"}]},"documentation":null,"id":337,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":322,"nodeType":"ParameterList","parameters":[{"constant":false,"id":317,"name":"_name","nodeType":"VariableDeclaration","scope":337,"src":"403:12:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":316,"name":"string","nodeType":"ElementaryTypeName","src":"403:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":319,"name":"_symbol","nodeType":"VariableDeclaration","scope":337,"src":"417:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":318,"name":"string","nodeType":"ElementaryTypeName","src":"417:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":321,"name":"_decimals","nodeType":"VariableDeclaration","scope":337,"src":"433:15:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":320,"name":"uint8","nodeType":"ElementaryTypeName","src":"433:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"402:47:2"},"payable":false,"returnParameters":{"id":323,"nodeType":"ParameterList","parameters":[],"src":"457:0:2"},"scope":338,"src":"391:137:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":339,"src":"283:247:2"}],"src":"0:531:2"},"legacyAST":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","exportedSymbols":{"DetailedERC20":[338]},"id":339,"nodeType":"SourceUnit","nodes":[{"id":306,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:2"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"./ERC20.sol","id":307,"nodeType":"ImportDirective","scope":339,"sourceUnit":382,"src":"26:21:2","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":308,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":381,"src":"309:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$381","typeString":"contract ERC20"}},"id":309,"nodeType":"InheritanceSpecifier","src":"309:5:2"}],"contractDependencies":[381,413],"contractKind":"contract","documentation":"@title DetailedERC20 token\n@dev The decimals are only for visualization purposes.\nAll the operations are done using the smallest and indivisible token unit,\njust as on Ethereum all the operations are done in wei.","fullyImplemented":false,"id":338,"linearizedBaseContracts":[338,381,413],"name":"DetailedERC20","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":311,"name":"name","nodeType":"VariableDeclaration","scope":338,"src":"319:18:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":310,"name":"string","nodeType":"ElementaryTypeName","src":"319:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":313,"name":"symbol","nodeType":"VariableDeclaration","scope":338,"src":"341:20:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":312,"name":"string","nodeType":"ElementaryTypeName","src":"341:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":315,"name":"decimals","nodeType":"VariableDeclaration","scope":338,"src":"365:21:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":314,"name":"uint8","nodeType":"ElementaryTypeName","src":"365:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"body":{"id":336,"nodeType":"Block","src":"457:71:2","statements":[{"expression":{"argumentTypes":null,"id":326,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":324,"name":"name","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":311,"src":"463:4:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":325,"name":"_name","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":317,"src":"470:5:2","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"src":"463:12:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":327,"nodeType":"ExpressionStatement","src":"463:12:2"},{"expression":{"argumentTypes":null,"id":330,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":328,"name":"symbol","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":313,"src":"481:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":329,"name":"_symbol","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":319,"src":"490:7:2","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"src":"481:16:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":331,"nodeType":"ExpressionStatement","src":"481:16:2"},{"expression":{"argumentTypes":null,"id":334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":332,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":315,"src":"503:8:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":333,"name":"_decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":321,"src":"514:9:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"503:20:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":335,"nodeType":"ExpressionStatement","src":"503:20:2"}]},"documentation":null,"id":337,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":322,"nodeType":"ParameterList","parameters":[{"constant":false,"id":317,"name":"_name","nodeType":"VariableDeclaration","scope":337,"src":"403:12:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":316,"name":"string","nodeType":"ElementaryTypeName","src":"403:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":319,"name":"_symbol","nodeType":"VariableDeclaration","scope":337,"src":"417:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":318,"name":"string","nodeType":"ElementaryTypeName","src":"417:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":321,"name":"_decimals","nodeType":"VariableDeclaration","scope":337,"src":"433:15:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":320,"name":"uint8","nodeType":"ElementaryTypeName","src":"433:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"402:47:2"},"payable":false,"returnParameters":{"id":323,"nodeType":"ParameterList","parameters":[],"src":"457:0:2"},"scope":338,"src":"391:137:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":339,"src":"283:247:2"}],"src":"0:531:2"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-29T15:25:24.148Z"}; /***/ }), @@ -198,10 +318,10 @@ module.exports = {"contract_name":"CentralizedOracleFactory","abi":[{"constant": /*!************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/DifficultyOracle.json ***! \************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"DifficultyOracle","abi":[{"constant":false,"inputs":[],"name":"setOutcome","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"difficulty","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"blockNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[{"name":"_blockNumber","type":"uint256"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"difficulty","type":"uint256"}],"name":"OutcomeAssignment","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263310}; +module.exports = {"contractName":"DifficultyOracle","abi":[{"constant":true,"inputs":[],"name":"difficulty","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"blockNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_blockNumber","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"difficulty","type":"uint256"}],"name":"OutcomeAssignment","type":"event"},{"constant":false,"inputs":[],"name":"setOutcome","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160208061024083398101806040528101908080519060200190929190505050438111151561004157600080fd5b80600081905550506101e8806100586000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d1461007257806319cae4621461008957806357e871e7146100b45780637e7e4b47146100df578063ccdf68f31461010a575b600080fd5b34801561007e57600080fd5b50610087610139565b005b34801561009557600080fd5b5061009e61019a565b6040518082815260200191505060405180910390f35b3480156100c057600080fd5b506100c96101a0565b6040518082815260200191505060405180910390f35b3480156100eb57600080fd5b506100f46101a6565b6040518082815260200191505060405180910390f35b34801561011657600080fd5b5061011f6101b0565b604051808215151515815260200191505060405180910390f35b600054431015801561014d57506000600154145b151561015857600080fd5b446001819055507f39972cb21edd888c2061a2b4b37874524bbc055cfeaa3054682ba5369f5029aa6001546040518082815260200191505060405180910390a1565b60015481565b60005481565b6000600154905090565b600080600154119050905600a165627a7a72305820a0fa61d0f537cec582a22e8a83f68a587f972940d3aedc4f79947fc4019ac85c0029","deployedBytecode":"0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d1461007257806319cae4621461008957806357e871e7146100b45780637e7e4b47146100df578063ccdf68f31461010a575b600080fd5b34801561007e57600080fd5b50610087610139565b005b34801561009557600080fd5b5061009e61019a565b6040518082815260200191505060405180910390f35b3480156100c057600080fd5b506100c96101a0565b6040518082815260200191505060405180910390f35b3480156100eb57600080fd5b506100f46101a6565b6040518082815260200191505060405180910390f35b34801561011657600080fd5b5061011f6101b0565b604051808215151515815260200191505060405180910390f35b600054431015801561014d57506000600154145b151561015857600080fd5b446001819055507f39972cb21edd888c2061a2b4b37874524bbc055cfeaa3054682ba5369f5029aa6001546040518082815260200191505060405180910390a1565b60015481565b60005481565b6000600154905090565b600080600154119050905600a165627a7a72305820a0fa61d0f537cec582a22e8a83f68a587f972940d3aedc4f79947fc4019ac85c0029","sourceMap":"197:1306:16:-;;;567:180;8:9:-1;5:2;;;30:1;27;20:12;5:2;567:180:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;691:12;676;:27;668:36;;;;;;;;728:12;714:11;:26;;;;567:180;197:1306;;;;;;","deployedSourceMap":"197:1306:16:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;821:260;;8:9:-1;5:2;;;30:1;27;20:12;5:2;821:260:16;;;;;;377:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;377:22:16;;;;;;;;;;;;;;;;;;;;;;;348:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;348:23:16;;;;;;;;;;;;;;;;;;;;;;;1386:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1386:115:16;;;;;;;;;;;;;;;;;;;;;;;1161:163;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1161:163:16;;;;;;;;;;;;;;;;;;;;;;;;;;;821:260;960:11;;944:12;:27;;:46;;;;;989:1;975:10;;:15;944:46;936:55;;;;;;;;1014:16;1001:10;:29;;;;1045;1063:10;;1045:29;;;;;;;;;;;;;;;;;;821:260::o;377:22::-;;;;:::o;348:23::-;;;;:::o;1386:115::-;1453:3;1483:10;;1472:22;;1386:115;:::o;1161:163::-;1230:4;1316:1;1303:10;;:14;1296:21;;1161:163;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\n\n\n/// @title Difficulty oracle contract - Oracle to resolve difficulty events at given block\n/// @author Stefan George - \ncontract DifficultyOracle is Oracle {\n\n /*\n * Events\n */\n event OutcomeAssignment(uint difficulty);\n\n /*\n * Storage\n */\n uint public blockNumber;\n uint public difficulty;\n\n /*\n * Public functions\n */\n /// @dev Contract constructor validates and sets target block number\n /// @param _blockNumber Target block number\n constructor(uint _blockNumber)\n public\n {\n // Block has to be in the future\n require(_blockNumber > block.number);\n blockNumber = _blockNumber;\n }\n\n /// @dev Sets difficulty as winning outcome for specified block\n function setOutcome()\n public\n {\n // Block number was reached and outcome was not set yet\n require(block.number >= blockNumber && difficulty == 0);\n difficulty = block.difficulty;\n emit OutcomeAssignment(difficulty);\n }\n\n /// @dev Returns if difficulty is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n // Difficulty is always bigger than 0\n return difficulty > 0;\n }\n\n /// @dev Returns difficulty\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return int(difficulty);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/DifficultyOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/DifficultyOracle.sol","exportedSymbols":{"DifficultyOracle":[3845]},"id":3846,"nodeType":"SourceUnit","nodes":[{"id":3772,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:16"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3773,"nodeType":"ImportDirective","scope":3846,"sourceUnit":4718,"src":"25:31:16","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3774,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"226:6:16","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":3775,"nodeType":"InheritanceSpecifier","src":"226:6:16"}],"contractDependencies":[4717],"contractKind":"contract","documentation":"@title Difficulty oracle contract - Oracle to resolve difficulty events at given block\n @author Stefan George - ","fullyImplemented":true,"id":3845,"linearizedBaseContracts":[3845,4717],"name":"DifficultyOracle","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3779,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3778,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3777,"indexed":false,"name":"difficulty","nodeType":"VariableDeclaration","scope":3779,"src":"294:15:16","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3776,"name":"uint","nodeType":"ElementaryTypeName","src":"294:4:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"293:17:16"},"src":"270:41:16"},{"constant":false,"id":3781,"name":"blockNumber","nodeType":"VariableDeclaration","scope":3845,"src":"348:23:16","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3780,"name":"uint","nodeType":"ElementaryTypeName","src":"348:4:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3783,"name":"difficulty","nodeType":"VariableDeclaration","scope":3845,"src":"377:22:16","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3782,"name":"uint","nodeType":"ElementaryTypeName","src":"377:4:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"body":{"id":3799,"nodeType":"Block","src":"617:130:16","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3789,"name":"_blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3785,"src":"676:12:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3790,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"691:5:16","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":3791,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"691:12:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"676:27:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3788,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"668:7:16","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3793,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"668:36:16","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3794,"nodeType":"ExpressionStatement","src":"668:36:16"},{"expression":{"argumentTypes":null,"id":3797,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3795,"name":"blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3781,"src":"714:11:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3796,"name":"_blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3785,"src":"728:12:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"714:26:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3798,"nodeType":"ExpressionStatement","src":"714:26:16"}]},"documentation":"@dev Contract constructor validates and sets target block number\n @param _blockNumber Target block number","id":3800,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3786,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3785,"name":"_blockNumber","nodeType":"VariableDeclaration","scope":3800,"src":"579:17:16","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3784,"name":"uint","nodeType":"ElementaryTypeName","src":"579:4:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"578:19:16"},"payable":false,"returnParameters":{"id":3787,"nodeType":"ParameterList","parameters":[],"src":"617:0:16"},"scope":3845,"src":"567:180:16","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3823,"nodeType":"Block","src":"862:219:16","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":3811,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3807,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3804,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"944:5:16","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":3805,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"944:12:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3806,"name":"blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3781,"src":"960:11:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"944:27:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3810,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3808,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"975:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3809,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"989:1:16","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"975:15:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"944:46:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3803,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"936:7:16","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3812,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"936:55:16","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3813,"nodeType":"ExpressionStatement","src":"936:55:16"},{"expression":{"argumentTypes":null,"id":3817,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3814,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"1001:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3815,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"1014:5:16","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":3816,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"difficulty","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1014:16:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1001:29:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3818,"nodeType":"ExpressionStatement","src":"1001:29:16"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3820,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"1063:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3819,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3779,"src":"1045:17:16","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":3821,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1045:29:16","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3822,"nodeType":"EmitStatement","src":"1040:34:16"}]},"documentation":"@dev Sets difficulty as winning outcome for specified block","id":3824,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":3801,"nodeType":"ParameterList","parameters":[],"src":"840:2:16"},"payable":false,"returnParameters":{"id":3802,"nodeType":"ParameterList","parameters":[],"src":"862:0:16"},"scope":3845,"src":"821:260:16","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3833,"nodeType":"Block","src":"1240:84:16","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3831,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3829,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"1303:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3830,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1316:1:16","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1303:14:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":3828,"id":3832,"nodeType":"Return","src":"1296:21:16"}]},"documentation":"@dev Returns if difficulty is set\n @return Is outcome set?","id":3834,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":3825,"nodeType":"ParameterList","parameters":[],"src":"1182:2:16"},"payable":false,"returnParameters":{"id":3828,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3827,"name":"","nodeType":"VariableDeclaration","scope":3834,"src":"1230:4:16","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3826,"name":"bool","nodeType":"ElementaryTypeName","src":"1230:4:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1229:6:16"},"scope":3845,"src":"1161:163:16","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":3843,"nodeType":"Block","src":"1462:39:16","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3840,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"1483:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3839,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1479:3:16","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":3841,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1479:15:16","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":3838,"id":3842,"nodeType":"Return","src":"1472:22:16"}]},"documentation":"@dev Returns difficulty\n @return Outcome","id":3844,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":3835,"nodeType":"ParameterList","parameters":[],"src":"1405:2:16"},"payable":false,"returnParameters":{"id":3838,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3837,"name":"","nodeType":"VariableDeclaration","scope":3844,"src":"1453:3:16","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3836,"name":"int","nodeType":"ElementaryTypeName","src":"1453:3:16","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1452:5:16"},"scope":3845,"src":"1386:115:16","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":3846,"src":"197:1306:16"}],"src":"0:1504:16"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/DifficultyOracle.sol","exportedSymbols":{"DifficultyOracle":[3845]},"id":3846,"nodeType":"SourceUnit","nodes":[{"id":3772,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:16"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3773,"nodeType":"ImportDirective","scope":3846,"sourceUnit":4718,"src":"25:31:16","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3774,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"226:6:16","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":3775,"nodeType":"InheritanceSpecifier","src":"226:6:16"}],"contractDependencies":[4717],"contractKind":"contract","documentation":"@title Difficulty oracle contract - Oracle to resolve difficulty events at given block\n @author Stefan George - ","fullyImplemented":true,"id":3845,"linearizedBaseContracts":[3845,4717],"name":"DifficultyOracle","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3779,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3778,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3777,"indexed":false,"name":"difficulty","nodeType":"VariableDeclaration","scope":3779,"src":"294:15:16","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3776,"name":"uint","nodeType":"ElementaryTypeName","src":"294:4:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"293:17:16"},"src":"270:41:16"},{"constant":false,"id":3781,"name":"blockNumber","nodeType":"VariableDeclaration","scope":3845,"src":"348:23:16","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3780,"name":"uint","nodeType":"ElementaryTypeName","src":"348:4:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3783,"name":"difficulty","nodeType":"VariableDeclaration","scope":3845,"src":"377:22:16","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3782,"name":"uint","nodeType":"ElementaryTypeName","src":"377:4:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"body":{"id":3799,"nodeType":"Block","src":"617:130:16","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3789,"name":"_blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3785,"src":"676:12:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3790,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"691:5:16","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":3791,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"691:12:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"676:27:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3788,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"668:7:16","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3793,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"668:36:16","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3794,"nodeType":"ExpressionStatement","src":"668:36:16"},{"expression":{"argumentTypes":null,"id":3797,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3795,"name":"blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3781,"src":"714:11:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3796,"name":"_blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3785,"src":"728:12:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"714:26:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3798,"nodeType":"ExpressionStatement","src":"714:26:16"}]},"documentation":"@dev Contract constructor validates and sets target block number\n @param _blockNumber Target block number","id":3800,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3786,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3785,"name":"_blockNumber","nodeType":"VariableDeclaration","scope":3800,"src":"579:17:16","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3784,"name":"uint","nodeType":"ElementaryTypeName","src":"579:4:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"578:19:16"},"payable":false,"returnParameters":{"id":3787,"nodeType":"ParameterList","parameters":[],"src":"617:0:16"},"scope":3845,"src":"567:180:16","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3823,"nodeType":"Block","src":"862:219:16","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":3811,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3807,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3804,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"944:5:16","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":3805,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"944:12:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3806,"name":"blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3781,"src":"960:11:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"944:27:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3810,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3808,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"975:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3809,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"989:1:16","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"975:15:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"944:46:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3803,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"936:7:16","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3812,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"936:55:16","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3813,"nodeType":"ExpressionStatement","src":"936:55:16"},{"expression":{"argumentTypes":null,"id":3817,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3814,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"1001:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3815,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"1014:5:16","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":3816,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"difficulty","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1014:16:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1001:29:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3818,"nodeType":"ExpressionStatement","src":"1001:29:16"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3820,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"1063:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3819,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3779,"src":"1045:17:16","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":3821,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1045:29:16","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3822,"nodeType":"EmitStatement","src":"1040:34:16"}]},"documentation":"@dev Sets difficulty as winning outcome for specified block","id":3824,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":3801,"nodeType":"ParameterList","parameters":[],"src":"840:2:16"},"payable":false,"returnParameters":{"id":3802,"nodeType":"ParameterList","parameters":[],"src":"862:0:16"},"scope":3845,"src":"821:260:16","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3833,"nodeType":"Block","src":"1240:84:16","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3831,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3829,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"1303:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3830,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1316:1:16","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1303:14:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":3828,"id":3832,"nodeType":"Return","src":"1296:21:16"}]},"documentation":"@dev Returns if difficulty is set\n @return Is outcome set?","id":3834,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":3825,"nodeType":"ParameterList","parameters":[],"src":"1182:2:16"},"payable":false,"returnParameters":{"id":3828,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3827,"name":"","nodeType":"VariableDeclaration","scope":3834,"src":"1230:4:16","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3826,"name":"bool","nodeType":"ElementaryTypeName","src":"1230:4:16","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1229:6:16"},"scope":3845,"src":"1161:163:16","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":3843,"nodeType":"Block","src":"1462:39:16","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3840,"name":"difficulty","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3783,"src":"1483:10:16","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3839,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1479:3:16","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":3841,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1479:15:16","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":3838,"id":3842,"nodeType":"Return","src":"1472:22:16"}]},"documentation":"@dev Returns difficulty\n @return Outcome","id":3844,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":3835,"nodeType":"ParameterList","parameters":[],"src":"1405:2:16"},"payable":false,"returnParameters":{"id":3838,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3837,"name":"","nodeType":"VariableDeclaration","scope":3844,"src":"1453:3:16","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3836,"name":"int","nodeType":"ElementaryTypeName","src":"1453:3:16","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1452:5:16"},"scope":3845,"src":"1386:115:16","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":3846,"src":"197:1306:16"}],"src":"0:1504:16"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.019Z"}; /***/ }), @@ -209,10 +329,32 @@ module.exports = {"contract_name":"DifficultyOracle","abi":[{"constant":false,"i /*!*******************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/DifficultyOracleFactory.json ***! \*******************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"DifficultyOracleFactory","abi":[{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"difficultyOracle","type":"address"},{"indexed":false,"name":"blockNumber","type":"uint256"}],"name":"DifficultyOracleCreation","type":"event"},{"constant":false,"inputs":[{"name":"blockNumber","type":"uint256"}],"name":"createDifficultyOracle","outputs":[{"name":"difficultyOracle","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506103ea806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680639d5f242214610046575b600080fd5b34801561005257600080fd5b50610071600480360381019080803590602001909291905050506100b3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000816100be61016e565b80828152602001915050604051809103906000f0801580156100e4573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f83ecbb7b33dba848fcbd61d437ac02705db443e66f76ce6be0cf3415d07ab17f8284604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a2919050565b6040516102408061017f833901905600608060405234801561001057600080fd5b5060405160208061024083398101806040528101908080519060200190929190505050438111151561004157600080fd5b80600081905550506101e8806100586000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d1461007257806319cae4621461008957806357e871e7146100b45780637e7e4b47146100df578063ccdf68f31461010a575b600080fd5b34801561007e57600080fd5b50610087610139565b005b34801561009557600080fd5b5061009e61019a565b6040518082815260200191505060405180910390f35b3480156100c057600080fd5b506100c96101a0565b6040518082815260200191505060405180910390f35b3480156100eb57600080fd5b506100f46101a6565b6040518082815260200191505060405180910390f35b34801561011657600080fd5b5061011f6101b0565b604051808215151515815260200191505060405180910390f35b600054431015801561014d57506000600154145b151561015857600080fd5b446001819055507f39972cb21edd888c2061a2b4b37874524bbc055cfeaa3054682ba5369f5029aa6001546040518082815260200191505060405180910390a1565b60015481565b60005481565b6000600154905090565b600080600154119050905600a165627a7a72305820a0fa61d0f537cec582a22e8a83f68a587f972940d3aedc4f79947fc4019ac85c0029a165627a7a72305820a4806706861ea3c08633e32ae461e2d79aea7a8561d855d9df33893536862ffa0029","deployedBytecode":"0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680639d5f242214610046575b600080fd5b34801561005257600080fd5b50610071600480360381019080803590602001909291905050506100b3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000816100be61016e565b80828152602001915050604051809103906000f0801580156100e4573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f83ecbb7b33dba848fcbd61d437ac02705db443e66f76ce6be0cf3415d07ab17f8284604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a2919050565b6040516102408061017f833901905600608060405234801561001057600080fd5b5060405160208061024083398101806040528101908080519060200190929190505050438111151561004157600080fd5b80600081905550506101e8806100586000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d1461007257806319cae4621461008957806357e871e7146100b45780637e7e4b47146100df578063ccdf68f31461010a575b600080fd5b34801561007e57600080fd5b50610087610139565b005b34801561009557600080fd5b5061009e61019a565b6040518082815260200191505060405180910390f35b3480156100c057600080fd5b506100c96101a0565b6040518082815260200191505060405180910390f35b3480156100eb57600080fd5b506100f46101a6565b6040518082815260200191505060405180910390f35b34801561011657600080fd5b5061011f6101b0565b604051808215151515815260200191505060405180910390f35b600054431015801561014d57506000600154145b151561015857600080fd5b446001819055507f39972cb21edd888c2061a2b4b37874524bbc055cfeaa3054682ba5369f5029aa6001546040518082815260200191505060405180910390a1565b60015481565b60005481565b6000600154905090565b600080600154119050905600a165627a7a72305820a0fa61d0f537cec582a22e8a83f68a587f972940d3aedc4f79947fc4019ac85c0029a165627a7a72305820a4806706861ea3c08633e32ae461e2d79aea7a8561d855d9df33893536862ffa0029","sourceMap":"209:632:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;209:632:17;;;;;;;","deployedSourceMap":"209:632:17:-;;;;;;;;;;;;;;;;;;;;;;;;567:272;;8:9:-1;5:2;;;30:1;27;20:12;5:2;567:272:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;649:33;738:11;717:33;;:::i;:::-;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;717:33:17;698:52;;790:10;765:67;;;802:16;820:11;765:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;567:272;;;:::o;209:632::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/DifficultyOracle.sol\";\n\n\n/// @title Difficulty oracle factory contract - Allows to create difficulty oracle contracts\n/// @author Stefan George - \ncontract DifficultyOracleFactory {\n\n /*\n * Events\n */\n event DifficultyOracleCreation(address indexed creator, DifficultyOracle difficultyOracle, uint blockNumber);\n\n /*\n * Public functions\n */\n /// @dev Creates a new difficulty oracle contract\n /// @param blockNumber Target block number\n /// @return Oracle contract\n function createDifficultyOracle(uint blockNumber)\n public\n returns (DifficultyOracle difficultyOracle)\n {\n difficultyOracle = new DifficultyOracle(blockNumber);\n emit DifficultyOracleCreation(msg.sender, difficultyOracle, blockNumber);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/DifficultyOracleFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/DifficultyOracleFactory.sol","exportedSymbols":{"DifficultyOracleFactory":[3879]},"id":3880,"nodeType":"SourceUnit","nodes":[{"id":3847,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:17"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/DifficultyOracle.sol","file":"../Oracles/DifficultyOracle.sol","id":3848,"nodeType":"ImportDirective","scope":3880,"sourceUnit":3846,"src":"25:41:17","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[3845],"contractKind":"contract","documentation":"@title Difficulty oracle factory contract - Allows to create difficulty oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":3879,"linearizedBaseContracts":[3879],"name":"DifficultyOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3856,"name":"DifficultyOracleCreation","nodeType":"EventDefinition","parameters":{"id":3855,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3850,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":3856,"src":"310:23:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3849,"name":"address","nodeType":"ElementaryTypeName","src":"310:7:17","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3852,"indexed":false,"name":"difficultyOracle","nodeType":"VariableDeclaration","scope":3856,"src":"335:33:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"},"typeName":{"contractScope":null,"id":3851,"name":"DifficultyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3845,"src":"335:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3854,"indexed":false,"name":"blockNumber","nodeType":"VariableDeclaration","scope":3856,"src":"370:16:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3853,"name":"uint","nodeType":"ElementaryTypeName","src":"370:4:17","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"309:78:17"},"src":"279:109:17"},{"body":{"id":3877,"nodeType":"Block","src":"688:151:17","statements":[{"expression":{"argumentTypes":null,"id":3868,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3863,"name":"difficultyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3861,"src":"698:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3866,"name":"blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3858,"src":"738:11:17","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3865,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"717:20:17","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_DifficultyOracle_$3845_$","typeString":"function (uint256) returns (contract DifficultyOracle)"},"typeName":{"contractScope":null,"id":3864,"name":"DifficultyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3845,"src":"721:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}}},"id":3867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"717:33:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"src":"698:52:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"id":3869,"nodeType":"ExpressionStatement","src":"698:52:17"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3871,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"790:3:17","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"790:10:17","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3873,"name":"difficultyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3861,"src":"802:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},{"argumentTypes":null,"id":3874,"name":"blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3858,"src":"820:11:17","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3870,"name":"DifficultyOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3856,"src":"765:24:17","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_DifficultyOracle_$3845_$_t_uint256_$returns$__$","typeString":"function (address,contract DifficultyOracle,uint256)"}},"id":3875,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"765:67:17","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3876,"nodeType":"EmitStatement","src":"760:72:17"}]},"documentation":"@dev Creates a new difficulty oracle contract\n @param blockNumber Target block number\n @return Oracle contract","id":3878,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createDifficultyOracle","nodeType":"FunctionDefinition","parameters":{"id":3859,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3858,"name":"blockNumber","nodeType":"VariableDeclaration","scope":3878,"src":"599:16:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3857,"name":"uint","nodeType":"ElementaryTypeName","src":"599:4:17","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"598:18:17"},"payable":false,"returnParameters":{"id":3862,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3861,"name":"difficultyOracle","nodeType":"VariableDeclaration","scope":3878,"src":"649:33:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"},"typeName":{"contractScope":null,"id":3860,"name":"DifficultyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3845,"src":"649:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"value":null,"visibility":"internal"}],"src":"648:35:17"},"scope":3879,"src":"567:272:17","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3880,"src":"209:632:17"}],"src":"0:842:17"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/DifficultyOracleFactory.sol","exportedSymbols":{"DifficultyOracleFactory":[3879]},"id":3880,"nodeType":"SourceUnit","nodes":[{"id":3847,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:17"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/DifficultyOracle.sol","file":"../Oracles/DifficultyOracle.sol","id":3848,"nodeType":"ImportDirective","scope":3880,"sourceUnit":3846,"src":"25:41:17","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[3845],"contractKind":"contract","documentation":"@title Difficulty oracle factory contract - Allows to create difficulty oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":3879,"linearizedBaseContracts":[3879],"name":"DifficultyOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3856,"name":"DifficultyOracleCreation","nodeType":"EventDefinition","parameters":{"id":3855,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3850,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":3856,"src":"310:23:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3849,"name":"address","nodeType":"ElementaryTypeName","src":"310:7:17","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3852,"indexed":false,"name":"difficultyOracle","nodeType":"VariableDeclaration","scope":3856,"src":"335:33:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"},"typeName":{"contractScope":null,"id":3851,"name":"DifficultyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3845,"src":"335:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3854,"indexed":false,"name":"blockNumber","nodeType":"VariableDeclaration","scope":3856,"src":"370:16:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3853,"name":"uint","nodeType":"ElementaryTypeName","src":"370:4:17","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"309:78:17"},"src":"279:109:17"},{"body":{"id":3877,"nodeType":"Block","src":"688:151:17","statements":[{"expression":{"argumentTypes":null,"id":3868,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3863,"name":"difficultyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3861,"src":"698:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3866,"name":"blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3858,"src":"738:11:17","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3865,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"717:20:17","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_DifficultyOracle_$3845_$","typeString":"function (uint256) returns (contract DifficultyOracle)"},"typeName":{"contractScope":null,"id":3864,"name":"DifficultyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3845,"src":"721:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}}},"id":3867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"717:33:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"src":"698:52:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"id":3869,"nodeType":"ExpressionStatement","src":"698:52:17"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3871,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"790:3:17","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"790:10:17","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3873,"name":"difficultyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3861,"src":"802:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},{"argumentTypes":null,"id":3874,"name":"blockNumber","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3858,"src":"820:11:17","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3870,"name":"DifficultyOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3856,"src":"765:24:17","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_DifficultyOracle_$3845_$_t_uint256_$returns$__$","typeString":"function (address,contract DifficultyOracle,uint256)"}},"id":3875,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"765:67:17","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3876,"nodeType":"EmitStatement","src":"760:72:17"}]},"documentation":"@dev Creates a new difficulty oracle contract\n @param blockNumber Target block number\n @return Oracle contract","id":3878,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createDifficultyOracle","nodeType":"FunctionDefinition","parameters":{"id":3859,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3858,"name":"blockNumber","nodeType":"VariableDeclaration","scope":3878,"src":"599:16:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3857,"name":"uint","nodeType":"ElementaryTypeName","src":"599:4:17","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"598:18:17"},"payable":false,"returnParameters":{"id":3862,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3861,"name":"difficultyOracle","nodeType":"VariableDeclaration","scope":3878,"src":"649:33:17","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"},"typeName":{"contractScope":null,"id":3860,"name":"DifficultyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":3845,"src":"649:16:17","typeDescriptions":{"typeIdentifier":"t_contract$_DifficultyOracle_$3845","typeString":"contract DifficultyOracle"}},"value":null,"visibility":"internal"}],"src":"648:35:17"},"scope":3879,"src":"567:272:17","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3880,"src":"209:632:17"}],"src":"0:842:17"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0x5736ac1f72673c693e527cee216dadda344b1f5e","transactionHash":"0xec426fa943ee2977519ea41ea98fdbfdc38a6b4196bdf224c8a1b42afbdceefb"},"4":{"address":"0xc70f8f0b0e100f2e533d2fced5e525704e968e52","transactionHash":"0x9f4ead36127dccf9899dab5ad13ea75127ab2bb8c8faae8c50d93d354c2216ad"},"42":{"address":"0x0704c329a35635574e78360dd8586c16a010752d","transactionHash":"0x3f587cb1392a05fa44769a49e310bdb0f60d926004f286a97d6650affce999a1"},"437894314312":{"address":"0x6ed79aa1c71fd7bdbc515efda3bd4e26394435cc","transactionHash":"0x6b5bdd030cce53686c0a677d2ac69f3c82450a8045331c26ba6d8108365799a9"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.795Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ERC20.json": +/*!*************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/ERC20.json ***! + \*************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"ERC20","abi":[{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"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"},{"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"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\n\nimport \"./ERC20Basic.sol\";\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender)\n public view returns (uint256);\n\n function transferFrom(address from, address to, uint256 value)\n public returns (bool);\n\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n","sourcePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","ast":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","exportedSymbols":{"ERC20":[381]},"id":382,"nodeType":"SourceUnit","nodes":[{"id":340,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","file":"./ERC20Basic.sol","id":341,"nodeType":"ImportDirective","scope":382,"sourceUnit":414,"src":"26:26:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":342,"name":"ERC20Basic","nodeType":"UserDefinedTypeName","referencedDeclaration":413,"src":"162:10:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20Basic_$413","typeString":"contract ERC20Basic"}},"id":343,"nodeType":"InheritanceSpecifier","src":"162:10:3"}],"contractDependencies":[413],"contractKind":"contract","documentation":"@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20","fullyImplemented":false,"id":381,"linearizedBaseContracts":[381,413],"name":"ERC20","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":352,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"allowance","nodeType":"FunctionDefinition","parameters":{"id":348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":345,"name":"owner","nodeType":"VariableDeclaration","scope":352,"src":"196:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":344,"name":"address","nodeType":"ElementaryTypeName","src":"196:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":347,"name":"spender","nodeType":"VariableDeclaration","scope":352,"src":"211:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":346,"name":"address","nodeType":"ElementaryTypeName","src":"211:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"195:32:3"},"payable":false,"returnParameters":{"id":351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":350,"name":"","nodeType":"VariableDeclaration","scope":352,"src":"253:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":349,"name":"uint256","nodeType":"ElementaryTypeName","src":"253:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"252:9:3"},"scope":381,"src":"177:85:3","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":363,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":359,"nodeType":"ParameterList","parameters":[{"constant":false,"id":354,"name":"from","nodeType":"VariableDeclaration","scope":363,"src":"288:12:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":353,"name":"address","nodeType":"ElementaryTypeName","src":"288:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":356,"name":"to","nodeType":"VariableDeclaration","scope":363,"src":"302:10:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":355,"name":"address","nodeType":"ElementaryTypeName","src":"302:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":358,"name":"value","nodeType":"VariableDeclaration","scope":363,"src":"314:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":357,"name":"uint256","nodeType":"ElementaryTypeName","src":"314:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"287:41:3"},"payable":false,"returnParameters":{"id":362,"nodeType":"ParameterList","parameters":[{"constant":false,"id":361,"name":"","nodeType":"VariableDeclaration","scope":363,"src":"349:4:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":360,"name":"bool","nodeType":"ElementaryTypeName","src":"349:4:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"348:6:3"},"scope":381,"src":"266:89:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":372,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":368,"nodeType":"ParameterList","parameters":[{"constant":false,"id":365,"name":"spender","nodeType":"VariableDeclaration","scope":372,"src":"376:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":364,"name":"address","nodeType":"ElementaryTypeName","src":"376:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":367,"name":"value","nodeType":"VariableDeclaration","scope":372,"src":"393:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":366,"name":"uint256","nodeType":"ElementaryTypeName","src":"393:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"375:32:3"},"payable":false,"returnParameters":{"id":371,"nodeType":"ParameterList","parameters":[{"constant":false,"id":370,"name":"","nodeType":"VariableDeclaration","scope":372,"src":"424:4:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":369,"name":"bool","nodeType":"ElementaryTypeName","src":"424:4:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"423:6:3"},"scope":381,"src":"359:71:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"anonymous":false,"documentation":null,"id":380,"name":"Approval","nodeType":"EventDefinition","parameters":{"id":379,"nodeType":"ParameterList","parameters":[{"constant":false,"id":374,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":380,"src":"453:21:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":373,"name":"address","nodeType":"ElementaryTypeName","src":"453:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":376,"indexed":true,"name":"spender","nodeType":"VariableDeclaration","scope":380,"src":"480:23:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":375,"name":"address","nodeType":"ElementaryTypeName","src":"480:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":378,"indexed":false,"name":"value","nodeType":"VariableDeclaration","scope":380,"src":"509:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":377,"name":"uint256","nodeType":"ElementaryTypeName","src":"509:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"447:79:3"},"src":"433:94:3"}],"scope":382,"src":"144:385:3"}],"src":"0:530:3"},"legacyAST":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","exportedSymbols":{"ERC20":[381]},"id":382,"nodeType":"SourceUnit","nodes":[{"id":340,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","file":"./ERC20Basic.sol","id":341,"nodeType":"ImportDirective","scope":382,"sourceUnit":414,"src":"26:26:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":342,"name":"ERC20Basic","nodeType":"UserDefinedTypeName","referencedDeclaration":413,"src":"162:10:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20Basic_$413","typeString":"contract ERC20Basic"}},"id":343,"nodeType":"InheritanceSpecifier","src":"162:10:3"}],"contractDependencies":[413],"contractKind":"contract","documentation":"@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20","fullyImplemented":false,"id":381,"linearizedBaseContracts":[381,413],"name":"ERC20","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":352,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"allowance","nodeType":"FunctionDefinition","parameters":{"id":348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":345,"name":"owner","nodeType":"VariableDeclaration","scope":352,"src":"196:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":344,"name":"address","nodeType":"ElementaryTypeName","src":"196:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":347,"name":"spender","nodeType":"VariableDeclaration","scope":352,"src":"211:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":346,"name":"address","nodeType":"ElementaryTypeName","src":"211:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"195:32:3"},"payable":false,"returnParameters":{"id":351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":350,"name":"","nodeType":"VariableDeclaration","scope":352,"src":"253:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":349,"name":"uint256","nodeType":"ElementaryTypeName","src":"253:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"252:9:3"},"scope":381,"src":"177:85:3","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":363,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":359,"nodeType":"ParameterList","parameters":[{"constant":false,"id":354,"name":"from","nodeType":"VariableDeclaration","scope":363,"src":"288:12:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":353,"name":"address","nodeType":"ElementaryTypeName","src":"288:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":356,"name":"to","nodeType":"VariableDeclaration","scope":363,"src":"302:10:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":355,"name":"address","nodeType":"ElementaryTypeName","src":"302:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":358,"name":"value","nodeType":"VariableDeclaration","scope":363,"src":"314:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":357,"name":"uint256","nodeType":"ElementaryTypeName","src":"314:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"287:41:3"},"payable":false,"returnParameters":{"id":362,"nodeType":"ParameterList","parameters":[{"constant":false,"id":361,"name":"","nodeType":"VariableDeclaration","scope":363,"src":"349:4:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":360,"name":"bool","nodeType":"ElementaryTypeName","src":"349:4:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"348:6:3"},"scope":381,"src":"266:89:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":372,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":368,"nodeType":"ParameterList","parameters":[{"constant":false,"id":365,"name":"spender","nodeType":"VariableDeclaration","scope":372,"src":"376:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":364,"name":"address","nodeType":"ElementaryTypeName","src":"376:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":367,"name":"value","nodeType":"VariableDeclaration","scope":372,"src":"393:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":366,"name":"uint256","nodeType":"ElementaryTypeName","src":"393:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"375:32:3"},"payable":false,"returnParameters":{"id":371,"nodeType":"ParameterList","parameters":[{"constant":false,"id":370,"name":"","nodeType":"VariableDeclaration","scope":372,"src":"424:4:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":369,"name":"bool","nodeType":"ElementaryTypeName","src":"424:4:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"423:6:3"},"scope":381,"src":"359:71:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"anonymous":false,"documentation":null,"id":380,"name":"Approval","nodeType":"EventDefinition","parameters":{"id":379,"nodeType":"ParameterList","parameters":[{"constant":false,"id":374,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":380,"src":"453:21:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":373,"name":"address","nodeType":"ElementaryTypeName","src":"453:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":376,"indexed":true,"name":"spender","nodeType":"VariableDeclaration","scope":380,"src":"480:23:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":375,"name":"address","nodeType":"ElementaryTypeName","src":"480:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":378,"indexed":false,"name":"value","nodeType":"VariableDeclaration","scope":380,"src":"509:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":377,"name":"uint256","nodeType":"ElementaryTypeName","src":"509:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"447:79:3"},"src":"433:94:3"}],"scope":382,"src":"144:385:3"}],"src":"0:530:3"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-29T15:25:24.148Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ERC20Basic.json": +/*!******************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/ERC20Basic.json ***! + \******************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"DifficultyOracleFactory","abi":[{"constant":false,"inputs":[{"name":"blockNumber","type":"uint256"}],"name":"createDifficultyOracle","outputs":[{"name":"difficultyOracle","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"difficultyOracle","type":"address"},{"indexed":false,"name":"blockNumber","type":"uint256"}],"name":"DifficultyOracleCreation","type":"event"}],"networks":{"3":{"address":"0xa2f86534959e83abbade7f5a560ba735bb4de3a3","updated_at":1503605014190},"4":{"address":"0x47c70527aaa5e98ade8da8100aec805e6fda037b","updated_at":1503603856237},"42":{"address":"0x11bcc6eea4ac6415eed82db3c544e7bdb701129e","updated_at":1503602339889},"437894314312":{"address":"0xc89ce4735882c9f0f0fe26686c53074e09b0d550","updated_at":1507361155408}},"schema_version":"0.0.5","updated_at":1543915159047}; +module.exports = {"contractName":"ERC20Basic","abi":[{"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"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * See https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n","sourcePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","ast":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","exportedSymbols":{"ERC20Basic":[413]},"id":414,"nodeType":"SourceUnit","nodes":[{"id":383,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:4"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title ERC20Basic\n@dev Simpler version of ERC20 interface\nSee https://github.com/ethereum/EIPs/issues/179","fullyImplemented":false,"id":413,"linearizedBaseContracts":[413],"name":"ERC20Basic","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":388,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"totalSupply","nodeType":"FunctionDefinition","parameters":{"id":384,"nodeType":"ParameterList","parameters":[],"src":"194:2:4"},"payable":false,"returnParameters":{"id":387,"nodeType":"ParameterList","parameters":[{"constant":false,"id":386,"name":"","nodeType":"VariableDeclaration","scope":388,"src":"218:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":385,"name":"uint256","nodeType":"ElementaryTypeName","src":"218:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"217:9:4"},"scope":413,"src":"174:53:4","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":395,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"balanceOf","nodeType":"FunctionDefinition","parameters":{"id":391,"nodeType":"ParameterList","parameters":[{"constant":false,"id":390,"name":"who","nodeType":"VariableDeclaration","scope":395,"src":"249:11:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":389,"name":"address","nodeType":"ElementaryTypeName","src":"249:7:4","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"248:13:4"},"payable":false,"returnParameters":{"id":394,"nodeType":"ParameterList","parameters":[{"constant":false,"id":393,"name":"","nodeType":"VariableDeclaration","scope":395,"src":"283:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":392,"name":"uint256","nodeType":"ElementaryTypeName","src":"283:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"282:9:4"},"scope":413,"src":"230:62:4","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":404,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transfer","nodeType":"FunctionDefinition","parameters":{"id":400,"nodeType":"ParameterList","parameters":[{"constant":false,"id":397,"name":"to","nodeType":"VariableDeclaration","scope":404,"src":"313:10:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":396,"name":"address","nodeType":"ElementaryTypeName","src":"313:7:4","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":399,"name":"value","nodeType":"VariableDeclaration","scope":404,"src":"325:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":398,"name":"uint256","nodeType":"ElementaryTypeName","src":"325:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"312:27:4"},"payable":false,"returnParameters":{"id":403,"nodeType":"ParameterList","parameters":[{"constant":false,"id":402,"name":"","nodeType":"VariableDeclaration","scope":404,"src":"356:4:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":401,"name":"bool","nodeType":"ElementaryTypeName","src":"356:4:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"355:6:4"},"scope":413,"src":"295:67:4","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"anonymous":false,"documentation":null,"id":412,"name":"Transfer","nodeType":"EventDefinition","parameters":{"id":411,"nodeType":"ParameterList","parameters":[{"constant":false,"id":406,"indexed":true,"name":"from","nodeType":"VariableDeclaration","scope":412,"src":"380:20:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":405,"name":"address","nodeType":"ElementaryTypeName","src":"380:7:4","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":408,"indexed":true,"name":"to","nodeType":"VariableDeclaration","scope":412,"src":"402:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":407,"name":"address","nodeType":"ElementaryTypeName","src":"402:7:4","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":410,"indexed":false,"name":"value","nodeType":"VariableDeclaration","scope":412,"src":"422:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":409,"name":"uint256","nodeType":"ElementaryTypeName","src":"422:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"379:57:4"},"src":"365:72:4"}],"scope":414,"src":"150:289:4"}],"src":"0:440:4"},"legacyAST":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","exportedSymbols":{"ERC20Basic":[413]},"id":414,"nodeType":"SourceUnit","nodes":[{"id":383,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:4"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title ERC20Basic\n@dev Simpler version of ERC20 interface\nSee https://github.com/ethereum/EIPs/issues/179","fullyImplemented":false,"id":413,"linearizedBaseContracts":[413],"name":"ERC20Basic","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":388,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"totalSupply","nodeType":"FunctionDefinition","parameters":{"id":384,"nodeType":"ParameterList","parameters":[],"src":"194:2:4"},"payable":false,"returnParameters":{"id":387,"nodeType":"ParameterList","parameters":[{"constant":false,"id":386,"name":"","nodeType":"VariableDeclaration","scope":388,"src":"218:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":385,"name":"uint256","nodeType":"ElementaryTypeName","src":"218:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"217:9:4"},"scope":413,"src":"174:53:4","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":395,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"balanceOf","nodeType":"FunctionDefinition","parameters":{"id":391,"nodeType":"ParameterList","parameters":[{"constant":false,"id":390,"name":"who","nodeType":"VariableDeclaration","scope":395,"src":"249:11:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":389,"name":"address","nodeType":"ElementaryTypeName","src":"249:7:4","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"248:13:4"},"payable":false,"returnParameters":{"id":394,"nodeType":"ParameterList","parameters":[{"constant":false,"id":393,"name":"","nodeType":"VariableDeclaration","scope":395,"src":"283:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":392,"name":"uint256","nodeType":"ElementaryTypeName","src":"283:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"282:9:4"},"scope":413,"src":"230:62:4","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":404,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transfer","nodeType":"FunctionDefinition","parameters":{"id":400,"nodeType":"ParameterList","parameters":[{"constant":false,"id":397,"name":"to","nodeType":"VariableDeclaration","scope":404,"src":"313:10:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":396,"name":"address","nodeType":"ElementaryTypeName","src":"313:7:4","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":399,"name":"value","nodeType":"VariableDeclaration","scope":404,"src":"325:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":398,"name":"uint256","nodeType":"ElementaryTypeName","src":"325:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"312:27:4"},"payable":false,"returnParameters":{"id":403,"nodeType":"ParameterList","parameters":[{"constant":false,"id":402,"name":"","nodeType":"VariableDeclaration","scope":404,"src":"356:4:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":401,"name":"bool","nodeType":"ElementaryTypeName","src":"356:4:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"355:6:4"},"scope":413,"src":"295:67:4","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"anonymous":false,"documentation":null,"id":412,"name":"Transfer","nodeType":"EventDefinition","parameters":{"id":411,"nodeType":"ParameterList","parameters":[{"constant":false,"id":406,"indexed":true,"name":"from","nodeType":"VariableDeclaration","scope":412,"src":"380:20:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":405,"name":"address","nodeType":"ElementaryTypeName","src":"380:7:4","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":408,"indexed":true,"name":"to","nodeType":"VariableDeclaration","scope":412,"src":"402:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":407,"name":"address","nodeType":"ElementaryTypeName","src":"402:7:4","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":410,"indexed":false,"name":"value","nodeType":"VariableDeclaration","scope":412,"src":"422:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":409,"name":"uint256","nodeType":"ElementaryTypeName","src":"422:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"379:57:4"},"src":"365:72:4"}],"scope":414,"src":"150:289:4"}],"src":"0:440:4"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-29T15:25:24.147Z"}; /***/ }), @@ -220,10 +362,10 @@ module.exports = {"contract_name":"DifficultyOracleFactory","abi":[{"constant":f /*!******************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/EtherToken.json ***! \******************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"EtherToken","abi":[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"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,"type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"receiver","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Withdrawal","type":"event"},{"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"}],"networks":{"1":{"address":"0xd6031f24a7cc5d5ce33d763b66bc4b0c5f22936b","updated_at":1513984936000},"3":{"address":"0xeaa325bacae405fd5b45e9cf695d391f1c624a2f","updated_at":1503605014187},"4":{"address":"0xd19bce9f7693598a9fa1f94c548b20887a33f141","updated_at":1503603856233},"42":{"address":"0x9326454039077bcea0705d6b68c8e9b104094a1c","updated_at":1503602339886},"437894314312":{"address":"0x59d3631c86bbe35ef041872d502f218a39fba150","updated_at":1507361155404}},"schema_version":"0.0.5","updated_at":1543915159049}; +module.exports = {"contractName":"WETH9","abi":[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"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":"balanceOf","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"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"guy","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Withdrawal","type":"event"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"},{"name":"wad","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"src","type":"address"},{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x60806040526040805190810160405280600d81526020017f57726170706564204574686572000000000000000000000000000000000000008152506000908051906020019061004f9291906100ca565b506040805190810160405280600481526020017f57455448000000000000000000000000000000000000000000000000000000008152506001908051906020019061009b9291906100ca565b506012600260006101000a81548160ff021916908360ff1602179055503480156100c457600080fd5b5061016f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010b57805160ff1916838001178555610139565b82800160010185558215610139579182015b8281111561013857825182559160200191906001019061011d565b5b509050610146919061014a565b5090565b61016c91905b80821115610168576000816000905550600101610150565b5090565b90565b610c848061017e6000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b9578063095ea7b31461014957806318160ddd146101ae57806323b872dd146101d95780632e1a7d4d1461025e578063313ce5671461028b57806370a08231146102bc57806395d89b4114610313578063a9059cbb146103a3578063d0e30db014610408578063dd62ed3e14610412575b6100b7610489565b005b3480156100c557600080fd5b506100ce610526565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561010e5780820151818401526020810190506100f3565b50505050905090810190601f16801561013b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015557600080fd5b50610194600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105c4565b604051808215151515815260200191505060405180910390f35b3480156101ba57600080fd5b506101c36106b6565b6040518082815260200191505060405180910390f35b3480156101e557600080fd5b50610244600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106d5565b604051808215151515815260200191505060405180910390f35b34801561026a57600080fd5b5061028960048036038101908080359060200190929190505050610a22565b005b34801561029757600080fd5b506102a0610b55565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102c857600080fd5b506102fd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b68565b6040518082815260200191505060405180910390f35b34801561031f57600080fd5b50610328610b80565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036857808201518184015260208101905061034d565b50505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103af57600080fd5b506103ee600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c1e565b604051808215151515815260200191505060405180910390f35b610410610489565b005b34801561041e57600080fd5b50610473600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c33565b6040518082815260200191505060405180910390f35b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105bc5780601f10610591576101008083540402835291602001916105bc565b820191906000526020600020905b81548152906001019060200180831161059f57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561072557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156107fd57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156109185781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561088d57600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a7057600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610b03573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c165780601f10610beb57610100808354040283529160200191610c16565b820191906000526020600020905b815481529060010190602001808311610bf957829003601f168201915b505050505081565b6000610c2b3384846106d5565b905092915050565b60046020528160005260406000206020528060005260406000206000915091505054815600a165627a7a72305820291e2063eb87b6f7391bfb2dbfcd0c234cbcde26101eb879dba26937711f4a890029","deployedBytecode":"0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b9578063095ea7b31461014957806318160ddd146101ae57806323b872dd146101d95780632e1a7d4d1461025e578063313ce5671461028b57806370a08231146102bc57806395d89b4114610313578063a9059cbb146103a3578063d0e30db014610408578063dd62ed3e14610412575b6100b7610489565b005b3480156100c557600080fd5b506100ce610526565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561010e5780820151818401526020810190506100f3565b50505050905090810190601f16801561013b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015557600080fd5b50610194600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105c4565b604051808215151515815260200191505060405180910390f35b3480156101ba57600080fd5b506101c36106b6565b6040518082815260200191505060405180910390f35b3480156101e557600080fd5b50610244600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106d5565b604051808215151515815260200191505060405180910390f35b34801561026a57600080fd5b5061028960048036038101908080359060200190929190505050610a22565b005b34801561029757600080fd5b506102a0610b55565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102c857600080fd5b506102fd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b68565b6040518082815260200191505060405180910390f35b34801561031f57600080fd5b50610328610b80565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036857808201518184015260208101905061034d565b50505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103af57600080fd5b506103ee600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c1e565b604051808215151515815260200191505060405180910390f35b610410610489565b005b34801561041e57600080fd5b50610473600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c33565b6040518082815260200191505060405180910390f35b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105bc5780601f10610591576101008083540402835291602001916105bc565b820191906000526020600020905b81548152906001019060200180831161059f57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561072557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156107fd57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156109185781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561088d57600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a7057600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610b03573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c165780601f10610beb57610100808354040283529160200191610c16565b820191906000526020600020905b815481529060010190602001808311610bf957829003601f168201915b505050505081565b6000610c2b3384846106d5565b905092915050565b60046020528160005260406000206020528060005260406000206000915091505054815600a165627a7a72305820291e2063eb87b6f7391bfb2dbfcd0c234cbcde26101eb879dba26937711f4a890029","sourceMap":"712:1807:1:-;;;733:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;779:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;841:2;816:27;;;;;;;;;;;;;;;;;;;;712:1807;8:9:-1;5:2;;;30:1;27;20:12;5:2;712:1807:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;","deployedSourceMap":"712:1807:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1281:9;:7;:9::i;:::-;712:1807;733:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;733:40:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;733:40:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1747:177;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1747:177:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1646:95;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1646:95:1;;;;;;;;;;;;;;;;;;;;;;;2057:460;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2057:460:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1437:203;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1437:203:1;;;;;;;;;;;;;;;;;;;;;;;;;;816:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;816:27:1;;;;;;;;;;;;;;;;;;;;;;;;;;;1102:65;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1102:65:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;779:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;779:31:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;779:31:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1930:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1930:121:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1302:130;;;;;;1173:65;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1173:65:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1302:130;1371:9;1346;:21;1356:10;1346:21;;;;;;;;;;;;;;;;:34;;;;;;;;;;;1403:10;1395:30;;;1415:9;1395:30;;;;;;;;;;;;;;;;;;1302:130::o;733:40::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1747:177::-;1803:4;1848:3;1819:9;:21;1829:10;1819:21;;;;;;;;;;;;;;;:26;1841:3;1819:26;;;;;;;;;;;;;;;:32;;;;1887:3;1866:30;;1875:10;1866:30;;;1892:3;1866:30;;;;;;;;;;;;;;;;;;1913:4;1906:11;;1747:177;;;;:::o;1646:95::-;1690:4;1721;1713:21;;;1706:28;;1646:95;:::o;2057:460::-;2147:4;2193:3;2175:9;:14;2185:3;2175:14;;;;;;;;;;;;;;;;:21;;2167:30;;;;;;;;2219:10;2212:17;;:3;:17;;;;:59;;;;;2268:2;2233:9;:14;2243:3;2233:14;;;;;;;;;;;;;;;:26;2248:10;2233:26;;;;;;;;;;;;;;;;:38;;2212:59;2208:179;;;2325:3;2295:9;:14;2305:3;2295:14;;;;;;;;;;;;;;;:26;2310:10;2295:26;;;;;;;;;;;;;;;;:33;;2287:42;;;;;;;;2373:3;2343:9;:14;2353:3;2343:14;;;;;;;;;;;;;;;:26;2358:10;2343:26;;;;;;;;;;;;;;;;:33;;;;;;;;;;;2208:179;2415:3;2397:9;:14;2407:3;2397:14;;;;;;;;;;;;;;;;:21;;;;;;;;;;;2446:3;2428:9;:14;2438:3;2428:14;;;;;;;;;;;;;;;;:21;;;;;;;;;;;2479:3;2465:23;;2474:3;2465:23;;;2484:3;2465:23;;;;;;;;;;;;;;;;;;2506:4;2499:11;;2057:460;;;;;:::o;1437:203::-;1515:3;1490:9;:21;1500:10;1490:21;;;;;;;;;;;;;;;;:28;;1482:37;;;;;;;;1554:3;1529:9;:21;1539:10;1529:21;;;;;;;;;;;;;;;;:28;;;;;;;;;;;1567:10;:19;;:24;1587:3;1567:24;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1567:24:1;1617:10;1606:27;;;1629:3;1606:27;;;;;;;;;;;;;;;;;;1437:203;:::o;816:27::-;;;;;;;;;;;;;:::o;1102:65::-;;;;;;;;;;;;;;;;;:::o;779:31::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1930:121::-;1987:4;2010:34;2023:10;2035:3;2040;2010:12;:34::i;:::-;2003:41;;1930:121;;;;:::o;1173:65::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o","source":"// Copyright (C) 2015, 2016, 2017 Dapphub\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.4.18;\n\ncontract WETH9 {\n string public name = \"Wrapped Ether\";\n string public symbol = \"WETH\";\n uint8 public decimals = 18;\n\n event Approval(address indexed src, address indexed guy, uint wad);\n event Transfer(address indexed src, address indexed dst, uint wad);\n event Deposit(address indexed dst, uint wad);\n event Withdrawal(address indexed src, uint wad);\n\n mapping (address => uint) public balanceOf;\n mapping (address => mapping (address => uint)) public allowance;\n\n function() public payable {\n deposit();\n }\n function deposit() public payable {\n balanceOf[msg.sender] += msg.value;\n emit Deposit(msg.sender, msg.value);\n }\n function withdraw(uint wad) public {\n require(balanceOf[msg.sender] >= wad);\n balanceOf[msg.sender] -= wad;\n msg.sender.transfer(wad);\n emit Withdrawal(msg.sender, wad);\n }\n\n function totalSupply() public view returns (uint) {\n return address(this).balance;\n }\n\n function approve(address guy, uint wad) public returns (bool) {\n allowance[msg.sender][guy] = wad;\n emit Approval(msg.sender, guy, wad);\n return true;\n }\n\n function transfer(address dst, uint wad) public returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint wad)\n public\n returns (bool)\n {\n require(balanceOf[src] >= wad);\n\n if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n require(allowance[src][msg.sender] >= wad);\n allowance[src][msg.sender] -= wad;\n }\n\n balanceOf[src] -= wad;\n balanceOf[dst] += wad;\n\n emit Transfer(src, dst, wad);\n\n return true;\n }\n}\n\n\n/*\n GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n.\n\n*/","sourcePath":"canonical-weth/contracts/WETH9.sol","ast":{"absolutePath":"canonical-weth/contracts/WETH9.sol","exportedSymbols":{"WETH9":[304]},"id":305,"nodeType":"SourceUnit","nodes":[{"id":60,"literals":["solidity","^","0.4",".18"],"nodeType":"PragmaDirective","src":"686:24:1"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":304,"linearizedBaseContracts":[304],"name":"WETH9","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":63,"name":"name","nodeType":"VariableDeclaration","scope":304,"src":"733:40:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":61,"name":"string","nodeType":"ElementaryTypeName","src":"733:6:1","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":{"argumentTypes":null,"hexValue":"57726170706564204574686572","id":62,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"758:15:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_00cd3d46df44f2cbb950cf84eb2e92aa2ddd23195b1a009173ea59a063357ed3","typeString":"literal_string \"Wrapped Ether\""},"value":"Wrapped Ether"},"visibility":"public"},{"constant":false,"id":66,"name":"symbol","nodeType":"VariableDeclaration","scope":304,"src":"779:31:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":64,"name":"string","nodeType":"ElementaryTypeName","src":"779:6:1","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":{"argumentTypes":null,"hexValue":"57455448","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"804:6:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8","typeString":"literal_string \"WETH\""},"value":"WETH"},"visibility":"public"},{"constant":false,"id":69,"name":"decimals","nodeType":"VariableDeclaration","scope":304,"src":"816:27:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":67,"name":"uint8","nodeType":"ElementaryTypeName","src":"816:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"3138","id":68,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"841:2:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18_by_1","typeString":"int_const 18"},"value":"18"},"visibility":"public"},{"anonymous":false,"documentation":null,"id":77,"name":"Approval","nodeType":"EventDefinition","parameters":{"id":76,"nodeType":"ParameterList","parameters":[{"constant":false,"id":71,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":77,"src":"866:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":70,"name":"address","nodeType":"ElementaryTypeName","src":"866:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":73,"indexed":true,"name":"guy","nodeType":"VariableDeclaration","scope":77,"src":"887:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":72,"name":"address","nodeType":"ElementaryTypeName","src":"887:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":75,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":77,"src":"908:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":74,"name":"uint","nodeType":"ElementaryTypeName","src":"908:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"865:52:1"},"src":"850:68:1"},{"anonymous":false,"documentation":null,"id":85,"name":"Transfer","nodeType":"EventDefinition","parameters":{"id":84,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":85,"src":"939:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":78,"name":"address","nodeType":"ElementaryTypeName","src":"939:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":81,"indexed":true,"name":"dst","nodeType":"VariableDeclaration","scope":85,"src":"960:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":80,"name":"address","nodeType":"ElementaryTypeName","src":"960:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":83,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":85,"src":"981:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":82,"name":"uint","nodeType":"ElementaryTypeName","src":"981:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"938:52:1"},"src":"923:68:1"},{"anonymous":false,"documentation":null,"id":91,"name":"Deposit","nodeType":"EventDefinition","parameters":{"id":90,"nodeType":"ParameterList","parameters":[{"constant":false,"id":87,"indexed":true,"name":"dst","nodeType":"VariableDeclaration","scope":91,"src":"1011:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"1011:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":89,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":91,"src":"1032:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":88,"name":"uint","nodeType":"ElementaryTypeName","src":"1032:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1010:31:1"},"src":"996:46:1"},{"anonymous":false,"documentation":null,"id":97,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":96,"nodeType":"ParameterList","parameters":[{"constant":false,"id":93,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":97,"src":"1065:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":92,"name":"address","nodeType":"ElementaryTypeName","src":"1065:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":95,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":97,"src":"1086:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":94,"name":"uint","nodeType":"ElementaryTypeName","src":"1086:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1064:31:1"},"src":"1047:49:1"},{"constant":false,"id":101,"name":"balanceOf","nodeType":"VariableDeclaration","scope":304,"src":"1102:65:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":100,"keyType":{"id":98,"name":"address","nodeType":"ElementaryTypeName","src":"1111:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1102:25:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":99,"name":"uint","nodeType":"ElementaryTypeName","src":"1122:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":107,"name":"allowance","nodeType":"VariableDeclaration","scope":304,"src":"1173:65:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":106,"keyType":{"id":102,"name":"address","nodeType":"ElementaryTypeName","src":"1182:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1173:46:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":105,"keyType":{"id":103,"name":"address","nodeType":"ElementaryTypeName","src":"1202:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1193:25:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":104,"name":"uint","nodeType":"ElementaryTypeName","src":"1213:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"},{"body":{"id":113,"nodeType":"Block","src":"1271:26:1","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":110,"name":"deposit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":133,"src":"1281:7:1","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1281:9:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":112,"nodeType":"ExpressionStatement","src":"1281:9:1"}]},"documentation":null,"id":114,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":108,"nodeType":"ParameterList","parameters":[],"src":"1253:2:1"},"payable":true,"returnParameters":{"id":109,"nodeType":"ParameterList","parameters":[],"src":"1271:0:1"},"scope":304,"src":"1245:52:1","stateMutability":"payable","superFunction":null,"visibility":"public"},{"body":{"id":132,"nodeType":"Block","src":"1336:96:1","statements":[{"expression":{"argumentTypes":null,"id":123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":117,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1346:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":120,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":118,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1356:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1356:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1346:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":121,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1371:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"value","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1371:9:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1346:34:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":124,"nodeType":"ExpressionStatement","src":"1346:34:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":126,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1403:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":127,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1403:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":128,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1415:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"value","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1415:9:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":125,"name":"Deposit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":91,"src":"1395:7:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":130,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1395:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":131,"nodeType":"EmitStatement","src":"1390:35:1"}]},"documentation":null,"id":133,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"deposit","nodeType":"FunctionDefinition","parameters":{"id":115,"nodeType":"ParameterList","parameters":[],"src":"1318:2:1"},"payable":true,"returnParameters":{"id":116,"nodeType":"ParameterList","parameters":[],"src":"1336:0:1"},"scope":304,"src":"1302:130:1","stateMutability":"payable","superFunction":null,"visibility":"public"},{"body":{"id":168,"nodeType":"Block","src":"1472:168:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":144,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":139,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1490:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":142,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":140,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1500:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":141,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1500:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1490:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":143,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1515:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1490:28:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":138,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"1482:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":145,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1482:37:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":146,"nodeType":"ExpressionStatement","src":"1482:37:1"},{"expression":{"argumentTypes":null,"id":152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":147,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1529:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":150,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":148,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1539:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1539:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1529:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":151,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1554:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1529:28:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":153,"nodeType":"ExpressionStatement","src":"1529:28:1"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":159,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1587:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":154,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1567:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1567:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":158,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1567:19:1","typeDescriptions":{"typeIdentifier":"t_function_transfer_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":160,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1567:24:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":161,"nodeType":"ExpressionStatement","src":"1567:24:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":163,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1617:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1617:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":165,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1629:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":162,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":97,"src":"1606:10:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1606:27:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":167,"nodeType":"EmitStatement","src":"1601:32:1"}]},"documentation":null,"id":169,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":136,"nodeType":"ParameterList","parameters":[{"constant":false,"id":135,"name":"wad","nodeType":"VariableDeclaration","scope":169,"src":"1455:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":134,"name":"uint","nodeType":"ElementaryTypeName","src":"1455:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1454:10:1"},"payable":false,"returnParameters":{"id":137,"nodeType":"ParameterList","parameters":[],"src":"1472:0:1"},"scope":304,"src":"1437:203:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":179,"nodeType":"Block","src":"1696:45:1","statements":[{"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":175,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":441,"src":"1721:4:1","typeDescriptions":{"typeIdentifier":"t_contract$_WETH9_$304","typeString":"contract WETH9"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_WETH9_$304","typeString":"contract WETH9"}],"id":174,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1713:7:1","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":176,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1713:13:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":177,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balance","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1713:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":173,"id":178,"nodeType":"Return","src":"1706:28:1"}]},"documentation":null,"id":180,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"totalSupply","nodeType":"FunctionDefinition","parameters":{"id":170,"nodeType":"ParameterList","parameters":[],"src":"1666:2:1"},"payable":false,"returnParameters":{"id":173,"nodeType":"ParameterList","parameters":[{"constant":false,"id":172,"name":"","nodeType":"VariableDeclaration","scope":180,"src":"1690:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":171,"name":"uint","nodeType":"ElementaryTypeName","src":"1690:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1689:6:1"},"scope":304,"src":"1646:95:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":207,"nodeType":"Block","src":"1809:115:1","statements":[{"expression":{"argumentTypes":null,"id":196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":189,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"1819:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":193,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":190,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1829:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":191,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1829:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1819:21:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":194,"indexExpression":{"argumentTypes":null,"id":192,"name":"guy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"1841:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1819:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":195,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1848:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1819:32:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":197,"nodeType":"ExpressionStatement","src":"1819:32:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":199,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1875:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1875:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":201,"name":"guy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"1887:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":202,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1892:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":198,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":77,"src":"1866:8:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":203,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1866:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":204,"nodeType":"EmitStatement","src":"1861:35:1"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":205,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1913:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":188,"id":206,"nodeType":"Return","src":"1906:11:1"}]},"documentation":null,"id":208,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":185,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"name":"guy","nodeType":"VariableDeclaration","scope":208,"src":"1764:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":181,"name":"address","nodeType":"ElementaryTypeName","src":"1764:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":184,"name":"wad","nodeType":"VariableDeclaration","scope":208,"src":"1777:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":183,"name":"uint","nodeType":"ElementaryTypeName","src":"1777:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1763:23:1"},"payable":false,"returnParameters":{"id":188,"nodeType":"ParameterList","parameters":[{"constant":false,"id":187,"name":"","nodeType":"VariableDeclaration","scope":208,"src":"1803:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":186,"name":"bool","nodeType":"ElementaryTypeName","src":"1803:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1802:6:1"},"scope":304,"src":"1747:177:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":224,"nodeType":"Block","src":"1993:58:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":218,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2023:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":219,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2023:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":220,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":210,"src":"2035:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":221,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":212,"src":"2040:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":217,"name":"transferFrom","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":303,"src":"2010:12:1","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) returns (bool)"}},"id":222,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2010:34:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":216,"id":223,"nodeType":"Return","src":"2003:41:1"}]},"documentation":null,"id":225,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transfer","nodeType":"FunctionDefinition","parameters":{"id":213,"nodeType":"ParameterList","parameters":[{"constant":false,"id":210,"name":"dst","nodeType":"VariableDeclaration","scope":225,"src":"1948:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":209,"name":"address","nodeType":"ElementaryTypeName","src":"1948:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":212,"name":"wad","nodeType":"VariableDeclaration","scope":225,"src":"1961:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":211,"name":"uint","nodeType":"ElementaryTypeName","src":"1961:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1947:23:1"},"payable":false,"returnParameters":{"id":216,"nodeType":"ParameterList","parameters":[{"constant":false,"id":215,"name":"","nodeType":"VariableDeclaration","scope":225,"src":"1987:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":214,"name":"bool","nodeType":"ElementaryTypeName","src":"1987:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1986:6:1"},"scope":304,"src":"1930:121:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":302,"nodeType":"Block","src":"2157:360:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":237,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2175:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":239,"indexExpression":{"argumentTypes":null,"id":238,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2185:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2175:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":240,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2193:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2175:21:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"2167:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":242,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2167:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":243,"nodeType":"ExpressionStatement","src":"2167:30:1"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":259,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":247,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":244,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2212:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":245,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2219:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2219:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2212:17:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":248,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2233:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":250,"indexExpression":{"argumentTypes":null,"id":249,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2243:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2233:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":253,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":251,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2248:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":252,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2248:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2233:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":256,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"2268:2:1","subExpression":{"argumentTypes":null,"hexValue":"31","id":255,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2269:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}],"id":254,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2263:4:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2263:8:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2233:38:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2212:59:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":281,"nodeType":"IfStatement","src":"2208:179:1","trueBody":{"id":280,"nodeType":"Block","src":"2273:114:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":261,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2295:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":263,"indexExpression":{"argumentTypes":null,"id":262,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2305:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2295:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":266,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":264,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2310:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":265,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2310:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2295:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":267,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2325:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2295:33:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":260,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"2287:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2287:42:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":270,"nodeType":"ExpressionStatement","src":"2287:42:1"},{"expression":{"argumentTypes":null,"id":278,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":271,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2343:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":275,"indexExpression":{"argumentTypes":null,"id":272,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2353:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2343:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":276,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":273,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2358:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":274,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2358:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2343:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":277,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2373:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2343:33:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":279,"nodeType":"ExpressionStatement","src":"2343:33:1"}]}},{"expression":{"argumentTypes":null,"id":286,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":282,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2397:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":284,"indexExpression":{"argumentTypes":null,"id":283,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2407:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2397:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":285,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2415:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2397:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":287,"nodeType":"ExpressionStatement","src":"2397:21:1"},{"expression":{"argumentTypes":null,"id":292,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":288,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2428:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":290,"indexExpression":{"argumentTypes":null,"id":289,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":229,"src":"2438:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2428:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"id":291,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2446:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2428:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":293,"nodeType":"ExpressionStatement","src":"2428:21:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":295,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2474:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":296,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":229,"src":"2479:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":297,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2484:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":294,"name":"Transfer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"2465:8:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2465:23:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":299,"nodeType":"EmitStatement","src":"2460:28:1"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":300,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2506:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":235,"id":301,"nodeType":"Return","src":"2499:11:1"}]},"documentation":null,"id":303,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":232,"nodeType":"ParameterList","parameters":[{"constant":false,"id":227,"name":"src","nodeType":"VariableDeclaration","scope":303,"src":"2079:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":226,"name":"address","nodeType":"ElementaryTypeName","src":"2079:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":229,"name":"dst","nodeType":"VariableDeclaration","scope":303,"src":"2092:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":228,"name":"address","nodeType":"ElementaryTypeName","src":"2092:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":231,"name":"wad","nodeType":"VariableDeclaration","scope":303,"src":"2105:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":230,"name":"uint","nodeType":"ElementaryTypeName","src":"2105:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2078:36:1"},"payable":false,"returnParameters":{"id":235,"nodeType":"ParameterList","parameters":[{"constant":false,"id":234,"name":"","nodeType":"VariableDeclaration","scope":303,"src":"2147:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":233,"name":"bool","nodeType":"ElementaryTypeName","src":"2147:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2146:6:1"},"scope":304,"src":"2057:460:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":305,"src":"712:1807:1"}],"src":"686:36989:1"},"legacyAST":{"absolutePath":"canonical-weth/contracts/WETH9.sol","exportedSymbols":{"WETH9":[304]},"id":305,"nodeType":"SourceUnit","nodes":[{"id":60,"literals":["solidity","^","0.4",".18"],"nodeType":"PragmaDirective","src":"686:24:1"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":304,"linearizedBaseContracts":[304],"name":"WETH9","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":63,"name":"name","nodeType":"VariableDeclaration","scope":304,"src":"733:40:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":61,"name":"string","nodeType":"ElementaryTypeName","src":"733:6:1","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":{"argumentTypes":null,"hexValue":"57726170706564204574686572","id":62,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"758:15:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_00cd3d46df44f2cbb950cf84eb2e92aa2ddd23195b1a009173ea59a063357ed3","typeString":"literal_string \"Wrapped Ether\""},"value":"Wrapped Ether"},"visibility":"public"},{"constant":false,"id":66,"name":"symbol","nodeType":"VariableDeclaration","scope":304,"src":"779:31:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":64,"name":"string","nodeType":"ElementaryTypeName","src":"779:6:1","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":{"argumentTypes":null,"hexValue":"57455448","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"804:6:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8","typeString":"literal_string \"WETH\""},"value":"WETH"},"visibility":"public"},{"constant":false,"id":69,"name":"decimals","nodeType":"VariableDeclaration","scope":304,"src":"816:27:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":67,"name":"uint8","nodeType":"ElementaryTypeName","src":"816:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"3138","id":68,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"841:2:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18_by_1","typeString":"int_const 18"},"value":"18"},"visibility":"public"},{"anonymous":false,"documentation":null,"id":77,"name":"Approval","nodeType":"EventDefinition","parameters":{"id":76,"nodeType":"ParameterList","parameters":[{"constant":false,"id":71,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":77,"src":"866:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":70,"name":"address","nodeType":"ElementaryTypeName","src":"866:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":73,"indexed":true,"name":"guy","nodeType":"VariableDeclaration","scope":77,"src":"887:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":72,"name":"address","nodeType":"ElementaryTypeName","src":"887:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":75,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":77,"src":"908:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":74,"name":"uint","nodeType":"ElementaryTypeName","src":"908:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"865:52:1"},"src":"850:68:1"},{"anonymous":false,"documentation":null,"id":85,"name":"Transfer","nodeType":"EventDefinition","parameters":{"id":84,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":85,"src":"939:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":78,"name":"address","nodeType":"ElementaryTypeName","src":"939:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":81,"indexed":true,"name":"dst","nodeType":"VariableDeclaration","scope":85,"src":"960:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":80,"name":"address","nodeType":"ElementaryTypeName","src":"960:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":83,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":85,"src":"981:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":82,"name":"uint","nodeType":"ElementaryTypeName","src":"981:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"938:52:1"},"src":"923:68:1"},{"anonymous":false,"documentation":null,"id":91,"name":"Deposit","nodeType":"EventDefinition","parameters":{"id":90,"nodeType":"ParameterList","parameters":[{"constant":false,"id":87,"indexed":true,"name":"dst","nodeType":"VariableDeclaration","scope":91,"src":"1011:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"1011:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":89,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":91,"src":"1032:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":88,"name":"uint","nodeType":"ElementaryTypeName","src":"1032:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1010:31:1"},"src":"996:46:1"},{"anonymous":false,"documentation":null,"id":97,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":96,"nodeType":"ParameterList","parameters":[{"constant":false,"id":93,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":97,"src":"1065:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":92,"name":"address","nodeType":"ElementaryTypeName","src":"1065:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":95,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":97,"src":"1086:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":94,"name":"uint","nodeType":"ElementaryTypeName","src":"1086:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1064:31:1"},"src":"1047:49:1"},{"constant":false,"id":101,"name":"balanceOf","nodeType":"VariableDeclaration","scope":304,"src":"1102:65:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":100,"keyType":{"id":98,"name":"address","nodeType":"ElementaryTypeName","src":"1111:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1102:25:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":99,"name":"uint","nodeType":"ElementaryTypeName","src":"1122:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":107,"name":"allowance","nodeType":"VariableDeclaration","scope":304,"src":"1173:65:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":106,"keyType":{"id":102,"name":"address","nodeType":"ElementaryTypeName","src":"1182:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1173:46:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":105,"keyType":{"id":103,"name":"address","nodeType":"ElementaryTypeName","src":"1202:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1193:25:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":104,"name":"uint","nodeType":"ElementaryTypeName","src":"1213:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"},{"body":{"id":113,"nodeType":"Block","src":"1271:26:1","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":110,"name":"deposit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":133,"src":"1281:7:1","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1281:9:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":112,"nodeType":"ExpressionStatement","src":"1281:9:1"}]},"documentation":null,"id":114,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":108,"nodeType":"ParameterList","parameters":[],"src":"1253:2:1"},"payable":true,"returnParameters":{"id":109,"nodeType":"ParameterList","parameters":[],"src":"1271:0:1"},"scope":304,"src":"1245:52:1","stateMutability":"payable","superFunction":null,"visibility":"public"},{"body":{"id":132,"nodeType":"Block","src":"1336:96:1","statements":[{"expression":{"argumentTypes":null,"id":123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":117,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1346:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":120,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":118,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1356:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1356:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1346:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":121,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1371:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"value","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1371:9:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1346:34:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":124,"nodeType":"ExpressionStatement","src":"1346:34:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":126,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1403:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":127,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1403:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":128,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1415:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"value","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1415:9:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":125,"name":"Deposit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":91,"src":"1395:7:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":130,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1395:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":131,"nodeType":"EmitStatement","src":"1390:35:1"}]},"documentation":null,"id":133,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"deposit","nodeType":"FunctionDefinition","parameters":{"id":115,"nodeType":"ParameterList","parameters":[],"src":"1318:2:1"},"payable":true,"returnParameters":{"id":116,"nodeType":"ParameterList","parameters":[],"src":"1336:0:1"},"scope":304,"src":"1302:130:1","stateMutability":"payable","superFunction":null,"visibility":"public"},{"body":{"id":168,"nodeType":"Block","src":"1472:168:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":144,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":139,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1490:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":142,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":140,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1500:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":141,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1500:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1490:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":143,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1515:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1490:28:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":138,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"1482:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":145,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1482:37:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":146,"nodeType":"ExpressionStatement","src":"1482:37:1"},{"expression":{"argumentTypes":null,"id":152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":147,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1529:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":150,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":148,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1539:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1539:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1529:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":151,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1554:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1529:28:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":153,"nodeType":"ExpressionStatement","src":"1529:28:1"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":159,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1587:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":154,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1567:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1567:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":158,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1567:19:1","typeDescriptions":{"typeIdentifier":"t_function_transfer_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":160,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1567:24:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":161,"nodeType":"ExpressionStatement","src":"1567:24:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":163,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1617:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1617:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":165,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1629:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":162,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":97,"src":"1606:10:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1606:27:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":167,"nodeType":"EmitStatement","src":"1601:32:1"}]},"documentation":null,"id":169,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":136,"nodeType":"ParameterList","parameters":[{"constant":false,"id":135,"name":"wad","nodeType":"VariableDeclaration","scope":169,"src":"1455:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":134,"name":"uint","nodeType":"ElementaryTypeName","src":"1455:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1454:10:1"},"payable":false,"returnParameters":{"id":137,"nodeType":"ParameterList","parameters":[],"src":"1472:0:1"},"scope":304,"src":"1437:203:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":179,"nodeType":"Block","src":"1696:45:1","statements":[{"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":175,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":441,"src":"1721:4:1","typeDescriptions":{"typeIdentifier":"t_contract$_WETH9_$304","typeString":"contract WETH9"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_WETH9_$304","typeString":"contract WETH9"}],"id":174,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1713:7:1","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":176,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1713:13:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":177,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balance","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1713:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":173,"id":178,"nodeType":"Return","src":"1706:28:1"}]},"documentation":null,"id":180,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"totalSupply","nodeType":"FunctionDefinition","parameters":{"id":170,"nodeType":"ParameterList","parameters":[],"src":"1666:2:1"},"payable":false,"returnParameters":{"id":173,"nodeType":"ParameterList","parameters":[{"constant":false,"id":172,"name":"","nodeType":"VariableDeclaration","scope":180,"src":"1690:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":171,"name":"uint","nodeType":"ElementaryTypeName","src":"1690:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1689:6:1"},"scope":304,"src":"1646:95:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":207,"nodeType":"Block","src":"1809:115:1","statements":[{"expression":{"argumentTypes":null,"id":196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":189,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"1819:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":193,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":190,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1829:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":191,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1829:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1819:21:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":194,"indexExpression":{"argumentTypes":null,"id":192,"name":"guy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"1841:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1819:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":195,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1848:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1819:32:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":197,"nodeType":"ExpressionStatement","src":"1819:32:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":199,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1875:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1875:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":201,"name":"guy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"1887:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":202,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1892:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":198,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":77,"src":"1866:8:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":203,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1866:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":204,"nodeType":"EmitStatement","src":"1861:35:1"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":205,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1913:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":188,"id":206,"nodeType":"Return","src":"1906:11:1"}]},"documentation":null,"id":208,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":185,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"name":"guy","nodeType":"VariableDeclaration","scope":208,"src":"1764:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":181,"name":"address","nodeType":"ElementaryTypeName","src":"1764:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":184,"name":"wad","nodeType":"VariableDeclaration","scope":208,"src":"1777:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":183,"name":"uint","nodeType":"ElementaryTypeName","src":"1777:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1763:23:1"},"payable":false,"returnParameters":{"id":188,"nodeType":"ParameterList","parameters":[{"constant":false,"id":187,"name":"","nodeType":"VariableDeclaration","scope":208,"src":"1803:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":186,"name":"bool","nodeType":"ElementaryTypeName","src":"1803:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1802:6:1"},"scope":304,"src":"1747:177:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":224,"nodeType":"Block","src":"1993:58:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":218,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2023:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":219,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2023:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":220,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":210,"src":"2035:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":221,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":212,"src":"2040:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":217,"name":"transferFrom","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":303,"src":"2010:12:1","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) returns (bool)"}},"id":222,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2010:34:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":216,"id":223,"nodeType":"Return","src":"2003:41:1"}]},"documentation":null,"id":225,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transfer","nodeType":"FunctionDefinition","parameters":{"id":213,"nodeType":"ParameterList","parameters":[{"constant":false,"id":210,"name":"dst","nodeType":"VariableDeclaration","scope":225,"src":"1948:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":209,"name":"address","nodeType":"ElementaryTypeName","src":"1948:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":212,"name":"wad","nodeType":"VariableDeclaration","scope":225,"src":"1961:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":211,"name":"uint","nodeType":"ElementaryTypeName","src":"1961:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1947:23:1"},"payable":false,"returnParameters":{"id":216,"nodeType":"ParameterList","parameters":[{"constant":false,"id":215,"name":"","nodeType":"VariableDeclaration","scope":225,"src":"1987:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":214,"name":"bool","nodeType":"ElementaryTypeName","src":"1987:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1986:6:1"},"scope":304,"src":"1930:121:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":302,"nodeType":"Block","src":"2157:360:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":237,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2175:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":239,"indexExpression":{"argumentTypes":null,"id":238,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2185:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2175:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":240,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2193:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2175:21:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"2167:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":242,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2167:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":243,"nodeType":"ExpressionStatement","src":"2167:30:1"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":259,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":247,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":244,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2212:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":245,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2219:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2219:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2212:17:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":248,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2233:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":250,"indexExpression":{"argumentTypes":null,"id":249,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2243:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2233:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":253,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":251,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2248:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":252,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2248:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2233:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":256,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"2268:2:1","subExpression":{"argumentTypes":null,"hexValue":"31","id":255,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2269:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}],"id":254,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2263:4:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2263:8:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2233:38:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2212:59:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":281,"nodeType":"IfStatement","src":"2208:179:1","trueBody":{"id":280,"nodeType":"Block","src":"2273:114:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":261,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2295:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":263,"indexExpression":{"argumentTypes":null,"id":262,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2305:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2295:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":266,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":264,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2310:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":265,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2310:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2295:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":267,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2325:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2295:33:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":260,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"2287:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2287:42:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":270,"nodeType":"ExpressionStatement","src":"2287:42:1"},{"expression":{"argumentTypes":null,"id":278,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":271,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2343:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":275,"indexExpression":{"argumentTypes":null,"id":272,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2353:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2343:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":276,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":273,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2358:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":274,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2358:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2343:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":277,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2373:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2343:33:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":279,"nodeType":"ExpressionStatement","src":"2343:33:1"}]}},{"expression":{"argumentTypes":null,"id":286,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":282,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2397:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":284,"indexExpression":{"argumentTypes":null,"id":283,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2407:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2397:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":285,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2415:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2397:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":287,"nodeType":"ExpressionStatement","src":"2397:21:1"},{"expression":{"argumentTypes":null,"id":292,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":288,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2428:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":290,"indexExpression":{"argumentTypes":null,"id":289,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":229,"src":"2438:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2428:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"id":291,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2446:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2428:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":293,"nodeType":"ExpressionStatement","src":"2428:21:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":295,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2474:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":296,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":229,"src":"2479:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":297,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2484:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":294,"name":"Transfer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"2465:8:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2465:23:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":299,"nodeType":"EmitStatement","src":"2460:28:1"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":300,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2506:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":235,"id":301,"nodeType":"Return","src":"2499:11:1"}]},"documentation":null,"id":303,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":232,"nodeType":"ParameterList","parameters":[{"constant":false,"id":227,"name":"src","nodeType":"VariableDeclaration","scope":303,"src":"2079:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":226,"name":"address","nodeType":"ElementaryTypeName","src":"2079:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":229,"name":"dst","nodeType":"VariableDeclaration","scope":303,"src":"2092:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":228,"name":"address","nodeType":"ElementaryTypeName","src":"2092:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":231,"name":"wad","nodeType":"VariableDeclaration","scope":303,"src":"2105:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":230,"name":"uint","nodeType":"ElementaryTypeName","src":"2105:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2078:36:1"},"payable":false,"returnParameters":{"id":235,"nodeType":"ParameterList","parameters":[{"constant":false,"id":234,"name":"","nodeType":"VariableDeclaration","scope":303,"src":"2147:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":233,"name":"bool","nodeType":"ElementaryTypeName","src":"2147:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2146:6:1"},"scope":304,"src":"2057:460:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":305,"src":"712:1807:1"}],"src":"686:36989:1"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","transactionHash":"0xb95343413e459a0f97461812111254163ae53467855c0d73e0f1e7c5b8442fa3"},"3":{"address":"0xc778417e063141139fce010982780140aa0cd5ab","transactionHash":"0x19ae7fb1bd96c6f623741f76573a3e97d8a863358dafb1d773a8f9ad98b424b4"},"4":{"address":"0xc778417e063141139fce010982780140aa0cd5ab","transactionHash":"0x7bc8e85f99556aa23a41dd3c107e92ec76f057e4cea39f376ffb1b15d514b11f"},"42":{"address":"0xd0a1e359811322d97991e03f863a0c30c2cf029c","transactionHash":"0x0e8d602b350e2a896134d79b48b8a59488a0a70933d46c5736c47b468877be35"},"437894314312":{"address":"0xcfeb869f69431e42cdb54a4f4f105c19c080a601","transactionHash":"0xbde58e255830705b09f384278a5bd2d3ee2217c43496b07b5150922be2b1459f"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-29T15:25:24.154Z"}; /***/ }), @@ -231,10 +373,21 @@ module.exports = {"contract_name":"EtherToken","abi":[{"constant":true,"inputs": /*!*************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Event.json ***! \*************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"Event","abi":[{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"name":"","type":"address"}],"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":"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"},{"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":"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":false,"inputs":[],"name":"setOutcome","outputs":[],"payable":false,"stateMutability":"nonpayable","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"},{"constant":true,"inputs":[],"name":"getEventHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"redeemWinnings","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"../Tokens/OutcomeToken.sol\";\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.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 OutcomeAssignment(int outcome);\n event WinningsRedemption(address indexed receiver, uint winnings);\n\n /*\n * Storage\n */\n ERC20 public collateralToken;\n Oracle public oracle;\n bool public isOutcomeSet;\n int public outcome;\n OutcomeToken[] public outcomeTokens;\n}\n\n/// @title Event contract - Provide basic functionality required by different event types\n/// @author Stefan George - \ncontract Event is 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(collateralToken.transferFrom(msg.sender, this, collateralTokenCount));\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(collateralToken.transfer(msg.sender, outcomeTokenCount));\n emit OutcomeTokenSetRevocation(msg.sender, outcomeTokenCount);\n }\n\n /// @dev Sets winning event outcome\n function setOutcome()\n public\n {\n // Winning outcome is not set yet in event contract but in oracle contract\n require(!isOutcomeSet && oracle.isOutcomeSet());\n // Set winning outcome\n outcome = oracle.getOutcome();\n isOutcomeSet = true;\n emit OutcomeAssignment(outcome);\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 /// @dev Calculates and returns event hash\n /// @return Event hash\n function getEventHash() public view returns (bytes32);\n\n /// @dev Exchanges sender's winning outcome tokens for collateral tokens\n /// @return Sender's winnings\n function redeemWinnings() public returns (uint);\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","exportedSymbols":{"Event":[384],"EventData":[198]},"id":385,"nodeType":"SourceUnit","nodes":[{"id":154,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:1"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":155,"nodeType":"ImportDirective","scope":385,"sourceUnit":7329,"src":"25:63:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","file":"../Tokens/OutcomeToken.sol","id":156,"nodeType":"ImportDirective","scope":385,"sourceUnit":5675,"src":"89:36:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":157,"nodeType":"ImportDirective","scope":385,"sourceUnit":4718,"src":"126:31:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":158,"nodeType":"ImportDirective","scope":385,"sourceUnit":6702,"src":"158:55:1","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":198,"linearizedBaseContracts":[198],"name":"EventData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":164,"name":"OutcomeTokenCreation","nodeType":"EventDefinition","parameters":{"id":163,"nodeType":"ParameterList","parameters":[{"constant":false,"id":160,"indexed":false,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":164,"src":"299:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":159,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"299:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"},{"constant":false,"id":162,"indexed":false,"name":"index","nodeType":"VariableDeclaration","scope":164,"src":"326:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":161,"name":"uint8","nodeType":"ElementaryTypeName","src":"326:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"298:40:1"},"src":"272:67:1"},{"anonymous":false,"documentation":null,"id":170,"name":"OutcomeTokenSetIssuance","nodeType":"EventDefinition","parameters":{"id":169,"nodeType":"ParameterList","parameters":[{"constant":false,"id":166,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":170,"src":"374:21:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":165,"name":"address","nodeType":"ElementaryTypeName","src":"374:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":168,"indexed":false,"name":"collateralTokenCount","nodeType":"VariableDeclaration","scope":170,"src":"397:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":167,"name":"uint","nodeType":"ElementaryTypeName","src":"397:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"373:50:1"},"src":"344:80:1"},{"anonymous":false,"documentation":null,"id":176,"name":"OutcomeTokenSetRevocation","nodeType":"EventDefinition","parameters":{"id":175,"nodeType":"ParameterList","parameters":[{"constant":false,"id":172,"indexed":true,"name":"seller","nodeType":"VariableDeclaration","scope":176,"src":"461:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":171,"name":"address","nodeType":"ElementaryTypeName","src":"461:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":174,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":176,"src":"485:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":173,"name":"uint","nodeType":"ElementaryTypeName","src":"485:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"460:48:1"},"src":"429:80:1"},{"anonymous":false,"documentation":null,"id":180,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":179,"nodeType":"ParameterList","parameters":[{"constant":false,"id":178,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":180,"src":"538:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":177,"name":"int","nodeType":"ElementaryTypeName","src":"538:3:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"537:13:1"},"src":"514:37:1"},{"anonymous":false,"documentation":null,"id":186,"name":"WinningsRedemption","nodeType":"EventDefinition","parameters":{"id":185,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":186,"src":"581:24:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":181,"name":"address","nodeType":"ElementaryTypeName","src":"581:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":184,"indexed":false,"name":"winnings","nodeType":"VariableDeclaration","scope":186,"src":"607:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":183,"name":"uint","nodeType":"ElementaryTypeName","src":"607:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"580:41:1"},"src":"556:66:1"},{"constant":false,"id":188,"name":"collateralToken","nodeType":"VariableDeclaration","scope":198,"src":"659:28:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":187,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"659:5:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":190,"name":"oracle","nodeType":"VariableDeclaration","scope":198,"src":"693:20:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":189,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"693:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":192,"name":"isOutcomeSet","nodeType":"VariableDeclaration","scope":198,"src":"719:24:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":191,"name":"bool","nodeType":"ElementaryTypeName","src":"719:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":194,"name":"outcome","nodeType":"VariableDeclaration","scope":198,"src":"749:18:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":193,"name":"int","nodeType":"ElementaryTypeName","src":"749:3:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":197,"name":"outcomeTokens","nodeType":"VariableDeclaration","scope":198,"src":"773:35:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[]"},"typeName":{"baseType":{"contractScope":null,"id":195,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"773:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":196,"length":null,"nodeType":"ArrayTypeName","src":"773:14:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage_ptr","typeString":"contract OutcomeToken[]"}},"value":null,"visibility":"public"}],"scope":385,"src":"216:595:1"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":199,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"968:9:1","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":200,"nodeType":"InheritanceSpecifier","src":"968:9:1"}],"contractDependencies":[198],"contractKind":"contract","documentation":"@title Event contract - Provide basic functionality required by different event types\n @author Stefan George - ","fullyImplemented":false,"id":384,"linearizedBaseContracts":[384,198],"name":"Event","nodeType":"ContractDefinition","nodes":[{"body":{"id":242,"nodeType":"Block","src":"1277:396:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":208,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1381:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1381:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":210,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7657,"src":"1393:4:1","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":211,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1399:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":206,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1352:15:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":207,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1352:28:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":212,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1352:68:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":205,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1344:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":213,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1344:77:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":214,"nodeType":"ExpressionStatement","src":"1344:77:1"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":230,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1561:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1561:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":232,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1573:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":226,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1538:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":228,"indexExpression":{"argumentTypes":null,"id":227,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1552:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1538:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":229,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"issue","nodeType":"MemberAccess","referencedDeclaration":5640,"src":"1538:22:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":233,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1538:56:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":234,"nodeType":"ExpressionStatement","src":"1538:56:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":222,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":219,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1495:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":220,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1499:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":221,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1499:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1495:24:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":235,"initializationExpression":{"assignments":[216],"declarations":[{"constant":false,"id":216,"name":"i","nodeType":"VariableDeclaration","scope":243,"src":"1482:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":215,"name":"uint8","nodeType":"ElementaryTypeName","src":"1482:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":218,"initialValue":{"argumentTypes":null,"hexValue":"30","id":217,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1492:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1482:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1521:3:1","subExpression":{"argumentTypes":null,"id":223,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1521:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":225,"nodeType":"ExpressionStatement","src":"1521:3:1"},"nodeType":"ForStatement","src":"1477:117:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":237,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1633:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":238,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1633:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":239,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1645:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":236,"name":"OutcomeTokenSetIssuance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":170,"src":"1609:23:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1609:57:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":241,"nodeType":"EmitStatement","src":"1604:62:1"}]},"documentation":"@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","id":243,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buyAllOutcomes","nodeType":"FunctionDefinition","parameters":{"id":203,"nodeType":"ParameterList","parameters":[{"constant":false,"id":202,"name":"collateralTokenCount","nodeType":"VariableDeclaration","scope":243,"src":"1231:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":201,"name":"uint","nodeType":"ElementaryTypeName","src":"1231:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1230:27:1"},"payable":false,"returnParameters":{"id":204,"nodeType":"ParameterList","parameters":[],"src":"1277:0:1"},"scope":384,"src":"1207:466:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":284,"nodeType":"Block","src":"1924:383:1","statements":[{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":263,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2077:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2077:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":265,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2089:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":259,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2053:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":261,"indexExpression":{"argumentTypes":null,"id":260,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2067:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2053:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"2053:23:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2053:54:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":267,"nodeType":"ExpressionStatement","src":"2053:54:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":255,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":252,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2010:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":253,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2014:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":254,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2014:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2010:24:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":268,"initializationExpression":{"assignments":[249],"declarations":[{"constant":false,"id":249,"name":"i","nodeType":"VariableDeclaration","scope":285,"src":"1997:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":248,"name":"uint8","nodeType":"ElementaryTypeName","src":"1997:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":251,"initialValue":{"argumentTypes":null,"hexValue":"30","id":250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2007:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1997:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2036:3:1","subExpression":{"argumentTypes":null,"id":256,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2036:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":258,"nodeType":"ExpressionStatement","src":"2036:3:1"},"nodeType":"ForStatement","src":"1992:115:1"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":272,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2198:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":273,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2198:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":274,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2210:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":270,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2173:15:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":271,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"2173:24:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":275,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2173:55:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":269,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2165:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2165:64:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":277,"nodeType":"ExpressionStatement","src":"2165:64:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":279,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2270:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2270:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":281,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2282:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":278,"name":"OutcomeTokenSetRevocation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":176,"src":"2244:25:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":282,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2244:56:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":283,"nodeType":"EmitStatement","src":"2239:61:1"}]},"documentation":"@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","id":285,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sellAllOutcomes","nodeType":"FunctionDefinition","parameters":{"id":246,"nodeType":"ParameterList","parameters":[{"constant":false,"id":245,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":285,"src":"1881:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":244,"name":"uint","nodeType":"ElementaryTypeName","src":"1881:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1880:24:1"},"payable":false,"returnParameters":{"id":247,"nodeType":"ParameterList","parameters":[],"src":"1924:0:1"},"scope":384,"src":"1856:451:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":311,"nodeType":"Block","src":"2394:287:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:13:1","subExpression":{"argumentTypes":null,"id":289,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2496:12:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":291,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2512:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":292,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"2512:19:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":293,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2512:21:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:38:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":288,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2487:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":295,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2487:47:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":296,"nodeType":"ExpressionStatement","src":"2487:47:1"},{"expression":{"argumentTypes":null,"id":301,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":297,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2575:7:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":298,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2585:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"2585:17:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":300,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2585:19:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2575:29:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":302,"nodeType":"ExpressionStatement","src":"2575:29:1"},{"expression":{"argumentTypes":null,"id":305,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":303,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2614:12:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":304,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2629:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2614:19:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":306,"nodeType":"ExpressionStatement","src":"2614:19:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":308,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2666:7:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":307,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":180,"src":"2648:17:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":309,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2648:26:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":310,"nodeType":"EmitStatement","src":"2643:31:1"}]},"documentation":"@dev Sets winning event outcome","id":312,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":286,"nodeType":"ParameterList","parameters":[],"src":"2372:2:1"},"payable":false,"returnParameters":{"id":287,"nodeType":"ParameterList","parameters":[],"src":"2394:0:1"},"scope":384,"src":"2353:328:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":322,"nodeType":"Block","src":"2835:51:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":318,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2858:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":319,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2858:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":317,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2852:5:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint8_$","typeString":"type(uint8)"},"typeName":"uint8"},"id":320,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2852:27:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"functionReturnParameters":316,"id":321,"nodeType":"Return","src":"2845:34:1"}]},"documentation":"@dev Returns outcome count\n @return Outcome count","id":323,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeCount","nodeType":"FunctionDefinition","parameters":{"id":313,"nodeType":"ParameterList","parameters":[],"src":"2776:2:1"},"payable":false,"returnParameters":{"id":316,"nodeType":"ParameterList","parameters":[{"constant":false,"id":315,"name":"","nodeType":"VariableDeclaration","scope":323,"src":"2824:5:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":314,"name":"uint8","nodeType":"ElementaryTypeName","src":"2824:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"2823:7:1"},"scope":384,"src":"2752:134:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":331,"nodeType":"Block","src":"3058:37:1","statements":[{"expression":{"argumentTypes":null,"id":329,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3075:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"functionReturnParameters":328,"id":330,"nodeType":"Return","src":"3068:20:1"}]},"documentation":"@dev Returns outcome tokens array\n @return Outcome tokens","id":332,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeTokens","nodeType":"FunctionDefinition","parameters":{"id":324,"nodeType":"ParameterList","parameters":[],"src":"2990:2:1"},"payable":false,"returnParameters":{"id":328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":327,"name":"","nodeType":"VariableDeclaration","scope":332,"src":"3038:14:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_memory_ptr","typeString":"contract OutcomeToken[]"},"typeName":{"baseType":{"contractScope":null,"id":325,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"3038:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":326,"length":null,"nodeType":"ArrayTypeName","src":"3038:14:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage_ptr","typeString":"contract OutcomeToken[]"}},"value":null,"visibility":"internal"}],"src":"3037:16:1"},"scope":384,"src":"2965:130:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":372,"nodeType":"Block","src":"3342:221:1","statements":[{"expression":{"argumentTypes":null,"id":347,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":340,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3352:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":344,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3390:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":345,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3390:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":343,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3379:10:1","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":341,"name":"uint","nodeType":"ElementaryTypeName","src":"3383:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":342,"length":null,"nodeType":"ArrayTypeName","src":"3383:6:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":346,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3379:32:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"src":"3352:59:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":348,"nodeType":"ExpressionStatement","src":"3352:59:1"},{"body":{"expression":{"argumentTypes":null,"id":369,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":360,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3493:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":362,"indexExpression":{"argumentTypes":null,"id":361,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3518:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3493:27:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":367,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":334,"src":"3550:5:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":363,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3523:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":365,"indexExpression":{"argumentTypes":null,"id":364,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3537:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3523:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":366,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"3523:26:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3523:33:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3493:63:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":370,"nodeType":"ExpressionStatement","src":"3493:63:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":356,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":353,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3439:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":354,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3443:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":355,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3443:31:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:35:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":371,"initializationExpression":{"assignments":[350],"declarations":[{"constant":false,"id":350,"name":"i","nodeType":"VariableDeclaration","scope":373,"src":"3426:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":349,"name":"uint8","nodeType":"ElementaryTypeName","src":"3426:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":352,"initialValue":{"argumentTypes":null,"hexValue":"30","id":351,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3436:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3426:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":358,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3476:3:1","subExpression":{"argumentTypes":null,"id":357,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3476:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":359,"nodeType":"ExpressionStatement","src":"3476:3:1"},"nodeType":"ForStatement","src":"3421:135:1"}]},"documentation":"@dev Returns the amount of outcome tokens held by owner\n @return Outcome token distribution","id":373,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeTokenDistribution","nodeType":"FunctionDefinition","parameters":{"id":335,"nodeType":"ParameterList","parameters":[{"constant":false,"id":334,"name":"owner","nodeType":"VariableDeclaration","scope":373,"src":"3245:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":333,"name":"address","nodeType":"ElementaryTypeName","src":"3245:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"3244:15:1"},"payable":false,"returnParameters":{"id":339,"nodeType":"ParameterList","parameters":[{"constant":false,"id":338,"name":"outcomeTokenDistribution","nodeType":"VariableDeclaration","scope":373,"src":"3305:31:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":336,"name":"uint","nodeType":"ElementaryTypeName","src":"3305:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":337,"length":null,"nodeType":"ArrayTypeName","src":"3305:6:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"src":"3304:33:1"},"scope":384,"src":"3208:355:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":378,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":374,"nodeType":"ParameterList","parameters":[],"src":"3664:2:1"},"payable":false,"returnParameters":{"id":377,"nodeType":"ParameterList","parameters":[{"constant":false,"id":376,"name":"","nodeType":"VariableDeclaration","scope":378,"src":"3688:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":375,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3688:7:1","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3687:9:1"},"scope":384,"src":"3643:54:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":383,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":379,"nodeType":"ParameterList","parameters":[],"src":"3837:2:1"},"payable":false,"returnParameters":{"id":382,"nodeType":"ParameterList","parameters":[{"constant":false,"id":381,"name":"","nodeType":"VariableDeclaration","scope":383,"src":"3856:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":380,"name":"uint","nodeType":"ElementaryTypeName","src":"3856:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3855:6:1"},"scope":384,"src":"3814:48:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":385,"src":"950:2914:1"}],"src":"0:3865:1"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","exportedSymbols":{"Event":[384],"EventData":[198]},"id":385,"nodeType":"SourceUnit","nodes":[{"id":154,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:1"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":155,"nodeType":"ImportDirective","scope":385,"sourceUnit":7329,"src":"25:63:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","file":"../Tokens/OutcomeToken.sol","id":156,"nodeType":"ImportDirective","scope":385,"sourceUnit":5675,"src":"89:36:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":157,"nodeType":"ImportDirective","scope":385,"sourceUnit":4718,"src":"126:31:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":158,"nodeType":"ImportDirective","scope":385,"sourceUnit":6702,"src":"158:55:1","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":198,"linearizedBaseContracts":[198],"name":"EventData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":164,"name":"OutcomeTokenCreation","nodeType":"EventDefinition","parameters":{"id":163,"nodeType":"ParameterList","parameters":[{"constant":false,"id":160,"indexed":false,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":164,"src":"299:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":159,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"299:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"},{"constant":false,"id":162,"indexed":false,"name":"index","nodeType":"VariableDeclaration","scope":164,"src":"326:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":161,"name":"uint8","nodeType":"ElementaryTypeName","src":"326:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"298:40:1"},"src":"272:67:1"},{"anonymous":false,"documentation":null,"id":170,"name":"OutcomeTokenSetIssuance","nodeType":"EventDefinition","parameters":{"id":169,"nodeType":"ParameterList","parameters":[{"constant":false,"id":166,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":170,"src":"374:21:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":165,"name":"address","nodeType":"ElementaryTypeName","src":"374:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":168,"indexed":false,"name":"collateralTokenCount","nodeType":"VariableDeclaration","scope":170,"src":"397:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":167,"name":"uint","nodeType":"ElementaryTypeName","src":"397:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"373:50:1"},"src":"344:80:1"},{"anonymous":false,"documentation":null,"id":176,"name":"OutcomeTokenSetRevocation","nodeType":"EventDefinition","parameters":{"id":175,"nodeType":"ParameterList","parameters":[{"constant":false,"id":172,"indexed":true,"name":"seller","nodeType":"VariableDeclaration","scope":176,"src":"461:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":171,"name":"address","nodeType":"ElementaryTypeName","src":"461:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":174,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":176,"src":"485:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":173,"name":"uint","nodeType":"ElementaryTypeName","src":"485:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"460:48:1"},"src":"429:80:1"},{"anonymous":false,"documentation":null,"id":180,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":179,"nodeType":"ParameterList","parameters":[{"constant":false,"id":178,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":180,"src":"538:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":177,"name":"int","nodeType":"ElementaryTypeName","src":"538:3:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"537:13:1"},"src":"514:37:1"},{"anonymous":false,"documentation":null,"id":186,"name":"WinningsRedemption","nodeType":"EventDefinition","parameters":{"id":185,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":186,"src":"581:24:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":181,"name":"address","nodeType":"ElementaryTypeName","src":"581:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":184,"indexed":false,"name":"winnings","nodeType":"VariableDeclaration","scope":186,"src":"607:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":183,"name":"uint","nodeType":"ElementaryTypeName","src":"607:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"580:41:1"},"src":"556:66:1"},{"constant":false,"id":188,"name":"collateralToken","nodeType":"VariableDeclaration","scope":198,"src":"659:28:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":187,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"659:5:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":190,"name":"oracle","nodeType":"VariableDeclaration","scope":198,"src":"693:20:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":189,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"693:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":192,"name":"isOutcomeSet","nodeType":"VariableDeclaration","scope":198,"src":"719:24:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":191,"name":"bool","nodeType":"ElementaryTypeName","src":"719:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":194,"name":"outcome","nodeType":"VariableDeclaration","scope":198,"src":"749:18:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":193,"name":"int","nodeType":"ElementaryTypeName","src":"749:3:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":197,"name":"outcomeTokens","nodeType":"VariableDeclaration","scope":198,"src":"773:35:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[]"},"typeName":{"baseType":{"contractScope":null,"id":195,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"773:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":196,"length":null,"nodeType":"ArrayTypeName","src":"773:14:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage_ptr","typeString":"contract OutcomeToken[]"}},"value":null,"visibility":"public"}],"scope":385,"src":"216:595:1"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":199,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"968:9:1","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":200,"nodeType":"InheritanceSpecifier","src":"968:9:1"}],"contractDependencies":[198],"contractKind":"contract","documentation":"@title Event contract - Provide basic functionality required by different event types\n @author Stefan George - ","fullyImplemented":false,"id":384,"linearizedBaseContracts":[384,198],"name":"Event","nodeType":"ContractDefinition","nodes":[{"body":{"id":242,"nodeType":"Block","src":"1277:396:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":208,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1381:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1381:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":210,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7657,"src":"1393:4:1","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":211,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1399:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":206,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1352:15:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":207,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1352:28:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":212,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1352:68:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":205,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1344:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":213,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1344:77:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":214,"nodeType":"ExpressionStatement","src":"1344:77:1"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":230,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1561:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1561:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":232,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1573:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":226,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1538:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":228,"indexExpression":{"argumentTypes":null,"id":227,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1552:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1538:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":229,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"issue","nodeType":"MemberAccess","referencedDeclaration":5640,"src":"1538:22:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":233,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1538:56:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":234,"nodeType":"ExpressionStatement","src":"1538:56:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":222,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":219,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1495:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":220,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1499:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":221,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1499:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1495:24:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":235,"initializationExpression":{"assignments":[216],"declarations":[{"constant":false,"id":216,"name":"i","nodeType":"VariableDeclaration","scope":243,"src":"1482:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":215,"name":"uint8","nodeType":"ElementaryTypeName","src":"1482:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":218,"initialValue":{"argumentTypes":null,"hexValue":"30","id":217,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1492:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1482:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1521:3:1","subExpression":{"argumentTypes":null,"id":223,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1521:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":225,"nodeType":"ExpressionStatement","src":"1521:3:1"},"nodeType":"ForStatement","src":"1477:117:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":237,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1633:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":238,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1633:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":239,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1645:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":236,"name":"OutcomeTokenSetIssuance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":170,"src":"1609:23:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1609:57:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":241,"nodeType":"EmitStatement","src":"1604:62:1"}]},"documentation":"@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","id":243,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buyAllOutcomes","nodeType":"FunctionDefinition","parameters":{"id":203,"nodeType":"ParameterList","parameters":[{"constant":false,"id":202,"name":"collateralTokenCount","nodeType":"VariableDeclaration","scope":243,"src":"1231:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":201,"name":"uint","nodeType":"ElementaryTypeName","src":"1231:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1230:27:1"},"payable":false,"returnParameters":{"id":204,"nodeType":"ParameterList","parameters":[],"src":"1277:0:1"},"scope":384,"src":"1207:466:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":284,"nodeType":"Block","src":"1924:383:1","statements":[{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":263,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2077:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2077:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":265,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2089:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":259,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2053:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":261,"indexExpression":{"argumentTypes":null,"id":260,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2067:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2053:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"2053:23:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2053:54:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":267,"nodeType":"ExpressionStatement","src":"2053:54:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":255,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":252,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2010:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":253,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2014:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":254,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2014:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2010:24:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":268,"initializationExpression":{"assignments":[249],"declarations":[{"constant":false,"id":249,"name":"i","nodeType":"VariableDeclaration","scope":285,"src":"1997:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":248,"name":"uint8","nodeType":"ElementaryTypeName","src":"1997:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":251,"initialValue":{"argumentTypes":null,"hexValue":"30","id":250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2007:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1997:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2036:3:1","subExpression":{"argumentTypes":null,"id":256,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2036:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":258,"nodeType":"ExpressionStatement","src":"2036:3:1"},"nodeType":"ForStatement","src":"1992:115:1"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":272,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2198:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":273,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2198:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":274,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2210:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":270,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2173:15:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":271,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"2173:24:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":275,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2173:55:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":269,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2165:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2165:64:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":277,"nodeType":"ExpressionStatement","src":"2165:64:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":279,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2270:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2270:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":281,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2282:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":278,"name":"OutcomeTokenSetRevocation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":176,"src":"2244:25:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":282,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2244:56:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":283,"nodeType":"EmitStatement","src":"2239:61:1"}]},"documentation":"@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","id":285,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sellAllOutcomes","nodeType":"FunctionDefinition","parameters":{"id":246,"nodeType":"ParameterList","parameters":[{"constant":false,"id":245,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":285,"src":"1881:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":244,"name":"uint","nodeType":"ElementaryTypeName","src":"1881:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1880:24:1"},"payable":false,"returnParameters":{"id":247,"nodeType":"ParameterList","parameters":[],"src":"1924:0:1"},"scope":384,"src":"1856:451:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":311,"nodeType":"Block","src":"2394:287:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:13:1","subExpression":{"argumentTypes":null,"id":289,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2496:12:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":291,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2512:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":292,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"2512:19:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":293,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2512:21:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:38:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":288,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2487:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":295,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2487:47:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":296,"nodeType":"ExpressionStatement","src":"2487:47:1"},{"expression":{"argumentTypes":null,"id":301,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":297,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2575:7:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":298,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2585:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"2585:17:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":300,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2585:19:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2575:29:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":302,"nodeType":"ExpressionStatement","src":"2575:29:1"},{"expression":{"argumentTypes":null,"id":305,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":303,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2614:12:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":304,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2629:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2614:19:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":306,"nodeType":"ExpressionStatement","src":"2614:19:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":308,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2666:7:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":307,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":180,"src":"2648:17:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":309,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2648:26:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":310,"nodeType":"EmitStatement","src":"2643:31:1"}]},"documentation":"@dev Sets winning event outcome","id":312,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":286,"nodeType":"ParameterList","parameters":[],"src":"2372:2:1"},"payable":false,"returnParameters":{"id":287,"nodeType":"ParameterList","parameters":[],"src":"2394:0:1"},"scope":384,"src":"2353:328:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":322,"nodeType":"Block","src":"2835:51:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":318,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2858:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":319,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2858:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":317,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2852:5:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint8_$","typeString":"type(uint8)"},"typeName":"uint8"},"id":320,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2852:27:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"functionReturnParameters":316,"id":321,"nodeType":"Return","src":"2845:34:1"}]},"documentation":"@dev Returns outcome count\n @return Outcome count","id":323,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeCount","nodeType":"FunctionDefinition","parameters":{"id":313,"nodeType":"ParameterList","parameters":[],"src":"2776:2:1"},"payable":false,"returnParameters":{"id":316,"nodeType":"ParameterList","parameters":[{"constant":false,"id":315,"name":"","nodeType":"VariableDeclaration","scope":323,"src":"2824:5:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":314,"name":"uint8","nodeType":"ElementaryTypeName","src":"2824:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"2823:7:1"},"scope":384,"src":"2752:134:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":331,"nodeType":"Block","src":"3058:37:1","statements":[{"expression":{"argumentTypes":null,"id":329,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3075:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"functionReturnParameters":328,"id":330,"nodeType":"Return","src":"3068:20:1"}]},"documentation":"@dev Returns outcome tokens array\n @return Outcome tokens","id":332,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeTokens","nodeType":"FunctionDefinition","parameters":{"id":324,"nodeType":"ParameterList","parameters":[],"src":"2990:2:1"},"payable":false,"returnParameters":{"id":328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":327,"name":"","nodeType":"VariableDeclaration","scope":332,"src":"3038:14:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_memory_ptr","typeString":"contract OutcomeToken[]"},"typeName":{"baseType":{"contractScope":null,"id":325,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"3038:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":326,"length":null,"nodeType":"ArrayTypeName","src":"3038:14:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage_ptr","typeString":"contract OutcomeToken[]"}},"value":null,"visibility":"internal"}],"src":"3037:16:1"},"scope":384,"src":"2965:130:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":372,"nodeType":"Block","src":"3342:221:1","statements":[{"expression":{"argumentTypes":null,"id":347,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":340,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3352:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":344,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3390:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":345,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3390:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":343,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3379:10:1","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":341,"name":"uint","nodeType":"ElementaryTypeName","src":"3383:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":342,"length":null,"nodeType":"ArrayTypeName","src":"3383:6:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":346,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3379:32:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"src":"3352:59:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":348,"nodeType":"ExpressionStatement","src":"3352:59:1"},{"body":{"expression":{"argumentTypes":null,"id":369,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":360,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3493:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":362,"indexExpression":{"argumentTypes":null,"id":361,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3518:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3493:27:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":367,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":334,"src":"3550:5:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":363,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3523:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":365,"indexExpression":{"argumentTypes":null,"id":364,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3537:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3523:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":366,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"3523:26:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3523:33:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3493:63:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":370,"nodeType":"ExpressionStatement","src":"3493:63:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":356,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":353,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3439:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":354,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3443:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":355,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3443:31:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:35:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":371,"initializationExpression":{"assignments":[350],"declarations":[{"constant":false,"id":350,"name":"i","nodeType":"VariableDeclaration","scope":373,"src":"3426:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":349,"name":"uint8","nodeType":"ElementaryTypeName","src":"3426:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":352,"initialValue":{"argumentTypes":null,"hexValue":"30","id":351,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3436:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3426:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":358,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3476:3:1","subExpression":{"argumentTypes":null,"id":357,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3476:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":359,"nodeType":"ExpressionStatement","src":"3476:3:1"},"nodeType":"ForStatement","src":"3421:135:1"}]},"documentation":"@dev Returns the amount of outcome tokens held by owner\n @return Outcome token distribution","id":373,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeTokenDistribution","nodeType":"FunctionDefinition","parameters":{"id":335,"nodeType":"ParameterList","parameters":[{"constant":false,"id":334,"name":"owner","nodeType":"VariableDeclaration","scope":373,"src":"3245:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":333,"name":"address","nodeType":"ElementaryTypeName","src":"3245:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"3244:15:1"},"payable":false,"returnParameters":{"id":339,"nodeType":"ParameterList","parameters":[{"constant":false,"id":338,"name":"outcomeTokenDistribution","nodeType":"VariableDeclaration","scope":373,"src":"3305:31:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":336,"name":"uint","nodeType":"ElementaryTypeName","src":"3305:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":337,"length":null,"nodeType":"ArrayTypeName","src":"3305:6:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"src":"3304:33:1"},"scope":384,"src":"3208:355:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":378,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":374,"nodeType":"ParameterList","parameters":[],"src":"3664:2:1"},"payable":false,"returnParameters":{"id":377,"nodeType":"ParameterList","parameters":[{"constant":false,"id":376,"name":"","nodeType":"VariableDeclaration","scope":378,"src":"3688:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":375,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3688:7:1","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3687:9:1"},"scope":384,"src":"3643:54:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":383,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":379,"nodeType":"ParameterList","parameters":[],"src":"3837:2:1"},"payable":false,"returnParameters":{"id":382,"nodeType":"ParameterList","parameters":[{"constant":false,"id":381,"name":"","nodeType":"VariableDeclaration","scope":383,"src":"3856:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":380,"name":"uint","nodeType":"ElementaryTypeName","src":"3856:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3855:6:1"},"scope":384,"src":"3814:48:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":385,"src":"950:2914:1"}],"src":"0:3865:1"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.982Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/EventData.json": +/*!*****************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/EventData.json ***! + \*****************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"Event","abi":[{"constant":false,"inputs":[],"name":"setOutcome","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"collateralTokenCount","type":"uint256"}],"name":"buyAllOutcomes","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"getOutcomeTokenDistribution","outputs":[{"name":"outcomeTokenDistribution","type":"uint256[]"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenCount","type":"uint256"}],"name":"sellAllOutcomes","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcomeCount","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"outcomeTokens","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"redeemWinnings","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"collateralToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getEventHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcomeTokens","outputs":[{"name":"","type":"address[]"}],"payable":false,"type":"function"},{"inputs":[{"name":"_collateralToken","type":"address"},{"name":"_oracle","type":"address"},{"name":"outcomeCount","type":"uint8"}],"payable":false,"type":"constructor"},{"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"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263310}; +module.exports = {"contractName":"EventData","abi":[{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"name":"","type":"address"}],"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":"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"},{"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"}],"bytecode":"0x608060405234801561001057600080fd5b506102b5806100206000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100725780637dc0d1d01461009d5780638abe59ea146100f4578063b2016bd414610161578063ccdf68f3146101b8575b600080fd5b34801561007e57600080fd5b506100876101e7565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010057600080fd5b5061011f60048036038101908080359060200190929190505050610213565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016d57600080fd5b50610176610251565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c457600080fd5b506101cd610276565b604051808215151515815260200191505060405180910390f35b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60038181548110151561022257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160149054906101000a900460ff16815600a165627a7a72305820b3067eb779a1c78e5c5ad1a1bc65b14a1eb12f113ddf174f945efb6703f7a6cf0029","deployedBytecode":"0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100725780637dc0d1d01461009d5780638abe59ea146100f4578063b2016bd414610161578063ccdf68f3146101b8575b600080fd5b34801561007e57600080fd5b506100876101e7565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010057600080fd5b5061011f60048036038101908080359060200190929190505050610213565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016d57600080fd5b50610176610251565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c457600080fd5b506101cd610276565b604051808215151515815260200191505060405180910390f35b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60038181548110151561022257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160149054906101000a900460ff16815600a165627a7a72305820b3067eb779a1c78e5c5ad1a1bc65b14a1eb12f113ddf174f945efb6703f7a6cf0029","sourceMap":"216:595:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;216:595:1;;;;;;;","deployedSourceMap":"216:595:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;749:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;749:18:1;;;;;;;;;;;;;;;;;;;;;;;693:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;693:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;773:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;773:35:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;659:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;659:28:1;;;;;;;;;;;;;;;;;;;;;;;;;;;719:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;719:24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;749:18;;;;:::o;693:20::-;;;;;;;;;;;;;:::o;773:35::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;659:28::-;;;;;;;;;;;;;:::o;719:24::-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"../Tokens/OutcomeToken.sol\";\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.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 OutcomeAssignment(int outcome);\n event WinningsRedemption(address indexed receiver, uint winnings);\n\n /*\n * Storage\n */\n ERC20 public collateralToken;\n Oracle public oracle;\n bool public isOutcomeSet;\n int public outcome;\n OutcomeToken[] public outcomeTokens;\n}\n\n/// @title Event contract - Provide basic functionality required by different event types\n/// @author Stefan George - \ncontract Event is 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(collateralToken.transferFrom(msg.sender, this, collateralTokenCount));\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(collateralToken.transfer(msg.sender, outcomeTokenCount));\n emit OutcomeTokenSetRevocation(msg.sender, outcomeTokenCount);\n }\n\n /// @dev Sets winning event outcome\n function setOutcome()\n public\n {\n // Winning outcome is not set yet in event contract but in oracle contract\n require(!isOutcomeSet && oracle.isOutcomeSet());\n // Set winning outcome\n outcome = oracle.getOutcome();\n isOutcomeSet = true;\n emit OutcomeAssignment(outcome);\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 /// @dev Calculates and returns event hash\n /// @return Event hash\n function getEventHash() public view returns (bytes32);\n\n /// @dev Exchanges sender's winning outcome tokens for collateral tokens\n /// @return Sender's winnings\n function redeemWinnings() public returns (uint);\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","exportedSymbols":{"Event":[384],"EventData":[198]},"id":385,"nodeType":"SourceUnit","nodes":[{"id":154,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:1"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":155,"nodeType":"ImportDirective","scope":385,"sourceUnit":7329,"src":"25:63:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","file":"../Tokens/OutcomeToken.sol","id":156,"nodeType":"ImportDirective","scope":385,"sourceUnit":5675,"src":"89:36:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":157,"nodeType":"ImportDirective","scope":385,"sourceUnit":4718,"src":"126:31:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":158,"nodeType":"ImportDirective","scope":385,"sourceUnit":6702,"src":"158:55:1","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":198,"linearizedBaseContracts":[198],"name":"EventData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":164,"name":"OutcomeTokenCreation","nodeType":"EventDefinition","parameters":{"id":163,"nodeType":"ParameterList","parameters":[{"constant":false,"id":160,"indexed":false,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":164,"src":"299:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":159,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"299:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"},{"constant":false,"id":162,"indexed":false,"name":"index","nodeType":"VariableDeclaration","scope":164,"src":"326:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":161,"name":"uint8","nodeType":"ElementaryTypeName","src":"326:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"298:40:1"},"src":"272:67:1"},{"anonymous":false,"documentation":null,"id":170,"name":"OutcomeTokenSetIssuance","nodeType":"EventDefinition","parameters":{"id":169,"nodeType":"ParameterList","parameters":[{"constant":false,"id":166,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":170,"src":"374:21:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":165,"name":"address","nodeType":"ElementaryTypeName","src":"374:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":168,"indexed":false,"name":"collateralTokenCount","nodeType":"VariableDeclaration","scope":170,"src":"397:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":167,"name":"uint","nodeType":"ElementaryTypeName","src":"397:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"373:50:1"},"src":"344:80:1"},{"anonymous":false,"documentation":null,"id":176,"name":"OutcomeTokenSetRevocation","nodeType":"EventDefinition","parameters":{"id":175,"nodeType":"ParameterList","parameters":[{"constant":false,"id":172,"indexed":true,"name":"seller","nodeType":"VariableDeclaration","scope":176,"src":"461:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":171,"name":"address","nodeType":"ElementaryTypeName","src":"461:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":174,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":176,"src":"485:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":173,"name":"uint","nodeType":"ElementaryTypeName","src":"485:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"460:48:1"},"src":"429:80:1"},{"anonymous":false,"documentation":null,"id":180,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":179,"nodeType":"ParameterList","parameters":[{"constant":false,"id":178,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":180,"src":"538:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":177,"name":"int","nodeType":"ElementaryTypeName","src":"538:3:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"537:13:1"},"src":"514:37:1"},{"anonymous":false,"documentation":null,"id":186,"name":"WinningsRedemption","nodeType":"EventDefinition","parameters":{"id":185,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":186,"src":"581:24:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":181,"name":"address","nodeType":"ElementaryTypeName","src":"581:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":184,"indexed":false,"name":"winnings","nodeType":"VariableDeclaration","scope":186,"src":"607:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":183,"name":"uint","nodeType":"ElementaryTypeName","src":"607:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"580:41:1"},"src":"556:66:1"},{"constant":false,"id":188,"name":"collateralToken","nodeType":"VariableDeclaration","scope":198,"src":"659:28:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":187,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"659:5:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":190,"name":"oracle","nodeType":"VariableDeclaration","scope":198,"src":"693:20:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":189,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"693:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":192,"name":"isOutcomeSet","nodeType":"VariableDeclaration","scope":198,"src":"719:24:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":191,"name":"bool","nodeType":"ElementaryTypeName","src":"719:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":194,"name":"outcome","nodeType":"VariableDeclaration","scope":198,"src":"749:18:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":193,"name":"int","nodeType":"ElementaryTypeName","src":"749:3:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":197,"name":"outcomeTokens","nodeType":"VariableDeclaration","scope":198,"src":"773:35:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[]"},"typeName":{"baseType":{"contractScope":null,"id":195,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"773:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":196,"length":null,"nodeType":"ArrayTypeName","src":"773:14:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage_ptr","typeString":"contract OutcomeToken[]"}},"value":null,"visibility":"public"}],"scope":385,"src":"216:595:1"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":199,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"968:9:1","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":200,"nodeType":"InheritanceSpecifier","src":"968:9:1"}],"contractDependencies":[198],"contractKind":"contract","documentation":"@title Event contract - Provide basic functionality required by different event types\n @author Stefan George - ","fullyImplemented":false,"id":384,"linearizedBaseContracts":[384,198],"name":"Event","nodeType":"ContractDefinition","nodes":[{"body":{"id":242,"nodeType":"Block","src":"1277:396:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":208,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1381:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1381:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":210,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7657,"src":"1393:4:1","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":211,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1399:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":206,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1352:15:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":207,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1352:28:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":212,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1352:68:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":205,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1344:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":213,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1344:77:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":214,"nodeType":"ExpressionStatement","src":"1344:77:1"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":230,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1561:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1561:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":232,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1573:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":226,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1538:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":228,"indexExpression":{"argumentTypes":null,"id":227,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1552:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1538:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":229,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"issue","nodeType":"MemberAccess","referencedDeclaration":5640,"src":"1538:22:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":233,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1538:56:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":234,"nodeType":"ExpressionStatement","src":"1538:56:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":222,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":219,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1495:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":220,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1499:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":221,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1499:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1495:24:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":235,"initializationExpression":{"assignments":[216],"declarations":[{"constant":false,"id":216,"name":"i","nodeType":"VariableDeclaration","scope":243,"src":"1482:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":215,"name":"uint8","nodeType":"ElementaryTypeName","src":"1482:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":218,"initialValue":{"argumentTypes":null,"hexValue":"30","id":217,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1492:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1482:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1521:3:1","subExpression":{"argumentTypes":null,"id":223,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1521:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":225,"nodeType":"ExpressionStatement","src":"1521:3:1"},"nodeType":"ForStatement","src":"1477:117:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":237,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1633:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":238,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1633:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":239,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1645:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":236,"name":"OutcomeTokenSetIssuance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":170,"src":"1609:23:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1609:57:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":241,"nodeType":"EmitStatement","src":"1604:62:1"}]},"documentation":"@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","id":243,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buyAllOutcomes","nodeType":"FunctionDefinition","parameters":{"id":203,"nodeType":"ParameterList","parameters":[{"constant":false,"id":202,"name":"collateralTokenCount","nodeType":"VariableDeclaration","scope":243,"src":"1231:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":201,"name":"uint","nodeType":"ElementaryTypeName","src":"1231:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1230:27:1"},"payable":false,"returnParameters":{"id":204,"nodeType":"ParameterList","parameters":[],"src":"1277:0:1"},"scope":384,"src":"1207:466:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":284,"nodeType":"Block","src":"1924:383:1","statements":[{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":263,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2077:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2077:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":265,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2089:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":259,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2053:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":261,"indexExpression":{"argumentTypes":null,"id":260,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2067:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2053:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"2053:23:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2053:54:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":267,"nodeType":"ExpressionStatement","src":"2053:54:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":255,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":252,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2010:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":253,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2014:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":254,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2014:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2010:24:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":268,"initializationExpression":{"assignments":[249],"declarations":[{"constant":false,"id":249,"name":"i","nodeType":"VariableDeclaration","scope":285,"src":"1997:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":248,"name":"uint8","nodeType":"ElementaryTypeName","src":"1997:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":251,"initialValue":{"argumentTypes":null,"hexValue":"30","id":250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2007:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1997:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2036:3:1","subExpression":{"argumentTypes":null,"id":256,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2036:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":258,"nodeType":"ExpressionStatement","src":"2036:3:1"},"nodeType":"ForStatement","src":"1992:115:1"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":272,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2198:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":273,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2198:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":274,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2210:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":270,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2173:15:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":271,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"2173:24:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":275,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2173:55:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":269,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2165:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2165:64:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":277,"nodeType":"ExpressionStatement","src":"2165:64:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":279,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2270:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2270:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":281,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2282:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":278,"name":"OutcomeTokenSetRevocation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":176,"src":"2244:25:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":282,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2244:56:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":283,"nodeType":"EmitStatement","src":"2239:61:1"}]},"documentation":"@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","id":285,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sellAllOutcomes","nodeType":"FunctionDefinition","parameters":{"id":246,"nodeType":"ParameterList","parameters":[{"constant":false,"id":245,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":285,"src":"1881:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":244,"name":"uint","nodeType":"ElementaryTypeName","src":"1881:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1880:24:1"},"payable":false,"returnParameters":{"id":247,"nodeType":"ParameterList","parameters":[],"src":"1924:0:1"},"scope":384,"src":"1856:451:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":311,"nodeType":"Block","src":"2394:287:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:13:1","subExpression":{"argumentTypes":null,"id":289,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2496:12:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":291,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2512:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":292,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"2512:19:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":293,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2512:21:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:38:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":288,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2487:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":295,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2487:47:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":296,"nodeType":"ExpressionStatement","src":"2487:47:1"},{"expression":{"argumentTypes":null,"id":301,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":297,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2575:7:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":298,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2585:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"2585:17:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":300,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2585:19:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2575:29:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":302,"nodeType":"ExpressionStatement","src":"2575:29:1"},{"expression":{"argumentTypes":null,"id":305,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":303,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2614:12:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":304,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2629:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2614:19:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":306,"nodeType":"ExpressionStatement","src":"2614:19:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":308,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2666:7:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":307,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":180,"src":"2648:17:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":309,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2648:26:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":310,"nodeType":"EmitStatement","src":"2643:31:1"}]},"documentation":"@dev Sets winning event outcome","id":312,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":286,"nodeType":"ParameterList","parameters":[],"src":"2372:2:1"},"payable":false,"returnParameters":{"id":287,"nodeType":"ParameterList","parameters":[],"src":"2394:0:1"},"scope":384,"src":"2353:328:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":322,"nodeType":"Block","src":"2835:51:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":318,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2858:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":319,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2858:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":317,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2852:5:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint8_$","typeString":"type(uint8)"},"typeName":"uint8"},"id":320,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2852:27:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"functionReturnParameters":316,"id":321,"nodeType":"Return","src":"2845:34:1"}]},"documentation":"@dev Returns outcome count\n @return Outcome count","id":323,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeCount","nodeType":"FunctionDefinition","parameters":{"id":313,"nodeType":"ParameterList","parameters":[],"src":"2776:2:1"},"payable":false,"returnParameters":{"id":316,"nodeType":"ParameterList","parameters":[{"constant":false,"id":315,"name":"","nodeType":"VariableDeclaration","scope":323,"src":"2824:5:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":314,"name":"uint8","nodeType":"ElementaryTypeName","src":"2824:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"2823:7:1"},"scope":384,"src":"2752:134:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":331,"nodeType":"Block","src":"3058:37:1","statements":[{"expression":{"argumentTypes":null,"id":329,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3075:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"functionReturnParameters":328,"id":330,"nodeType":"Return","src":"3068:20:1"}]},"documentation":"@dev Returns outcome tokens array\n @return Outcome tokens","id":332,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeTokens","nodeType":"FunctionDefinition","parameters":{"id":324,"nodeType":"ParameterList","parameters":[],"src":"2990:2:1"},"payable":false,"returnParameters":{"id":328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":327,"name":"","nodeType":"VariableDeclaration","scope":332,"src":"3038:14:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_memory_ptr","typeString":"contract OutcomeToken[]"},"typeName":{"baseType":{"contractScope":null,"id":325,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"3038:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":326,"length":null,"nodeType":"ArrayTypeName","src":"3038:14:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage_ptr","typeString":"contract OutcomeToken[]"}},"value":null,"visibility":"internal"}],"src":"3037:16:1"},"scope":384,"src":"2965:130:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":372,"nodeType":"Block","src":"3342:221:1","statements":[{"expression":{"argumentTypes":null,"id":347,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":340,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3352:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":344,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3390:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":345,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3390:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":343,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3379:10:1","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":341,"name":"uint","nodeType":"ElementaryTypeName","src":"3383:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":342,"length":null,"nodeType":"ArrayTypeName","src":"3383:6:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":346,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3379:32:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"src":"3352:59:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":348,"nodeType":"ExpressionStatement","src":"3352:59:1"},{"body":{"expression":{"argumentTypes":null,"id":369,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":360,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3493:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":362,"indexExpression":{"argumentTypes":null,"id":361,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3518:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3493:27:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":367,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":334,"src":"3550:5:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":363,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3523:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":365,"indexExpression":{"argumentTypes":null,"id":364,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3537:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3523:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":366,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"3523:26:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3523:33:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3493:63:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":370,"nodeType":"ExpressionStatement","src":"3493:63:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":356,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":353,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3439:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":354,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3443:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":355,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3443:31:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:35:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":371,"initializationExpression":{"assignments":[350],"declarations":[{"constant":false,"id":350,"name":"i","nodeType":"VariableDeclaration","scope":373,"src":"3426:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":349,"name":"uint8","nodeType":"ElementaryTypeName","src":"3426:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":352,"initialValue":{"argumentTypes":null,"hexValue":"30","id":351,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3436:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3426:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":358,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3476:3:1","subExpression":{"argumentTypes":null,"id":357,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3476:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":359,"nodeType":"ExpressionStatement","src":"3476:3:1"},"nodeType":"ForStatement","src":"3421:135:1"}]},"documentation":"@dev Returns the amount of outcome tokens held by owner\n @return Outcome token distribution","id":373,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeTokenDistribution","nodeType":"FunctionDefinition","parameters":{"id":335,"nodeType":"ParameterList","parameters":[{"constant":false,"id":334,"name":"owner","nodeType":"VariableDeclaration","scope":373,"src":"3245:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":333,"name":"address","nodeType":"ElementaryTypeName","src":"3245:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"3244:15:1"},"payable":false,"returnParameters":{"id":339,"nodeType":"ParameterList","parameters":[{"constant":false,"id":338,"name":"outcomeTokenDistribution","nodeType":"VariableDeclaration","scope":373,"src":"3305:31:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":336,"name":"uint","nodeType":"ElementaryTypeName","src":"3305:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":337,"length":null,"nodeType":"ArrayTypeName","src":"3305:6:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"src":"3304:33:1"},"scope":384,"src":"3208:355:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":378,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":374,"nodeType":"ParameterList","parameters":[],"src":"3664:2:1"},"payable":false,"returnParameters":{"id":377,"nodeType":"ParameterList","parameters":[{"constant":false,"id":376,"name":"","nodeType":"VariableDeclaration","scope":378,"src":"3688:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":375,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3688:7:1","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3687:9:1"},"scope":384,"src":"3643:54:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":383,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":379,"nodeType":"ParameterList","parameters":[],"src":"3837:2:1"},"payable":false,"returnParameters":{"id":382,"nodeType":"ParameterList","parameters":[{"constant":false,"id":381,"name":"","nodeType":"VariableDeclaration","scope":383,"src":"3856:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":380,"name":"uint","nodeType":"ElementaryTypeName","src":"3856:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3855:6:1"},"scope":384,"src":"3814:48:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":385,"src":"950:2914:1"}],"src":"0:3865:1"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","exportedSymbols":{"Event":[384],"EventData":[198]},"id":385,"nodeType":"SourceUnit","nodes":[{"id":154,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:1"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":155,"nodeType":"ImportDirective","scope":385,"sourceUnit":7329,"src":"25:63:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","file":"../Tokens/OutcomeToken.sol","id":156,"nodeType":"ImportDirective","scope":385,"sourceUnit":5675,"src":"89:36:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":157,"nodeType":"ImportDirective","scope":385,"sourceUnit":4718,"src":"126:31:1","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":158,"nodeType":"ImportDirective","scope":385,"sourceUnit":6702,"src":"158:55:1","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":198,"linearizedBaseContracts":[198],"name":"EventData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":164,"name":"OutcomeTokenCreation","nodeType":"EventDefinition","parameters":{"id":163,"nodeType":"ParameterList","parameters":[{"constant":false,"id":160,"indexed":false,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":164,"src":"299:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":159,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"299:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"},{"constant":false,"id":162,"indexed":false,"name":"index","nodeType":"VariableDeclaration","scope":164,"src":"326:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":161,"name":"uint8","nodeType":"ElementaryTypeName","src":"326:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"298:40:1"},"src":"272:67:1"},{"anonymous":false,"documentation":null,"id":170,"name":"OutcomeTokenSetIssuance","nodeType":"EventDefinition","parameters":{"id":169,"nodeType":"ParameterList","parameters":[{"constant":false,"id":166,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":170,"src":"374:21:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":165,"name":"address","nodeType":"ElementaryTypeName","src":"374:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":168,"indexed":false,"name":"collateralTokenCount","nodeType":"VariableDeclaration","scope":170,"src":"397:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":167,"name":"uint","nodeType":"ElementaryTypeName","src":"397:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"373:50:1"},"src":"344:80:1"},{"anonymous":false,"documentation":null,"id":176,"name":"OutcomeTokenSetRevocation","nodeType":"EventDefinition","parameters":{"id":175,"nodeType":"ParameterList","parameters":[{"constant":false,"id":172,"indexed":true,"name":"seller","nodeType":"VariableDeclaration","scope":176,"src":"461:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":171,"name":"address","nodeType":"ElementaryTypeName","src":"461:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":174,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":176,"src":"485:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":173,"name":"uint","nodeType":"ElementaryTypeName","src":"485:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"460:48:1"},"src":"429:80:1"},{"anonymous":false,"documentation":null,"id":180,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":179,"nodeType":"ParameterList","parameters":[{"constant":false,"id":178,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":180,"src":"538:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":177,"name":"int","nodeType":"ElementaryTypeName","src":"538:3:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"537:13:1"},"src":"514:37:1"},{"anonymous":false,"documentation":null,"id":186,"name":"WinningsRedemption","nodeType":"EventDefinition","parameters":{"id":185,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"indexed":true,"name":"receiver","nodeType":"VariableDeclaration","scope":186,"src":"581:24:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":181,"name":"address","nodeType":"ElementaryTypeName","src":"581:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":184,"indexed":false,"name":"winnings","nodeType":"VariableDeclaration","scope":186,"src":"607:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":183,"name":"uint","nodeType":"ElementaryTypeName","src":"607:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"580:41:1"},"src":"556:66:1"},{"constant":false,"id":188,"name":"collateralToken","nodeType":"VariableDeclaration","scope":198,"src":"659:28:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":187,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"659:5:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":190,"name":"oracle","nodeType":"VariableDeclaration","scope":198,"src":"693:20:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":189,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"693:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":192,"name":"isOutcomeSet","nodeType":"VariableDeclaration","scope":198,"src":"719:24:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":191,"name":"bool","nodeType":"ElementaryTypeName","src":"719:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":194,"name":"outcome","nodeType":"VariableDeclaration","scope":198,"src":"749:18:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":193,"name":"int","nodeType":"ElementaryTypeName","src":"749:3:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":197,"name":"outcomeTokens","nodeType":"VariableDeclaration","scope":198,"src":"773:35:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[]"},"typeName":{"baseType":{"contractScope":null,"id":195,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"773:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":196,"length":null,"nodeType":"ArrayTypeName","src":"773:14:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage_ptr","typeString":"contract OutcomeToken[]"}},"value":null,"visibility":"public"}],"scope":385,"src":"216:595:1"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":199,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"968:9:1","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":200,"nodeType":"InheritanceSpecifier","src":"968:9:1"}],"contractDependencies":[198],"contractKind":"contract","documentation":"@title Event contract - Provide basic functionality required by different event types\n @author Stefan George - ","fullyImplemented":false,"id":384,"linearizedBaseContracts":[384,198],"name":"Event","nodeType":"ContractDefinition","nodes":[{"body":{"id":242,"nodeType":"Block","src":"1277:396:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":208,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1381:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1381:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":210,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7657,"src":"1393:4:1","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":211,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1399:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":206,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1352:15:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":207,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1352:28:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":212,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1352:68:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":205,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1344:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":213,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1344:77:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":214,"nodeType":"ExpressionStatement","src":"1344:77:1"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":230,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1561:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1561:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":232,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1573:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":226,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1538:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":228,"indexExpression":{"argumentTypes":null,"id":227,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1552:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1538:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":229,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"issue","nodeType":"MemberAccess","referencedDeclaration":5640,"src":"1538:22:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":233,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1538:56:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":234,"nodeType":"ExpressionStatement","src":"1538:56:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":222,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":219,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1495:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":220,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1499:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":221,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1499:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1495:24:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":235,"initializationExpression":{"assignments":[216],"declarations":[{"constant":false,"id":216,"name":"i","nodeType":"VariableDeclaration","scope":243,"src":"1482:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":215,"name":"uint8","nodeType":"ElementaryTypeName","src":"1482:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":218,"initialValue":{"argumentTypes":null,"hexValue":"30","id":217,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1492:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1482:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1521:3:1","subExpression":{"argumentTypes":null,"id":223,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"1521:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":225,"nodeType":"ExpressionStatement","src":"1521:3:1"},"nodeType":"ForStatement","src":"1477:117:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":237,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1633:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":238,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1633:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":239,"name":"collateralTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":202,"src":"1645:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":236,"name":"OutcomeTokenSetIssuance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":170,"src":"1609:23:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1609:57:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":241,"nodeType":"EmitStatement","src":"1604:62:1"}]},"documentation":"@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","id":243,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buyAllOutcomes","nodeType":"FunctionDefinition","parameters":{"id":203,"nodeType":"ParameterList","parameters":[{"constant":false,"id":202,"name":"collateralTokenCount","nodeType":"VariableDeclaration","scope":243,"src":"1231:25:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":201,"name":"uint","nodeType":"ElementaryTypeName","src":"1231:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1230:27:1"},"payable":false,"returnParameters":{"id":204,"nodeType":"ParameterList","parameters":[],"src":"1277:0:1"},"scope":384,"src":"1207:466:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":284,"nodeType":"Block","src":"1924:383:1","statements":[{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":263,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2077:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2077:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":265,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2089:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":259,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2053:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":261,"indexExpression":{"argumentTypes":null,"id":260,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2067:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2053:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"2053:23:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2053:54:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":267,"nodeType":"ExpressionStatement","src":"2053:54:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":255,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":252,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2010:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":253,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2014:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":254,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2014:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2010:24:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":268,"initializationExpression":{"assignments":[249],"declarations":[{"constant":false,"id":249,"name":"i","nodeType":"VariableDeclaration","scope":285,"src":"1997:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":248,"name":"uint8","nodeType":"ElementaryTypeName","src":"1997:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":251,"initialValue":{"argumentTypes":null,"hexValue":"30","id":250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2007:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1997:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2036:3:1","subExpression":{"argumentTypes":null,"id":256,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":249,"src":"2036:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":258,"nodeType":"ExpressionStatement","src":"2036:3:1"},"nodeType":"ForStatement","src":"1992:115:1"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":272,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2198:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":273,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2198:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":274,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2210:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":270,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2173:15:1","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":271,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"2173:24:1","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":275,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2173:55:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":269,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2165:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2165:64:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":277,"nodeType":"ExpressionStatement","src":"2165:64:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":279,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2270:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2270:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":281,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":245,"src":"2282:17:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":278,"name":"OutcomeTokenSetRevocation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":176,"src":"2244:25:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":282,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2244:56:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":283,"nodeType":"EmitStatement","src":"2239:61:1"}]},"documentation":"@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","id":285,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sellAllOutcomes","nodeType":"FunctionDefinition","parameters":{"id":246,"nodeType":"ParameterList","parameters":[{"constant":false,"id":245,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":285,"src":"1881:22:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":244,"name":"uint","nodeType":"ElementaryTypeName","src":"1881:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1880:24:1"},"payable":false,"returnParameters":{"id":247,"nodeType":"ParameterList","parameters":[],"src":"1924:0:1"},"scope":384,"src":"1856:451:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":311,"nodeType":"Block","src":"2394:287:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:13:1","subExpression":{"argumentTypes":null,"id":289,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2496:12:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":291,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2512:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":292,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"2512:19:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":293,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2512:21:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:38:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":288,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2487:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":295,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2487:47:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":296,"nodeType":"ExpressionStatement","src":"2487:47:1"},{"expression":{"argumentTypes":null,"id":301,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":297,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2575:7:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":298,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"2585:6:1","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"2585:17:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":300,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2585:19:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2575:29:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":302,"nodeType":"ExpressionStatement","src":"2575:29:1"},{"expression":{"argumentTypes":null,"id":305,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":303,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2614:12:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":304,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2629:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2614:19:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":306,"nodeType":"ExpressionStatement","src":"2614:19:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":308,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2666:7:1","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":307,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":180,"src":"2648:17:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":309,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2648:26:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":310,"nodeType":"EmitStatement","src":"2643:31:1"}]},"documentation":"@dev Sets winning event outcome","id":312,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":286,"nodeType":"ParameterList","parameters":[],"src":"2372:2:1"},"payable":false,"returnParameters":{"id":287,"nodeType":"ParameterList","parameters":[],"src":"2394:0:1"},"scope":384,"src":"2353:328:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":322,"nodeType":"Block","src":"2835:51:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":318,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2858:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":319,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2858:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":317,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2852:5:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint8_$","typeString":"type(uint8)"},"typeName":"uint8"},"id":320,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2852:27:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"functionReturnParameters":316,"id":321,"nodeType":"Return","src":"2845:34:1"}]},"documentation":"@dev Returns outcome count\n @return Outcome count","id":323,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeCount","nodeType":"FunctionDefinition","parameters":{"id":313,"nodeType":"ParameterList","parameters":[],"src":"2776:2:1"},"payable":false,"returnParameters":{"id":316,"nodeType":"ParameterList","parameters":[{"constant":false,"id":315,"name":"","nodeType":"VariableDeclaration","scope":323,"src":"2824:5:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":314,"name":"uint8","nodeType":"ElementaryTypeName","src":"2824:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"2823:7:1"},"scope":384,"src":"2752:134:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":331,"nodeType":"Block","src":"3058:37:1","statements":[{"expression":{"argumentTypes":null,"id":329,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3075:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"functionReturnParameters":328,"id":330,"nodeType":"Return","src":"3068:20:1"}]},"documentation":"@dev Returns outcome tokens array\n @return Outcome tokens","id":332,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeTokens","nodeType":"FunctionDefinition","parameters":{"id":324,"nodeType":"ParameterList","parameters":[],"src":"2990:2:1"},"payable":false,"returnParameters":{"id":328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":327,"name":"","nodeType":"VariableDeclaration","scope":332,"src":"3038:14:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_memory_ptr","typeString":"contract OutcomeToken[]"},"typeName":{"baseType":{"contractScope":null,"id":325,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"3038:12:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":326,"length":null,"nodeType":"ArrayTypeName","src":"3038:14:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage_ptr","typeString":"contract OutcomeToken[]"}},"value":null,"visibility":"internal"}],"src":"3037:16:1"},"scope":384,"src":"2965:130:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":372,"nodeType":"Block","src":"3342:221:1","statements":[{"expression":{"argumentTypes":null,"id":347,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":340,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3352:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":344,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3390:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":345,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3390:20:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":343,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3379:10:1","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":341,"name":"uint","nodeType":"ElementaryTypeName","src":"3383:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":342,"length":null,"nodeType":"ArrayTypeName","src":"3383:6:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":346,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3379:32:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"src":"3352:59:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":348,"nodeType":"ExpressionStatement","src":"3352:59:1"},{"body":{"expression":{"argumentTypes":null,"id":369,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":360,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3493:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":362,"indexExpression":{"argumentTypes":null,"id":361,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3518:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3493:27:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":367,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":334,"src":"3550:5:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":363,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3523:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":365,"indexExpression":{"argumentTypes":null,"id":364,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3537:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3523:16:1","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":366,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"3523:26:1","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3523:33:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3493:63:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":370,"nodeType":"ExpressionStatement","src":"3493:63:1"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":356,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":353,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3439:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":354,"name":"outcomeTokenDistribution","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":338,"src":"3443:24:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":355,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3443:31:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3439:35:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":371,"initializationExpression":{"assignments":[350],"declarations":[{"constant":false,"id":350,"name":"i","nodeType":"VariableDeclaration","scope":373,"src":"3426:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":349,"name":"uint8","nodeType":"ElementaryTypeName","src":"3426:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":352,"initialValue":{"argumentTypes":null,"hexValue":"30","id":351,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3436:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3426:11:1"},"loopExpression":{"expression":{"argumentTypes":null,"id":358,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3476:3:1","subExpression":{"argumentTypes":null,"id":357,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":350,"src":"3476:1:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":359,"nodeType":"ExpressionStatement","src":"3476:3:1"},"nodeType":"ForStatement","src":"3421:135:1"}]},"documentation":"@dev Returns the amount of outcome tokens held by owner\n @return Outcome token distribution","id":373,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcomeTokenDistribution","nodeType":"FunctionDefinition","parameters":{"id":335,"nodeType":"ParameterList","parameters":[{"constant":false,"id":334,"name":"owner","nodeType":"VariableDeclaration","scope":373,"src":"3245:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":333,"name":"address","nodeType":"ElementaryTypeName","src":"3245:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"3244:15:1"},"payable":false,"returnParameters":{"id":339,"nodeType":"ParameterList","parameters":[{"constant":false,"id":338,"name":"outcomeTokenDistribution","nodeType":"VariableDeclaration","scope":373,"src":"3305:31:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":336,"name":"uint","nodeType":"ElementaryTypeName","src":"3305:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":337,"length":null,"nodeType":"ArrayTypeName","src":"3305:6:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"src":"3304:33:1"},"scope":384,"src":"3208:355:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":378,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":374,"nodeType":"ParameterList","parameters":[],"src":"3664:2:1"},"payable":false,"returnParameters":{"id":377,"nodeType":"ParameterList","parameters":[{"constant":false,"id":376,"name":"","nodeType":"VariableDeclaration","scope":378,"src":"3688:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":375,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3688:7:1","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3687:9:1"},"scope":384,"src":"3643:54:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":383,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":379,"nodeType":"ParameterList","parameters":[],"src":"3837:2:1"},"payable":false,"returnParameters":{"id":382,"nodeType":"ParameterList","parameters":[{"constant":false,"id":381,"name":"","nodeType":"VariableDeclaration","scope":383,"src":"3856:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":380,"name":"uint","nodeType":"ElementaryTypeName","src":"3856:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3855:6:1"},"scope":384,"src":"3814:48:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":385,"src":"950:2914:1"}],"src":"0:3865:1"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.983Z"}; /***/ }), @@ -242,10 +395,21 @@ module.exports = {"contract_name":"Event","abi":[{"constant":false,"inputs":[]," /*!********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/EventFactory.json ***! \********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"EventFactory","abi":[{"constant":true,"inputs":[],"name":"categoricalEventMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"scalarEventMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"categoricalEvents","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"scalarEvents","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"outcomeTokenMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_categoricalEventMasterCopy","type":"address"},{"name":"_scalarEventMasterCopy","type":"address"},{"name":"_outcomeTokenMasterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"categoricalEvent","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"oracle","type":"address"},{"indexed":false,"name":"outcomeCount","type":"uint8"}],"name":"CategoricalEventCreation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"scalarEvent","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"oracle","type":"address"},{"indexed":false,"name":"lowerBound","type":"int256"},{"indexed":false,"name":"upperBound","type":"int256"}],"name":"ScalarEventCreation","type":"event"},{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"oracle","type":"address"},{"name":"outcomeCount","type":"uint8"}],"name":"createCategoricalEvent","outputs":[{"name":"eventContract","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"oracle","type":"address"},{"name":"lowerBound","type":"int256"},{"name":"upperBound","type":"int256"}],"name":"createScalarEvent","outputs":[{"name":"eventContract","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160608061214983398101806040528101908080519060200190929190805190602001909291908051906020019092919050505082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505061202d8061011c6000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634b62cde6146100885780634ea0c802146100df5780635ea194a3146101365780638d1d2c21146101ed5780639897e8a51461025e5780639df0c176146102cf578063d1de36c21461037f575b600080fd5b34801561009457600080fd5b5061009d6103d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100eb57600080fd5b506100f46103fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014257600080fd5b506101ab600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610422565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f957600080fd5b5061021c600480360381019080803560001916906020019092919050505061083a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026a57600080fd5b5061028d600480360381019080803560001916906020019092919050505061086d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102db57600080fd5b5061033d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff1690602001909291905050506108a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561038b57600080fd5b50610394610cd1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008085858585604051602001808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018381526020018281526020019450505050506040516020818303038152906040526040518082805190602001908083835b60208310151561050857805182526020820191506020810190506020830392506104e3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050600060016000836000191660001916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561059757600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787876105e9610cf7565b808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019650505050505050604051809103906000f0801580156106e2573d6000803e3d6000fd5b5091508160016000836000191660001916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167fd613e63983a1538814e1b390fc232d0e20462cf7410924f6b6a5f29ea38e82ed8388888888604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019550505050505060405180910390a250949350505050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080848484604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018260ff1660ff167f010000000000000000000000000000000000000000000000000000000000000002815260010193505050506040516020818303038152906040526040518082805190602001908083835b6020831015156109a65780518252602082019150602081019050602083039250610981565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506000806000836000191660001916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610a3457600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868686610a85610d07565b808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff16815260200195505050505050604051809103906000f080158015610b7d573d6000803e3d6000fd5b50915081600080836000191660001916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f9732758aee476f5125b50d29cc43e28422f12ec078ba9f5c712f9dbd52796f5983878787604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff16815260200194505050505060405180910390a2509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b604051610a2080610d1883390190565b6040516108ca80611738833901905600608060405234801561001057600080fd5b5060405160c080610a208339810180604052810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808760008173ffffffffffffffffffffffffffffffffffffffff161415151561008f57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff161415801561010e575060008573ffffffffffffffffffffffffffffffffffffffff1614155b151561011957600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b60028260ff1610156102ee57866101b5610317565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080158015610207573d6000803e3d6000fd5b50905060048190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550507fad24776dc347085865b6988e249c191fc22d9b31cf54cb62233c3c16be1736ee8183604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019250505060405180910390a181806001019250506101a0565b83831315156102fc57600080fd5b83600581905550826006819055505050505050505050610327565b604051610223806107fd83390190565b6104c7806103366000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100fd578063561cce0a146101285780636e5452fe146101595780637dc0d1d01461018e5780638abe59ea146101e5578063a384d6ff14610252578063a619486e1461027d578063a871da91146102d4578063b09ad8a014610305578063b2016bd414610330578063ccdf68f314610387575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100f8573d6000f35b3d6000fd5b34801561010957600080fd5b506101126103b6565b6040518082815260200191505060405180910390f35b34801561013457600080fd5b5061013d6103bc565b604051808260ff1660ff16815260200191505060405180910390f35b34801561016557600080fd5b5061016e6103c1565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561019a57600080fd5b506101a36103c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f157600080fd5b50610210600480360381019080803590602001909291905050506103ee565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025e57600080fd5b5061026761042c565b6040518082815260200191505060405180910390f35b34801561028957600080fd5b50610292610432565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102e057600080fd5b506102e9610457565b604051808260ff1660ff16815260200191505060405180910390f35b34801561031157600080fd5b5061031a61045c565b6040518082815260200191505060405180910390f35b34801561033c57600080fd5b50610345610462565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039357600080fd5b5061039c610488565b604051808215151515815260200191505060405180910390f35b60035481565b600181565b620f424081565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811015156103fd57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16815600a165627a7a72305820c0e6769066eae8eb5c6e67e64e822ae3de04085803e139b841ad67b5edd720c40029608060405234801561001057600080fd5b50604051602080610223833981018060405281019080805190602001909291905050508060008173ffffffffffffffffffffffffffffffffffffffff161415151561005a57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610137806100ec6000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582086062f64a8ac16b84a22859a0aaf50fd8f37056793cb37e21a8760b9712c9eed0029608060405234801561001057600080fd5b5060405160a0806108ca83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808660008173ffffffffffffffffffffffffffffffffffffffff161415151561008557600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008573ffffffffffffffffffffffffffffffffffffffff1614158015610104575060008473ffffffffffffffffffffffffffffffffffffffff1614155b8015610114575060028360ff1610155b151561011f57600080fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b8260ff168260ff1610156102f657856101bd610302565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f08015801561020f573d6000803e3d6000fd5b50905060048190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550507fad24776dc347085865b6988e249c191fc22d9b31cf54cb62233c3c16be1736ee8183604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019250505060405180910390a181806001019250506101a6565b50505050505050610312565b604051610223806106a783390190565b610386806103216000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100c65780637dc0d1d0146100f15780638abe59ea14610148578063a619486e146101b5578063b2016bd41461020c578063ccdf68f314610263575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100c1573d6000f35b3d6000fd5b3480156100d257600080fd5b506100db610292565b6040518082815260200191505060405180910390f35b3480156100fd57600080fd5b50610106610298565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015457600080fd5b50610173600480360381019080803590602001909291905050506102be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c157600080fd5b506101ca6102fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021857600080fd5b50610221610321565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026f57600080fd5b50610278610347565b604051808215151515815260200191505060405180910390f35b60035481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811015156102cd57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16815600a165627a7a72305820ed6fbe9239a43957ef7615e6ce0b39eb5fab993fdc585dbef6bedeb350d1b63e0029608060405234801561001057600080fd5b50604051602080610223833981018060405281019080805190602001909291905050508060008173ffffffffffffffffffffffffffffffffffffffff161415151561005a57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610137806100ec6000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582086062f64a8ac16b84a22859a0aaf50fd8f37056793cb37e21a8760b9712c9eed0029a165627a7a72305820b0f1706f78d4a0d3eed32829957d02d1c8f05f68930a1c8b75e0939c398da29e0029","deployedBytecode":"0x608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634b62cde6146100885780634ea0c802146100df5780635ea194a3146101365780638d1d2c21146101ed5780639897e8a51461025e5780639df0c176146102cf578063d1de36c21461037f575b600080fd5b34801561009457600080fd5b5061009d6103d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100eb57600080fd5b506100f46103fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014257600080fd5b506101ab600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610422565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f957600080fd5b5061021c600480360381019080803560001916906020019092919050505061083a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026a57600080fd5b5061028d600480360381019080803560001916906020019092919050505061086d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102db57600080fd5b5061033d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff1690602001909291905050506108a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561038b57600080fd5b50610394610cd1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008085858585604051602001808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018381526020018281526020019450505050506040516020818303038152906040526040518082805190602001908083835b60208310151561050857805182526020820191506020810190506020830392506104e3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050600060016000836000191660001916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561059757600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787876105e9610cf7565b808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019650505050505050604051809103906000f0801580156106e2573d6000803e3d6000fd5b5091508160016000836000191660001916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167fd613e63983a1538814e1b390fc232d0e20462cf7410924f6b6a5f29ea38e82ed8388888888604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019550505050505060405180910390a250949350505050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080848484604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018260ff1660ff167f010000000000000000000000000000000000000000000000000000000000000002815260010193505050506040516020818303038152906040526040518082805190602001908083835b6020831015156109a65780518252602082019150602081019050602083039250610981565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506000806000836000191660001916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610a3457600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868686610a85610d07565b808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff16815260200195505050505050604051809103906000f080158015610b7d573d6000803e3d6000fd5b50915081600080836000191660001916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f9732758aee476f5125b50d29cc43e28422f12ec078ba9f5c712f9dbd52796f5983878787604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff16815260200194505050505060405180910390a2509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b604051610a2080610d1883390190565b6040516108ca80611738833901905600608060405234801561001057600080fd5b5060405160c080610a208339810180604052810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808760008173ffffffffffffffffffffffffffffffffffffffff161415151561008f57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff161415801561010e575060008573ffffffffffffffffffffffffffffffffffffffff1614155b151561011957600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b60028260ff1610156102ee57866101b5610317565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080158015610207573d6000803e3d6000fd5b50905060048190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550507fad24776dc347085865b6988e249c191fc22d9b31cf54cb62233c3c16be1736ee8183604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019250505060405180910390a181806001019250506101a0565b83831315156102fc57600080fd5b83600581905550826006819055505050505050505050610327565b604051610223806107fd83390190565b6104c7806103366000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100fd578063561cce0a146101285780636e5452fe146101595780637dc0d1d01461018e5780638abe59ea146101e5578063a384d6ff14610252578063a619486e1461027d578063a871da91146102d4578063b09ad8a014610305578063b2016bd414610330578063ccdf68f314610387575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100f8573d6000f35b3d6000fd5b34801561010957600080fd5b506101126103b6565b6040518082815260200191505060405180910390f35b34801561013457600080fd5b5061013d6103bc565b604051808260ff1660ff16815260200191505060405180910390f35b34801561016557600080fd5b5061016e6103c1565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561019a57600080fd5b506101a36103c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f157600080fd5b50610210600480360381019080803590602001909291905050506103ee565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025e57600080fd5b5061026761042c565b6040518082815260200191505060405180910390f35b34801561028957600080fd5b50610292610432565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102e057600080fd5b506102e9610457565b604051808260ff1660ff16815260200191505060405180910390f35b34801561031157600080fd5b5061031a61045c565b6040518082815260200191505060405180910390f35b34801561033c57600080fd5b50610345610462565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039357600080fd5b5061039c610488565b604051808215151515815260200191505060405180910390f35b60035481565b600181565b620f424081565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811015156103fd57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16815600a165627a7a72305820c0e6769066eae8eb5c6e67e64e822ae3de04085803e139b841ad67b5edd720c40029608060405234801561001057600080fd5b50604051602080610223833981018060405281019080805190602001909291905050508060008173ffffffffffffffffffffffffffffffffffffffff161415151561005a57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610137806100ec6000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582086062f64a8ac16b84a22859a0aaf50fd8f37056793cb37e21a8760b9712c9eed0029608060405234801561001057600080fd5b5060405160a0806108ca83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808660008173ffffffffffffffffffffffffffffffffffffffff161415151561008557600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008573ffffffffffffffffffffffffffffffffffffffff1614158015610104575060008473ffffffffffffffffffffffffffffffffffffffff1614155b8015610114575060028360ff1610155b151561011f57600080fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b8260ff168260ff1610156102f657856101bd610302565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f08015801561020f573d6000803e3d6000fd5b50905060048190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550507fad24776dc347085865b6988e249c191fc22d9b31cf54cb62233c3c16be1736ee8183604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019250505060405180910390a181806001019250506101a6565b50505050505050610312565b604051610223806106a783390190565b610386806103216000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100c65780637dc0d1d0146100f15780638abe59ea14610148578063a619486e146101b5578063b2016bd41461020c578063ccdf68f314610263575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100c1573d6000f35b3d6000fd5b3480156100d257600080fd5b506100db610292565b6040518082815260200191505060405180910390f35b3480156100fd57600080fd5b50610106610298565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015457600080fd5b50610173600480360381019080803590602001909291905050506102be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c157600080fd5b506101ca6102fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021857600080fd5b50610221610321565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026f57600080fd5b50610278610347565b604051808215151515815260200191505060405180910390f35b60035481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811015156102cd57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16815600a165627a7a72305820ed6fbe9239a43957ef7615e6ce0b39eb5fab993fdc585dbef6bedeb350d1b63e0029608060405234801561001057600080fd5b50604051602080610223833981018060405281019080805190602001909291905050508060008173ffffffffffffffffffffffffffffffffffffffff161415151561005a57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610137806100ec6000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582086062f64a8ac16b84a22859a0aaf50fd8f37056793cb37e21a8760b9712c9eed0029a165627a7a72305820b0f1706f78d4a0d3eed32829957d02d1c8f05f68930a1c8b75e0939c398da29e0029","sourceMap":"236:3405:2:-;;;949:368;8:9:-1;5:2;;;30:1;27;20:12;5:2;949:368:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1169:27;1140:26;;:56;;;;;;;;;;;;;;;;;;1230:22;1206:21;;:46;;;;;;;;;;;;;;;;;;1287:23;1262:22;;:48;;;;;;;;;;;;;;;;;;949:368;;;236:3405;;;;;;","deployedSourceMap":"236:3405:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;758:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;758:50:2;;;;;;;;;;;;;;;;;;;;;;;;;;;814:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;814:40:2;;;;;;;;;;;;;;;;;;;;;;;;;;;2814:825;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2814:825:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;632:62;;8:9:-1;5:2;;;30:1;27;20:12;5:2;632:62:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;700:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;700:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1637:803;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1637:803:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;860:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;860:42:2;;;;;;;;;;;;;;;;;;;;;;;;;;;758:50;;;;;;;;;;;;;:::o;814:40::-;;;;;;;;;;;;;:::o;2814:825::-;2981:25;3022:17;3069:15;3086:6;3094:10;3106;3052:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3052:65:2;;;3042:76;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;3042:76:2;;;;;;;;;;;;;;;;3022:96;;3210:1;3182:12;:23;3195:9;3182:23;;;;;;;;;;;;;;;;;;;;;;;;;;;3174:37;;;3166:46;;;;;;;;3308:21;;;;;;;;;;;3343:22;;;;;;;;;;;3379:15;3408:6;3428:10;3452;3274:198;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3274:198:2;3246:227;;3509:13;3483:12;:23;3496:9;3483:23;;;;;;;;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;3557:10;3537:95;;;3569:13;3584:15;3601:6;3609:10;3621;3537:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2814:825;;;;;;;:::o;632:62::-;;;;;;;;;;;;;;;;;;;;;;:::o;700:52::-;;;;;;;;;;;;;;;;;;;;;;:::o;1637:803::-;1789:30;1835:17;1882:15;1899:6;1907:12;1865:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;1865:55:2;;;1855:66;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1855:66:2;;;;;;;;;;;;;;;;1835:86;;2018:1;1985:17;:28;2003:9;1985:28;;;;;;;;;;;;;;;;;;;;;;;;;;;1977:42;;;1969:51;;;;;;;;2126:26;;;;;;;;;;;2166:22;;;;;;;;;;;2202:15;2231:6;2251:12;2087:186;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2087:186:2;2054:220;;2315:13;2284:17;:28;2302:9;2284:28;;;;;;;;;;;;;;;;;;:44;;;;;;;;;;;;;;;;;;2368:10;2343:90;;;2380:13;2395:15;2412:6;2420:12;2343:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1637:803;;;;;;:::o;860:42::-;;;;;;;;;;;;;:::o;236:3405::-;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Events/CategoricalEvent.sol\";\nimport \"../Events/ScalarEvent.sol\";\n\n\n/// @title Event factory contract - Allows creation of categorical and scalar events\n/// @author Stefan George - \ncontract EventFactory {\n\n /*\n * Events\n */\n event CategoricalEventCreation(address indexed creator, CategoricalEvent categoricalEvent, ERC20 collateralToken, Oracle oracle, uint8 outcomeCount);\n event ScalarEventCreation(address indexed creator, ScalarEvent scalarEvent, ERC20 collateralToken, Oracle oracle, int lowerBound, int upperBound);\n\n /*\n * Storage\n */\n mapping (bytes32 => CategoricalEvent) public categoricalEvents;\n mapping (bytes32 => ScalarEvent) public scalarEvents;\n CategoricalEvent public categoricalEventMasterCopy;\n ScalarEvent public scalarEventMasterCopy;\n OutcomeToken public outcomeTokenMasterCopy;\n\n /*\n * Public functions\n */\n constructor(\n CategoricalEvent _categoricalEventMasterCopy,\n ScalarEvent _scalarEventMasterCopy,\n OutcomeToken _outcomeTokenMasterCopy\n )\n public\n {\n categoricalEventMasterCopy = _categoricalEventMasterCopy;\n scalarEventMasterCopy = _scalarEventMasterCopy;\n outcomeTokenMasterCopy = _outcomeTokenMasterCopy;\n }\n\n /// @dev Creates a new categorical event and adds it to the event mapping\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 /// @return Event contract\n function createCategoricalEvent(\n ERC20 collateralToken,\n Oracle oracle,\n uint8 outcomeCount\n )\n public\n returns (CategoricalEvent eventContract)\n {\n bytes32 eventHash = keccak256(abi.encodePacked(collateralToken, oracle, outcomeCount));\n // Event should not exist yet\n require(address(categoricalEvents[eventHash]) == 0);\n // Create event\n eventContract = CategoricalEvent(new CategoricalEventProxy(\n categoricalEventMasterCopy,\n outcomeTokenMasterCopy,\n collateralToken,\n oracle,\n outcomeCount\n ));\n categoricalEvents[eventHash] = eventContract;\n emit CategoricalEventCreation(msg.sender, eventContract, collateralToken, oracle, outcomeCount);\n }\n\n /// @dev Creates a new scalar event and adds it to the event mapping\n /// @param collateralToken Tokens used as collateral in exchange for outcome tokens\n /// @param oracle Oracle contract used to resolve the event\n /// @param lowerBound Lower bound for event outcome\n /// @param upperBound Lower bound for event outcome\n /// @return Event contract\n function createScalarEvent(\n ERC20 collateralToken,\n Oracle oracle,\n int lowerBound,\n int upperBound\n )\n public\n returns (ScalarEvent eventContract)\n {\n bytes32 eventHash = keccak256(abi.encodePacked(collateralToken, oracle, lowerBound, upperBound));\n // Event should not exist yet\n require(address(scalarEvents[eventHash]) == 0);\n // Create event\n eventContract = ScalarEvent(new ScalarEventProxy(\n scalarEventMasterCopy,\n outcomeTokenMasterCopy,\n collateralToken,\n oracle,\n lowerBound,\n upperBound\n ));\n scalarEvents[eventHash] = eventContract;\n emit ScalarEventCreation(msg.sender, eventContract, collateralToken, oracle, lowerBound, upperBound);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","exportedSymbols":{"EventFactory":[578]},"id":579,"nodeType":"SourceUnit","nodes":[{"id":386,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:2"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/CategoricalEvent.sol","file":"../Events/CategoricalEvent.sol","id":387,"nodeType":"ImportDirective","scope":579,"sourceUnit":153,"src":"25:40:2","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","file":"../Events/ScalarEvent.sol","id":388,"nodeType":"ImportDirective","scope":579,"sourceUnit":841,"src":"66:35:2","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[83,690],"contractKind":"contract","documentation":"@title Event factory contract - Allows creation of categorical and scalar events\n @author Stefan George - ","fullyImplemented":true,"id":578,"linearizedBaseContracts":[578],"name":"EventFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":400,"name":"CategoricalEventCreation","nodeType":"EventDefinition","parameters":{"id":399,"nodeType":"ParameterList","parameters":[{"constant":false,"id":390,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":400,"src":"326:23:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":389,"name":"address","nodeType":"ElementaryTypeName","src":"326:7:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":392,"indexed":false,"name":"categoricalEvent","nodeType":"VariableDeclaration","scope":400,"src":"351:33:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":391,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"351:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"internal"},{"constant":false,"id":394,"indexed":false,"name":"collateralToken","nodeType":"VariableDeclaration","scope":400,"src":"386:21:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":393,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"386:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":396,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":400,"src":"409:13:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":395,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"409:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":398,"indexed":false,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":400,"src":"424:18:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":397,"name":"uint8","nodeType":"ElementaryTypeName","src":"424:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"325:118:2"},"src":"295:149:2"},{"anonymous":false,"documentation":null,"id":414,"name":"ScalarEventCreation","nodeType":"EventDefinition","parameters":{"id":413,"nodeType":"ParameterList","parameters":[{"constant":false,"id":402,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":414,"src":"475:23:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":401,"name":"address","nodeType":"ElementaryTypeName","src":"475:7:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":404,"indexed":false,"name":"scalarEvent","nodeType":"VariableDeclaration","scope":414,"src":"500:23:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":403,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"500:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"},{"constant":false,"id":406,"indexed":false,"name":"collateralToken","nodeType":"VariableDeclaration","scope":414,"src":"525:21:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":405,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"525:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":408,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":414,"src":"548:13:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":407,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"548:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":410,"indexed":false,"name":"lowerBound","nodeType":"VariableDeclaration","scope":414,"src":"563:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":409,"name":"int","nodeType":"ElementaryTypeName","src":"563:3:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":412,"indexed":false,"name":"upperBound","nodeType":"VariableDeclaration","scope":414,"src":"579:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":411,"name":"int","nodeType":"ElementaryTypeName","src":"579:3:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"474:120:2"},"src":"449:146:2"},{"constant":false,"id":418,"name":"categoricalEvents","nodeType":"VariableDeclaration","scope":578,"src":"632:62:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_CategoricalEvent_$152_$","typeString":"mapping(bytes32 => contract CategoricalEvent)"},"typeName":{"id":417,"keyType":{"id":415,"name":"bytes32","nodeType":"ElementaryTypeName","src":"641:7:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Mapping","src":"632:37:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_CategoricalEvent_$152_$","typeString":"mapping(bytes32 => contract CategoricalEvent)"},"valueType":{"contractScope":null,"id":416,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"652:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}}},"value":null,"visibility":"public"},{"constant":false,"id":422,"name":"scalarEvents","nodeType":"VariableDeclaration","scope":578,"src":"700:52:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_ScalarEvent_$840_$","typeString":"mapping(bytes32 => contract ScalarEvent)"},"typeName":{"id":421,"keyType":{"id":419,"name":"bytes32","nodeType":"ElementaryTypeName","src":"709:7:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Mapping","src":"700:32:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_ScalarEvent_$840_$","typeString":"mapping(bytes32 => contract ScalarEvent)"},"valueType":{"contractScope":null,"id":420,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"720:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}}},"value":null,"visibility":"public"},{"constant":false,"id":424,"name":"categoricalEventMasterCopy","nodeType":"VariableDeclaration","scope":578,"src":"758:50:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":423,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"758:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":426,"name":"scalarEventMasterCopy","nodeType":"VariableDeclaration","scope":578,"src":"814:40:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":425,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"814:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":428,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":578,"src":"860:42:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":427,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"860:12:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"public"},{"body":{"id":449,"nodeType":"Block","src":"1130:187:2","statements":[{"expression":{"argumentTypes":null,"id":439,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":437,"name":"categoricalEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":424,"src":"1140:26:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":438,"name":"_categoricalEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":430,"src":"1169:27:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"1140:56:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":440,"nodeType":"ExpressionStatement","src":"1140:56:2"},{"expression":{"argumentTypes":null,"id":443,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":441,"name":"scalarEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":426,"src":"1206:21:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":442,"name":"_scalarEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":432,"src":"1230:22:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"src":"1206:46:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"id":444,"nodeType":"ExpressionStatement","src":"1206:46:2"},{"expression":{"argumentTypes":null,"id":447,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":445,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1262:22:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":446,"name":"_outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":434,"src":"1287:23:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"src":"1262:48:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":448,"nodeType":"ExpressionStatement","src":"1262:48:2"}]},"documentation":null,"id":450,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":435,"nodeType":"ParameterList","parameters":[{"constant":false,"id":430,"name":"_categoricalEventMasterCopy","nodeType":"VariableDeclaration","scope":450,"src":"970:44:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":429,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"970:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"internal"},{"constant":false,"id":432,"name":"_scalarEventMasterCopy","nodeType":"VariableDeclaration","scope":450,"src":"1024:34:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":431,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"1024:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"},{"constant":false,"id":434,"name":"_outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":450,"src":"1068:36:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":433,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"1068:12:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"src":"960:150:2"},"payable":false,"returnParameters":{"id":436,"nodeType":"ParameterList","parameters":[],"src":"1130:0:2"},"scope":578,"src":"949:368:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":510,"nodeType":"Block","src":"1825:615:2","statements":[{"assignments":[462],"declarations":[{"constant":false,"id":462,"name":"eventHash","nodeType":"VariableDeclaration","scope":511,"src":"1835:17:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":461,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1835:7:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"id":471,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":466,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":452,"src":"1882:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":467,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":454,"src":"1899:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":468,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":456,"src":"1907:12:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":464,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"1865:3:2","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":465,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1865:16:2","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":469,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1865:55:2","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":463,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"1855:9:2","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":470,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1855:66:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"VariableDeclarationStatement","src":"1835:86:2"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":479,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":474,"name":"categoricalEvents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"1985:17:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_CategoricalEvent_$152_$","typeString":"mapping(bytes32 => contract CategoricalEvent)"}},"id":476,"indexExpression":{"argumentTypes":null,"id":475,"name":"eventHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":462,"src":"2003:9:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1985:28:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}],"id":473,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1977:7:2","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":477,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1977:37:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":478,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2018:1:2","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1977:42:2","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":472,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1969:7:2","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":480,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1969:51:2","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":481,"nodeType":"ExpressionStatement","src":"1969:51:2"},{"expression":{"argumentTypes":null,"id":493,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":482,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":459,"src":"2054:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":486,"name":"categoricalEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":424,"src":"2126:26:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":487,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2166:22:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":488,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":452,"src":"2202:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":489,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":454,"src":"2231:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":490,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":456,"src":"2251:12:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":485,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"2087:25:2","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$_t_contract$_CategoricalEventProxy_$83_$","typeString":"function (address,address,contract ERC20,contract Oracle,uint8) returns (contract CategoricalEventProxy)"},"typeName":{"contractScope":null,"id":484,"name":"CategoricalEventProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":83,"src":"2091:21:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEventProxy_$83","typeString":"contract CategoricalEventProxy"}}},"id":491,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2087:186:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEventProxy_$83","typeString":"contract CategoricalEventProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEventProxy_$83","typeString":"contract CategoricalEventProxy"}],"id":483,"name":"CategoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":152,"src":"2070:16:2","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_CategoricalEvent_$152_$","typeString":"type(contract CategoricalEvent)"}},"id":492,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2070:204:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2054:220:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":494,"nodeType":"ExpressionStatement","src":"2054:220:2"},{"expression":{"argumentTypes":null,"id":499,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":495,"name":"categoricalEvents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"2284:17:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_CategoricalEvent_$152_$","typeString":"mapping(bytes32 => contract CategoricalEvent)"}},"id":497,"indexExpression":{"argumentTypes":null,"id":496,"name":"eventHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":462,"src":"2302:9:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2284:28:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":498,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":459,"src":"2315:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2284:44:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":500,"nodeType":"ExpressionStatement","src":"2284:44:2"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":502,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2368:3:2","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":503,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2368:10:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":504,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":459,"src":"2380:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":505,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":452,"src":"2395:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":506,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":454,"src":"2412:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":507,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":456,"src":"2420:12:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":501,"name":"CategoricalEventCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":400,"src":"2343:24:2","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_CategoricalEvent_$152_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$__$","typeString":"function (address,contract CategoricalEvent,contract ERC20,contract Oracle,uint8)"}},"id":508,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2343:90:2","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":509,"nodeType":"EmitStatement","src":"2338:95:2"}]},"documentation":"@dev Creates a new categorical event and adds it to the event mapping\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 @return Event contract","id":511,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createCategoricalEvent","nodeType":"FunctionDefinition","parameters":{"id":457,"nodeType":"ParameterList","parameters":[{"constant":false,"id":452,"name":"collateralToken","nodeType":"VariableDeclaration","scope":511,"src":"1678:21:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":451,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1678:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":454,"name":"oracle","nodeType":"VariableDeclaration","scope":511,"src":"1709:13:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":453,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1709:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":456,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":511,"src":"1732:18:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":455,"name":"uint8","nodeType":"ElementaryTypeName","src":"1732:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"1668:88:2"},"payable":false,"returnParameters":{"id":460,"nodeType":"ParameterList","parameters":[{"constant":false,"id":459,"name":"eventContract","nodeType":"VariableDeclaration","scope":511,"src":"1789:30:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":458,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"1789:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"internal"}],"src":"1788:32:2"},"scope":578,"src":"1637:803:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":576,"nodeType":"Block","src":"3012:627:2","statements":[{"assignments":[525],"declarations":[{"constant":false,"id":525,"name":"eventHash","nodeType":"VariableDeclaration","scope":577,"src":"3022:17:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":524,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3022:7:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"id":535,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":529,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":513,"src":"3069:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":530,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":515,"src":"3086:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":531,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":517,"src":"3094:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":532,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":519,"src":"3106:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":527,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"3052:3:2","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":528,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3052:16:2","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":533,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3052:65:2","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":526,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"3042:9:2","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":534,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3042:76:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"VariableDeclarationStatement","src":"3022:96:2"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":543,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":538,"name":"scalarEvents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":422,"src":"3182:12:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_ScalarEvent_$840_$","typeString":"mapping(bytes32 => contract ScalarEvent)"}},"id":540,"indexExpression":{"argumentTypes":null,"id":539,"name":"eventHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":525,"src":"3195:9:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3182:23:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}],"id":537,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3174:7:2","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":541,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3174:32:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":542,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3210:1:2","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3174:37:2","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":536,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3166:7:2","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3166:46:2","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":545,"nodeType":"ExpressionStatement","src":"3166:46:2"},{"expression":{"argumentTypes":null,"id":558,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":546,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":522,"src":"3246:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":550,"name":"scalarEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":426,"src":"3308:21:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":551,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"3343:22:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":552,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":513,"src":"3379:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":553,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":515,"src":"3408:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":554,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":517,"src":"3428:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":555,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":519,"src":"3452:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":549,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"3274:20:2","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$_t_contract$_ScalarEventProxy_$690_$","typeString":"function (address,address,contract ERC20,contract Oracle,int256,int256) returns (contract ScalarEventProxy)"},"typeName":{"contractScope":null,"id":548,"name":"ScalarEventProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":690,"src":"3278:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventProxy_$690","typeString":"contract ScalarEventProxy"}}},"id":556,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3274:198:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventProxy_$690","typeString":"contract ScalarEventProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEventProxy_$690","typeString":"contract ScalarEventProxy"}],"id":547,"name":"ScalarEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":840,"src":"3262:11:2","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ScalarEvent_$840_$","typeString":"type(contract ScalarEvent)"}},"id":557,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3262:211:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"src":"3246:227:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"id":559,"nodeType":"ExpressionStatement","src":"3246:227:2"},{"expression":{"argumentTypes":null,"id":564,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":560,"name":"scalarEvents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":422,"src":"3483:12:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_ScalarEvent_$840_$","typeString":"mapping(bytes32 => contract ScalarEvent)"}},"id":562,"indexExpression":{"argumentTypes":null,"id":561,"name":"eventHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":525,"src":"3496:9:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3483:23:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":563,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":522,"src":"3509:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"src":"3483:39:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"id":565,"nodeType":"ExpressionStatement","src":"3483:39:2"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":567,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3557:3:2","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":568,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3557:10:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":569,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":522,"src":"3569:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":570,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":513,"src":"3584:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":571,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":515,"src":"3601:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":572,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":517,"src":"3609:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":573,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":519,"src":"3621:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":566,"name":"ScalarEventCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":414,"src":"3537:19:2","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_ScalarEvent_$840_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$__$","typeString":"function (address,contract ScalarEvent,contract ERC20,contract Oracle,int256,int256)"}},"id":574,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3537:95:2","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":575,"nodeType":"EmitStatement","src":"3532:100:2"}]},"documentation":"@dev Creates a new scalar event and adds it to the event mapping\n @param collateralToken Tokens used as collateral in exchange for outcome tokens\n @param oracle Oracle contract used to resolve the event\n @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @return Event contract","id":577,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createScalarEvent","nodeType":"FunctionDefinition","parameters":{"id":520,"nodeType":"ParameterList","parameters":[{"constant":false,"id":513,"name":"collateralToken","nodeType":"VariableDeclaration","scope":577,"src":"2850:21:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":512,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"2850:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":515,"name":"oracle","nodeType":"VariableDeclaration","scope":577,"src":"2881:13:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":514,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2881:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":517,"name":"lowerBound","nodeType":"VariableDeclaration","scope":577,"src":"2904:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":516,"name":"int","nodeType":"ElementaryTypeName","src":"2904:3:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":519,"name":"upperBound","nodeType":"VariableDeclaration","scope":577,"src":"2928:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":518,"name":"int","nodeType":"ElementaryTypeName","src":"2928:3:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2840:108:2"},"payable":false,"returnParameters":{"id":523,"nodeType":"ParameterList","parameters":[{"constant":false,"id":522,"name":"eventContract","nodeType":"VariableDeclaration","scope":577,"src":"2981:25:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":521,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"2981:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"}],"src":"2980:27:2"},"scope":578,"src":"2814:825:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":579,"src":"236:3405:2"}],"src":"0:3642:2"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","exportedSymbols":{"EventFactory":[578]},"id":579,"nodeType":"SourceUnit","nodes":[{"id":386,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:2"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/CategoricalEvent.sol","file":"../Events/CategoricalEvent.sol","id":387,"nodeType":"ImportDirective","scope":579,"sourceUnit":153,"src":"25:40:2","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","file":"../Events/ScalarEvent.sol","id":388,"nodeType":"ImportDirective","scope":579,"sourceUnit":841,"src":"66:35:2","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[83,690],"contractKind":"contract","documentation":"@title Event factory contract - Allows creation of categorical and scalar events\n @author Stefan George - ","fullyImplemented":true,"id":578,"linearizedBaseContracts":[578],"name":"EventFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":400,"name":"CategoricalEventCreation","nodeType":"EventDefinition","parameters":{"id":399,"nodeType":"ParameterList","parameters":[{"constant":false,"id":390,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":400,"src":"326:23:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":389,"name":"address","nodeType":"ElementaryTypeName","src":"326:7:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":392,"indexed":false,"name":"categoricalEvent","nodeType":"VariableDeclaration","scope":400,"src":"351:33:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":391,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"351:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"internal"},{"constant":false,"id":394,"indexed":false,"name":"collateralToken","nodeType":"VariableDeclaration","scope":400,"src":"386:21:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":393,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"386:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":396,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":400,"src":"409:13:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":395,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"409:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":398,"indexed":false,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":400,"src":"424:18:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":397,"name":"uint8","nodeType":"ElementaryTypeName","src":"424:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"325:118:2"},"src":"295:149:2"},{"anonymous":false,"documentation":null,"id":414,"name":"ScalarEventCreation","nodeType":"EventDefinition","parameters":{"id":413,"nodeType":"ParameterList","parameters":[{"constant":false,"id":402,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":414,"src":"475:23:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":401,"name":"address","nodeType":"ElementaryTypeName","src":"475:7:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":404,"indexed":false,"name":"scalarEvent","nodeType":"VariableDeclaration","scope":414,"src":"500:23:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":403,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"500:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"},{"constant":false,"id":406,"indexed":false,"name":"collateralToken","nodeType":"VariableDeclaration","scope":414,"src":"525:21:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":405,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"525:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":408,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":414,"src":"548:13:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":407,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"548:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":410,"indexed":false,"name":"lowerBound","nodeType":"VariableDeclaration","scope":414,"src":"563:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":409,"name":"int","nodeType":"ElementaryTypeName","src":"563:3:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":412,"indexed":false,"name":"upperBound","nodeType":"VariableDeclaration","scope":414,"src":"579:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":411,"name":"int","nodeType":"ElementaryTypeName","src":"579:3:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"474:120:2"},"src":"449:146:2"},{"constant":false,"id":418,"name":"categoricalEvents","nodeType":"VariableDeclaration","scope":578,"src":"632:62:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_CategoricalEvent_$152_$","typeString":"mapping(bytes32 => contract CategoricalEvent)"},"typeName":{"id":417,"keyType":{"id":415,"name":"bytes32","nodeType":"ElementaryTypeName","src":"641:7:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Mapping","src":"632:37:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_CategoricalEvent_$152_$","typeString":"mapping(bytes32 => contract CategoricalEvent)"},"valueType":{"contractScope":null,"id":416,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"652:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}}},"value":null,"visibility":"public"},{"constant":false,"id":422,"name":"scalarEvents","nodeType":"VariableDeclaration","scope":578,"src":"700:52:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_ScalarEvent_$840_$","typeString":"mapping(bytes32 => contract ScalarEvent)"},"typeName":{"id":421,"keyType":{"id":419,"name":"bytes32","nodeType":"ElementaryTypeName","src":"709:7:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Mapping","src":"700:32:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_ScalarEvent_$840_$","typeString":"mapping(bytes32 => contract ScalarEvent)"},"valueType":{"contractScope":null,"id":420,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"720:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}}},"value":null,"visibility":"public"},{"constant":false,"id":424,"name":"categoricalEventMasterCopy","nodeType":"VariableDeclaration","scope":578,"src":"758:50:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":423,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"758:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":426,"name":"scalarEventMasterCopy","nodeType":"VariableDeclaration","scope":578,"src":"814:40:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":425,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"814:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":428,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":578,"src":"860:42:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":427,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"860:12:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"public"},{"body":{"id":449,"nodeType":"Block","src":"1130:187:2","statements":[{"expression":{"argumentTypes":null,"id":439,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":437,"name":"categoricalEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":424,"src":"1140:26:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":438,"name":"_categoricalEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":430,"src":"1169:27:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"1140:56:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":440,"nodeType":"ExpressionStatement","src":"1140:56:2"},{"expression":{"argumentTypes":null,"id":443,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":441,"name":"scalarEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":426,"src":"1206:21:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":442,"name":"_scalarEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":432,"src":"1230:22:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"src":"1206:46:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"id":444,"nodeType":"ExpressionStatement","src":"1206:46:2"},{"expression":{"argumentTypes":null,"id":447,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":445,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1262:22:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":446,"name":"_outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":434,"src":"1287:23:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"src":"1262:48:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":448,"nodeType":"ExpressionStatement","src":"1262:48:2"}]},"documentation":null,"id":450,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":435,"nodeType":"ParameterList","parameters":[{"constant":false,"id":430,"name":"_categoricalEventMasterCopy","nodeType":"VariableDeclaration","scope":450,"src":"970:44:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":429,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"970:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"internal"},{"constant":false,"id":432,"name":"_scalarEventMasterCopy","nodeType":"VariableDeclaration","scope":450,"src":"1024:34:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":431,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"1024:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"},{"constant":false,"id":434,"name":"_outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":450,"src":"1068:36:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":433,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"1068:12:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"src":"960:150:2"},"payable":false,"returnParameters":{"id":436,"nodeType":"ParameterList","parameters":[],"src":"1130:0:2"},"scope":578,"src":"949:368:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":510,"nodeType":"Block","src":"1825:615:2","statements":[{"assignments":[462],"declarations":[{"constant":false,"id":462,"name":"eventHash","nodeType":"VariableDeclaration","scope":511,"src":"1835:17:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":461,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1835:7:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"id":471,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":466,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":452,"src":"1882:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":467,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":454,"src":"1899:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":468,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":456,"src":"1907:12:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":464,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"1865:3:2","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":465,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1865:16:2","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":469,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1865:55:2","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":463,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"1855:9:2","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":470,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1855:66:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"VariableDeclarationStatement","src":"1835:86:2"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":479,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":474,"name":"categoricalEvents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"1985:17:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_CategoricalEvent_$152_$","typeString":"mapping(bytes32 => contract CategoricalEvent)"}},"id":476,"indexExpression":{"argumentTypes":null,"id":475,"name":"eventHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":462,"src":"2003:9:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1985:28:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}],"id":473,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1977:7:2","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":477,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1977:37:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":478,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2018:1:2","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1977:42:2","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":472,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1969:7:2","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":480,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1969:51:2","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":481,"nodeType":"ExpressionStatement","src":"1969:51:2"},{"expression":{"argumentTypes":null,"id":493,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":482,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":459,"src":"2054:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":486,"name":"categoricalEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":424,"src":"2126:26:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":487,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2166:22:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":488,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":452,"src":"2202:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":489,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":454,"src":"2231:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":490,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":456,"src":"2251:12:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":485,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"2087:25:2","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$_t_contract$_CategoricalEventProxy_$83_$","typeString":"function (address,address,contract ERC20,contract Oracle,uint8) returns (contract CategoricalEventProxy)"},"typeName":{"contractScope":null,"id":484,"name":"CategoricalEventProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":83,"src":"2091:21:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEventProxy_$83","typeString":"contract CategoricalEventProxy"}}},"id":491,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2087:186:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEventProxy_$83","typeString":"contract CategoricalEventProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEventProxy_$83","typeString":"contract CategoricalEventProxy"}],"id":483,"name":"CategoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":152,"src":"2070:16:2","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_CategoricalEvent_$152_$","typeString":"type(contract CategoricalEvent)"}},"id":492,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2070:204:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2054:220:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":494,"nodeType":"ExpressionStatement","src":"2054:220:2"},{"expression":{"argumentTypes":null,"id":499,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":495,"name":"categoricalEvents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"2284:17:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_CategoricalEvent_$152_$","typeString":"mapping(bytes32 => contract CategoricalEvent)"}},"id":497,"indexExpression":{"argumentTypes":null,"id":496,"name":"eventHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":462,"src":"2302:9:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2284:28:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":498,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":459,"src":"2315:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2284:44:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":500,"nodeType":"ExpressionStatement","src":"2284:44:2"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":502,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2368:3:2","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":503,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2368:10:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":504,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":459,"src":"2380:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":505,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":452,"src":"2395:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":506,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":454,"src":"2412:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":507,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":456,"src":"2420:12:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":501,"name":"CategoricalEventCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":400,"src":"2343:24:2","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_CategoricalEvent_$152_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$__$","typeString":"function (address,contract CategoricalEvent,contract ERC20,contract Oracle,uint8)"}},"id":508,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2343:90:2","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":509,"nodeType":"EmitStatement","src":"2338:95:2"}]},"documentation":"@dev Creates a new categorical event and adds it to the event mapping\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 @return Event contract","id":511,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createCategoricalEvent","nodeType":"FunctionDefinition","parameters":{"id":457,"nodeType":"ParameterList","parameters":[{"constant":false,"id":452,"name":"collateralToken","nodeType":"VariableDeclaration","scope":511,"src":"1678:21:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":451,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1678:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":454,"name":"oracle","nodeType":"VariableDeclaration","scope":511,"src":"1709:13:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":453,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1709:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":456,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":511,"src":"1732:18:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":455,"name":"uint8","nodeType":"ElementaryTypeName","src":"1732:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"1668:88:2"},"payable":false,"returnParameters":{"id":460,"nodeType":"ParameterList","parameters":[{"constant":false,"id":459,"name":"eventContract","nodeType":"VariableDeclaration","scope":511,"src":"1789:30:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":458,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"1789:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"internal"}],"src":"1788:32:2"},"scope":578,"src":"1637:803:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":576,"nodeType":"Block","src":"3012:627:2","statements":[{"assignments":[525],"declarations":[{"constant":false,"id":525,"name":"eventHash","nodeType":"VariableDeclaration","scope":577,"src":"3022:17:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":524,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3022:7:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"id":535,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":529,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":513,"src":"3069:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":530,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":515,"src":"3086:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":531,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":517,"src":"3094:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":532,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":519,"src":"3106:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":527,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"3052:3:2","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":528,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3052:16:2","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":533,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3052:65:2","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":526,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"3042:9:2","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":534,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3042:76:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"VariableDeclarationStatement","src":"3022:96:2"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":543,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":538,"name":"scalarEvents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":422,"src":"3182:12:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_ScalarEvent_$840_$","typeString":"mapping(bytes32 => contract ScalarEvent)"}},"id":540,"indexExpression":{"argumentTypes":null,"id":539,"name":"eventHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":525,"src":"3195:9:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3182:23:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}],"id":537,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3174:7:2","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":541,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3174:32:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":542,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3210:1:2","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3174:37:2","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":536,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3166:7:2","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3166:46:2","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":545,"nodeType":"ExpressionStatement","src":"3166:46:2"},{"expression":{"argumentTypes":null,"id":558,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":546,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":522,"src":"3246:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":550,"name":"scalarEventMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":426,"src":"3308:21:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":551,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"3343:22:2","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":552,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":513,"src":"3379:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":553,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":515,"src":"3408:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":554,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":517,"src":"3428:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":555,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":519,"src":"3452:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":549,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"3274:20:2","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$_t_contract$_ScalarEventProxy_$690_$","typeString":"function (address,address,contract ERC20,contract Oracle,int256,int256) returns (contract ScalarEventProxy)"},"typeName":{"contractScope":null,"id":548,"name":"ScalarEventProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":690,"src":"3278:16:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventProxy_$690","typeString":"contract ScalarEventProxy"}}},"id":556,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3274:198:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventProxy_$690","typeString":"contract ScalarEventProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEventProxy_$690","typeString":"contract ScalarEventProxy"}],"id":547,"name":"ScalarEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":840,"src":"3262:11:2","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ScalarEvent_$840_$","typeString":"type(contract ScalarEvent)"}},"id":557,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3262:211:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"src":"3246:227:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"id":559,"nodeType":"ExpressionStatement","src":"3246:227:2"},{"expression":{"argumentTypes":null,"id":564,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":560,"name":"scalarEvents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":422,"src":"3483:12:2","typeDescriptions":{"typeIdentifier":"t_mapping$_t_bytes32_$_t_contract$_ScalarEvent_$840_$","typeString":"mapping(bytes32 => contract ScalarEvent)"}},"id":562,"indexExpression":{"argumentTypes":null,"id":561,"name":"eventHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":525,"src":"3496:9:2","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3483:23:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":563,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":522,"src":"3509:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"src":"3483:39:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"id":565,"nodeType":"ExpressionStatement","src":"3483:39:2"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":567,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3557:3:2","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":568,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3557:10:2","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":569,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":522,"src":"3569:13:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":570,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":513,"src":"3584:15:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":571,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":515,"src":"3601:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":572,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":517,"src":"3609:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":573,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":519,"src":"3621:10:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":566,"name":"ScalarEventCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":414,"src":"3537:19:2","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_ScalarEvent_$840_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$__$","typeString":"function (address,contract ScalarEvent,contract ERC20,contract Oracle,int256,int256)"}},"id":574,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3537:95:2","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":575,"nodeType":"EmitStatement","src":"3532:100:2"}]},"documentation":"@dev Creates a new scalar event and adds it to the event mapping\n @param collateralToken Tokens used as collateral in exchange for outcome tokens\n @param oracle Oracle contract used to resolve the event\n @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @return Event contract","id":577,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createScalarEvent","nodeType":"FunctionDefinition","parameters":{"id":520,"nodeType":"ParameterList","parameters":[{"constant":false,"id":513,"name":"collateralToken","nodeType":"VariableDeclaration","scope":577,"src":"2850:21:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":512,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"2850:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":515,"name":"oracle","nodeType":"VariableDeclaration","scope":577,"src":"2881:13:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":514,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2881:6:2","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":517,"name":"lowerBound","nodeType":"VariableDeclaration","scope":577,"src":"2904:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":516,"name":"int","nodeType":"ElementaryTypeName","src":"2904:3:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":519,"name":"upperBound","nodeType":"VariableDeclaration","scope":577,"src":"2928:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":518,"name":"int","nodeType":"ElementaryTypeName","src":"2928:3:2","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2840:108:2"},"payable":false,"returnParameters":{"id":523,"nodeType":"ParameterList","parameters":[{"constant":false,"id":522,"name":"eventContract","nodeType":"VariableDeclaration","scope":577,"src":"2981:25:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":521,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"2981:11:2","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"}],"src":"2980:27:2"},"scope":578,"src":"2814:825:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":579,"src":"236:3405:2"}],"src":"0:3642:2"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0xc113873694e254c75bfa1dc6667f0d57b3e2e1e3","transactionHash":"0x12e8d20e98347849c61dc55da18434afbaec75862c49e5eeaf9860728b2bc535"},"3":{"address":"0xd047a93c883ae84d44a646b538ce9d62cd49094b","transactionHash":"0x11f24e1ba732bf586d7e4381b042eaf017df51a93b318b068839915d450d6783"},"4":{"address":"0x8a8fff095771faf29f3fcc00cb8e980ebe08405e","transactionHash":"0x052c1f2145cbf150df188f8402cd5fb4a16663282f53a0cb5f22c621d1ac0211"},"42":{"address":"0x964422ecbdf08f44347ef3e551fe027ec51c1c62","transactionHash":"0x51ee7f9d3e32603fc45b3e426e892308e7202bc1c7090c4fdde69d3764290f8a"},"437894314312":{"address":"0xb09bcc172050fbd4562da8b229cf3e45dc3045a6","transactionHash":"0x3bbc0494a74b9709fcd66c01260da5c742eff1be3f8c8b4ce784feea04e966d7"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:49.437Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Fixed192x64Math.json": +/*!***********************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Fixed192x64Math.json ***! + \***********************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"EventFactory","abi":[{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"oracle","type":"address"},{"name":"lowerBound","type":"int256"},{"name":"upperBound","type":"int256"}],"name":"createScalarEvent","outputs":[{"name":"eventContract","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"categoricalEvents","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"scalarEvents","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"oracle","type":"address"},{"name":"outcomeCount","type":"uint8"}],"name":"createCategoricalEvent","outputs":[{"name":"eventContract","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"categoricalEvent","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"oracle","type":"address"},{"indexed":false,"name":"outcomeCount","type":"uint8"}],"name":"CategoricalEventCreation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"scalarEvent","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"oracle","type":"address"},{"indexed":false,"name":"lowerBound","type":"int256"},{"indexed":false,"name":"upperBound","type":"int256"}],"name":"ScalarEventCreation","type":"event"}],"networks":{"1":{"address":"0x5b21ba38a0db91cc43aa7daba778979758e67991","updated_at":1513984936000},"3":{"address":"0xc2803221bf9cb3a245a19bb46727f6d797556dfc","updated_at":1503605014183},"4":{"address":"0x0f60faf69f3ac146e1e557247583bc0c84f9f086","updated_at":1503603856229},"42":{"address":"0x5cfc2409a2d601ad3ac0912de1021ddd0cd3e1dc","updated_at":1503602339883},"437894314312":{"address":"0x67b5656d60a809915323bf2c40a8bef15a152e3e","updated_at":1507361155401}},"schema_version":"0.0.5","updated_at":1543915159063}; +module.exports = {"contractName":"Fixed192x64Math","abi":[{"constant":true,"inputs":[],"name":"LN2","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LOG2_E","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ONE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"}],"name":"exp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"estimationMode","type":"Fixed192x64Math.EstimationMode"}],"name":"pow2","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"}],"name":"pow2Bounds","outputs":[{"name":"lower","type":"uint256"},{"name":"upper","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"ln","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"},{"name":"estimationMode","type":"Fixed192x64Math.EstimationMode"}],"name":"binaryLog","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"log2Bounds","outputs":[{"name":"lower","type":"int256"},{"name":"upper","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"floorLog2","outputs":[{"name":"lo","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"nums","type":"int256[]"}],"name":"max","outputs":[{"name":"maxNum","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"}],"bytecode":"0x610d1c610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106100c6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302780677146100cb578063137bf798146100e95780631427f1681461012a5780631d5801231461016557806324902e24146101a657806324d4e90a146101c457806345b8bafc146101f8578063c12662271461022c578063c2ee3a0814610267578063ccc1381414610285578063e46751e3146102f2575b600080fd5b6100d3610326565b6040518082815260200191505060405180910390f35b61011460048036038101908080359060200190929190803560ff169060200190929190505050610332565b6040518082815260200191505060405180910390f35b610148600480360381019080803590602001909291905050506103d5565b604051808381526020018281526020019250505060405180910390f35b61019060048036038101908080359060200190929190803560ff1690602001909291905050506104c8565b6040518082815260200191505060405180910390f35b6101ae61056b565b6040518082815260200191505060405180910390f35b6101e260048036038101908080359060200190929190505050610578565b6040518082815260200191505060405180910390f35b610216600480360381019080803590602001909291905050506105c3565b6040518082815260200191505060405180910390f35b61024a6004803603810190808035906020019092919050505061067a565b604051808381526020018281526020019250505060405180910390f35b61026f610bbd565b6040518082815260200191505060405180910390f35b6102dc60048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610bca565b6040518082815260200191505060405180910390f35b61031060048036038101908080359060200190929190505050610c5b565b6040518082815260200191505060405180910390f35b67b17217f7d1cf79ac81565b6000806000610340856103d5565b915091506000600281111561035157fe5b84600281111561035d57fe5b141561036b578192506103cd565b6001600281111561037857fe5b84600281111561038457fe5b1415610392578092506103cd565b60028081111561039e57fe5b8460028111156103aa57fe5b14156103c8578160028383038115156103bf57fe5b050192506103cd565b600080fd5b505092915050565b6000806000806000851115156103ea57600080fd5b6103f3856105c3565b9350600084121561040f5783600003859060020a02915061041a565b83859060020a900491505b6801000000000000000084029350600190505b6040811315156104b8576801000000000000000082141561044d576104b8565b6801000000000000000082830281151561046357fe5b04915068010000000000000000600202821015156104ab578068010000000000000000600082121561049157fe5b9060020a9004840193506002828115156104a757fe5b0491505b808060010191505061042d565b8360048501935093505050915091565b60008060006104d68561067a565b91509150600060028111156104e757fe5b8460028111156104f357fe5b141561050157819250610563565b6001600281111561050e57fe5b84600281111561051a57fe5b141561052857809250610563565b60028081111561053457fe5b84600281111561054057fe5b141561055e5781600283830381151561055557fe5b04019250610563565b600080fd5b505092915050565b680171547652b82fe17781565b6000806000610586846103d5565b91509150680171547652b82fe177680100000000000000008360028585038115156105ad57fe5b0501028115156105b957fe5b0592505050919050565b60008060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0925060c1915060018383019060020a900590505b816001840112156106735760008112801561062957506801000000000000000081600003859060020a02105b8061065057506000811215801561064f57506801000000000000000081859060020a9004105b5b1561065d57809150610661565b8092505b60018383019060020a900590506105fd565b5050919050565b60008060008060008068bfffffffffffffffff871315151561069b57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc000000000000000008712156106d6576000600181915080905095509550610bb4565b6000871215156107135768010000000000000000878115156106f457fe5b059350680100000000000000008781151561070b57fe5b079250610741565b6001680100000000000000006001890181151561072c57fe5b05039350836801000000000000000002870392505b6000831215151561074e57fe5b6040680100000000000000009060020a0291508290508067b17217f7d1cf79ab02820191506801000000000000000083820281151561078957fe5b05905060028167f5fdeffc162c7543029060020a900582019150680100000000000000008382028115156107b957fe5b05905060048167e35846b82505fc59029060020a900582019150680100000000000000008382028115156107e957fe5b059050600681679d955b7dd273b94e029060020a9005820191506801000000000000000083820281151561081957fe5b05905060098167aec3ff3c53398883029060020a9005820191506801000000000000000083820281151561084957fe5b059050600c8167a184897c363c3b7a029060020a9005820191506801000000000000000083820281151561087957fe5b05905060108167ffe5fe2c45863435029060020a900582019150680100000000000000008382028115156108a957fe5b05905060138167b160111d2e411fec029060020a900582019150680100000000000000008382028115156108d957fe5b05905060178167da929e9caf3e1ed2029060020a9005820191506801000000000000000083820281151561090957fe5b059050601b8167f267a8ac5c764fb7029060020a9005820191506801000000000000000083820281151561093957fe5b059050601f8167f465639a8dd92607029060020a9005820191506801000000000000000083820281151561096957fe5b05905060238167e1deb287e14c2f15029060020a9005820191506801000000000000000083820281151561099957fe5b05905060278167c0b0c98b3687cb14029060020a900582019150680100000000000000008382028115156109c957fe5b059050602b816798a4b26ac3c54b9f029060020a900582019150680100000000000000008382028115156109f957fe5b05905060308167e1b7421d82010f33029060020a90058201915068010000000000000000838202811515610a2957fe5b059050603481679c744d73cfc59c91029060020a90058201915068010000000000000000838202811515610a5957fe5b05905060398167cc2225a0e12d3eab029060020a90058201915068010000000000000000838202811515610a8957fe5b059050603e8167fb8bb5eda1b4aeb9029060020a900590508082019150680100000000000000006008029050604084039350600084121515610b7b5760008461010003836000821215610ad857fe5b9060020a90051415610b4a5783826000821215610af157fe5b9060020a02955083816000821215610b0557fe5b9060020a02905085818701101515610b21578086019450610b45565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b610bb4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8081915080905095509550610bb4565b600184600003826000821215610b8d57fe5b9060020a900501905083600003826000821215610ba657fe5b9060020a9004955080860194505b50505050915091565b6801000000000000000081565b60008060008351111515610bdd57600080fd5b7f80000000000000000000000000000000000000000000000000000000000000009150600090505b8251811015610c5557818382815181101515610c1d57fe5b906020019060200201511315610c48578281815181101515610c3b57fe5b9060200190602002015191505b8080600101915050610c05565b50919050565b600080600068851591f9dd5b9b40d78413151515610c7857600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffd3a37a020b8c21950d84131515610caa5760009250610ce9565b610cd167b17217f7d1cf79ac680100000000000000008602811515610ccb57fe5b0561067a565b91509150816002838303811515610ce457fe5b040192505b50509190505600a165627a7a72305820cc0c2c6cd58b2bcf001d1f1e4c01f5c9eaa32c8faf012b613903b317bf630b070029","deployedBytecode":"0x73000000000000000000000000000000000000000030146080604052600436106100c6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302780677146100cb578063137bf798146100e95780631427f1681461012a5780631d5801231461016557806324902e24146101a657806324d4e90a146101c457806345b8bafc146101f8578063c12662271461022c578063c2ee3a0814610267578063ccc1381414610285578063e46751e3146102f2575b600080fd5b6100d3610326565b6040518082815260200191505060405180910390f35b61011460048036038101908080359060200190929190803560ff169060200190929190505050610332565b6040518082815260200191505060405180910390f35b610148600480360381019080803590602001909291905050506103d5565b604051808381526020018281526020019250505060405180910390f35b61019060048036038101908080359060200190929190803560ff1690602001909291905050506104c8565b6040518082815260200191505060405180910390f35b6101ae61056b565b6040518082815260200191505060405180910390f35b6101e260048036038101908080359060200190929190505050610578565b6040518082815260200191505060405180910390f35b610216600480360381019080803590602001909291905050506105c3565b6040518082815260200191505060405180910390f35b61024a6004803603810190808035906020019092919050505061067a565b604051808381526020018281526020019250505060405180910390f35b61026f610bbd565b6040518082815260200191505060405180910390f35b6102dc60048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610bca565b6040518082815260200191505060405180910390f35b61031060048036038101908080359060200190929190505050610c5b565b6040518082815260200191505060405180910390f35b67b17217f7d1cf79ac81565b6000806000610340856103d5565b915091506000600281111561035157fe5b84600281111561035d57fe5b141561036b578192506103cd565b6001600281111561037857fe5b84600281111561038457fe5b1415610392578092506103cd565b60028081111561039e57fe5b8460028111156103aa57fe5b14156103c8578160028383038115156103bf57fe5b050192506103cd565b600080fd5b505092915050565b6000806000806000851115156103ea57600080fd5b6103f3856105c3565b9350600084121561040f5783600003859060020a02915061041a565b83859060020a900491505b6801000000000000000084029350600190505b6040811315156104b8576801000000000000000082141561044d576104b8565b6801000000000000000082830281151561046357fe5b04915068010000000000000000600202821015156104ab578068010000000000000000600082121561049157fe5b9060020a9004840193506002828115156104a757fe5b0491505b808060010191505061042d565b8360048501935093505050915091565b60008060006104d68561067a565b91509150600060028111156104e757fe5b8460028111156104f357fe5b141561050157819250610563565b6001600281111561050e57fe5b84600281111561051a57fe5b141561052857809250610563565b60028081111561053457fe5b84600281111561054057fe5b141561055e5781600283830381151561055557fe5b04019250610563565b600080fd5b505092915050565b680171547652b82fe17781565b6000806000610586846103d5565b91509150680171547652b82fe177680100000000000000008360028585038115156105ad57fe5b0501028115156105b957fe5b0592505050919050565b60008060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0925060c1915060018383019060020a900590505b816001840112156106735760008112801561062957506801000000000000000081600003859060020a02105b8061065057506000811215801561064f57506801000000000000000081859060020a9004105b5b1561065d57809150610661565b8092505b60018383019060020a900590506105fd565b5050919050565b60008060008060008068bfffffffffffffffff871315151561069b57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc000000000000000008712156106d6576000600181915080905095509550610bb4565b6000871215156107135768010000000000000000878115156106f457fe5b059350680100000000000000008781151561070b57fe5b079250610741565b6001680100000000000000006001890181151561072c57fe5b05039350836801000000000000000002870392505b6000831215151561074e57fe5b6040680100000000000000009060020a0291508290508067b17217f7d1cf79ab02820191506801000000000000000083820281151561078957fe5b05905060028167f5fdeffc162c7543029060020a900582019150680100000000000000008382028115156107b957fe5b05905060048167e35846b82505fc59029060020a900582019150680100000000000000008382028115156107e957fe5b059050600681679d955b7dd273b94e029060020a9005820191506801000000000000000083820281151561081957fe5b05905060098167aec3ff3c53398883029060020a9005820191506801000000000000000083820281151561084957fe5b059050600c8167a184897c363c3b7a029060020a9005820191506801000000000000000083820281151561087957fe5b05905060108167ffe5fe2c45863435029060020a900582019150680100000000000000008382028115156108a957fe5b05905060138167b160111d2e411fec029060020a900582019150680100000000000000008382028115156108d957fe5b05905060178167da929e9caf3e1ed2029060020a9005820191506801000000000000000083820281151561090957fe5b059050601b8167f267a8ac5c764fb7029060020a9005820191506801000000000000000083820281151561093957fe5b059050601f8167f465639a8dd92607029060020a9005820191506801000000000000000083820281151561096957fe5b05905060238167e1deb287e14c2f15029060020a9005820191506801000000000000000083820281151561099957fe5b05905060278167c0b0c98b3687cb14029060020a900582019150680100000000000000008382028115156109c957fe5b059050602b816798a4b26ac3c54b9f029060020a900582019150680100000000000000008382028115156109f957fe5b05905060308167e1b7421d82010f33029060020a90058201915068010000000000000000838202811515610a2957fe5b059050603481679c744d73cfc59c91029060020a90058201915068010000000000000000838202811515610a5957fe5b05905060398167cc2225a0e12d3eab029060020a90058201915068010000000000000000838202811515610a8957fe5b059050603e8167fb8bb5eda1b4aeb9029060020a900590508082019150680100000000000000006008029050604084039350600084121515610b7b5760008461010003836000821215610ad857fe5b9060020a90051415610b4a5783826000821215610af157fe5b9060020a02955083816000821215610b0557fe5b9060020a02905085818701101515610b21578086019450610b45565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b610bb4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8081915080905095509550610bb4565b600184600003826000821215610b8d57fe5b9060020a900501905083600003826000821215610ba657fe5b9060020a9004955080860194505b50505050915091565b6801000000000000000081565b60008060008351111515610bdd57600080fd5b7f80000000000000000000000000000000000000000000000000000000000000009150600090505b8251811015610c5557818382815181101515610c1d57fe5b906020019060200201511315610c48578281815181101515610c3b57fe5b9060200190602002015191505b8080600101915050610c05565b50919050565b600080600068851591f9dd5b9b40d78413151515610c7857600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffd3a37a020b8c21950d84131515610caa5760009250610ce9565b610cd167b17217f7d1cf79ac680100000000000000008602811515610ccb57fe5b0561067a565b91509150816002838303811515610ce457fe5b040192505b50509190505600a165627a7a72305820cc0c2c6cd58b2bcf001d1f1e4c01f5c9eaa32c8faf012b613903b317bf630b070029","sourceMap":"213:8767:28:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24","deployedSourceMap":"213:8767:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;438:45;;;;;;;;;;;;;;;;;;;;;;;6479:487;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7242:744;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1500:484;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;489:49;;;;;;;;;;;;;;;;;;;;;;;6022:200;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8100:488;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2226:3693;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;385:47;;;;;;;;;;;;;;;;;;;;;;;8710:268;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:577;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;438:45;465:18;438:45;:::o;6479:487::-;6582:3;6602:9;6613;6626:13;6637:1;6626:10;:13::i;:::-;6601:38;;;;6670:25;6652:43;;;;;;;;:14;:43;;;;;;;;;6649:85;;;6718:5;6711:12;;;;6649:85;6764:25;6746:43;;;;;;;;:14;:43;;;;;;;;;6743:85;;;6812:5;6805:12;;;;6743:85;6858:23;6840:41;;;;;;;;:14;:41;;;;;;;;;6837:105;;;6926:5;6922:1;6913:5;6905;:13;6904:19;;;;;;;;:27;6897:34;;;;6837:105;6951:8;;;6479:487;;;;;;;:::o;7242:744::-;7315:9;7326;7439:6;7706:5;7363:1;7359;:5;7351:14;;;;;;;;7416:12;7426:1;7416:9;:12::i;:::-;7408:20;;7467:1;7459:5;:9;7455:95;;;7497:5;7496:6;;7486:1;:17;;;;7482:21;;7455:95;;;7544:5;7534:1;:16;;;;;7530:20;;7455:95;413:19;7561:17;;;;7714:1;7706:9;;7701:243;7722:2;7717:1;:7;;7701:243;;;413:19;7748:1;:8;7745:51;;;7776:5;;7745:51;413:19;7817:1;7813;:5;:11;;;;;;;;7809:15;;413:19;7846:1;:7;7841:1;:12;;7838:96;;;7893:1;413:19;7886:8;;;;;;;;;;;;;7873:22;;;;7918:1;7913:6;;;;;;;;;;;7838:96;7726:3;;;;;;;7701:243;;;7962:5;7977:1;7969:5;:9;7954:25;;;;7242:744;;;;;:::o;1500:484::-;1597:4;1618:10;1630;1644:13;1655:1;1644:10;:13::i;:::-;1617:40;;;;1688:25;1670:43;;;;;;;;:14;:43;;;;;;;;;1667:85;;;1736:5;1729:12;;;;1667:85;1782:25;1764:43;;;;;;;;:14;:43;;;;;;;;;1761:85;;;1830:5;1823:12;;;;1761:85;1876:23;1858:41;;;;;;;;:14;:41;;;;;;;;;1855:105;;;1944:5;1940:1;1931:5;1923;:13;1922:19;;;;;;;;:27;1915:34;;;;1855:105;1969:8;;;1500:484;;;;;;;:::o;489:49::-;519:19;489:49;:::o;6022:200::-;6087:3;6107:9;6118;6131:13;6142:1;6131:10;:13::i;:::-;6106:38;;;;519:19;413;6184:5;6180:1;6171:5;6163;:13;6162:19;;;;;;;;:27;6161:40;:54;;;;;;;;6154:61;;6022:200;;;;;:::o;8100:488::-;8172:6;8212;8327:7;8199:3;8194:8;;8221:3;8212:12;;8350:1;8343:2;8338;:7;8337:14;;;;;8327:24;;8361:221;8378:2;8373:1;8368:2;:6;8367:13;8361:221;;;8406:1;8400:3;:7;:32;;;;;413:19;8422:3;8421:4;;8411:1;:15;;;;:21;8400:32;:68;;;;8443:1;8436:3;:8;;:32;;;;;413:19;8458:3;8448:1;:14;;;;;:20;8436:32;8400:68;8396:141;;;8491:3;8486:8;;8396:141;;;8534:3;8529:8;;8396:141;8570:1;8563:2;8558;:7;8557:14;;;;;8551:20;;8361:221;;;8100:488;;;;;:::o;2226:3693::-;2298:10;2310;2850:9;2869:5;3569:10;3606:8;2471:22;2466:1;:27;;2458:36;;;;;;;;2625:23;2621:1;:27;2617:58;;;2670:1;2673;2662:13;;;;;;;;;;;;2617:58;2893:1;2888;:6;;2884:194;;;413:19;2918:1;:12;;;;;;;;2910:20;;413:19;2948:1;:12;;;;;;;;2944:16;;2884:194;;;3026:1;413:19;3010:1;3008;:3;3007:16;;;;;;;;:20;2999:28;;3061:5;413:19;3050:16;3045:1;:22;3041:26;;2884:194;3099:1;3094;:6;;3087:14;;;;;;3594:2;413:19;3582:14;;;;3569:27;;3617:1;3606:12;;3659:4;3638:18;:25;3628:35;;;;413:19;3687:1;3680:4;:8;:19;;;;;;;;3673:26;;3749:7;3740:4;3719:18;:25;:38;;;;;3709:48;;;;413:19;3781:1;3774:4;:8;:19;;;;;;;;3767:26;;3843:7;3834:4;3813:18;:25;:38;;;;;3803:48;;;;413:19;3875:1;3868:4;:8;:19;;;;;;;;3861:26;;3937:7;3928:4;3907:18;:25;:38;;;;;3897:48;;;;413:19;3969:1;3962:4;:8;:19;;;;;;;;3955:26;;4031:7;4022:4;4001:18;:25;:38;;;;;3991:48;;;;413:19;4063:1;4056:4;:8;:19;;;;;;;;4049:26;;4125:7;4116:4;4095:18;:25;:38;;;;;4085:48;;;;413:19;4157:1;4150:4;:8;:19;;;;;;;;4143:26;;4219:7;4210:4;4189:18;:25;:38;;;;;4179:48;;;;413:19;4251:1;4244:4;:8;:19;;;;;;;;4237:26;;4313:7;4304:4;4283:18;:25;:38;;;;;4273:48;;;;413:19;4345:1;4338:4;:8;:19;;;;;;;;4331:26;;4407:7;4398:4;4377:18;:25;:38;;;;;4367:48;;;;413:19;4439:1;4432:4;:8;:19;;;;;;;;4425:26;;4501:7;4492:4;4471:18;:25;:38;;;;;4461:48;;;;413:19;4533:1;4526:4;:8;:19;;;;;;;;4519:26;;4595:7;4586:4;4565:18;:25;:38;;;;;4555:48;;;;413:19;4627:1;4620:4;:8;:19;;;;;;;;4613:26;;4689:7;4680:4;4659:18;:25;:38;;;;;4649:48;;;;413:19;4721:1;4714:4;:8;:19;;;;;;;;4707:26;;4783:8;4774:4;4753:18;:25;:39;;;;;4743:49;;;;413:19;4816:1;4809:4;:8;:19;;;;;;;;4802:26;;4878:8;4869:4;4848:18;:25;:39;;;;;4838:49;;;;413:19;4911:1;4904:4;:8;:19;;;;;;;;4897:26;;4973:8;4964:4;4943:18;:25;:39;;;;;4933:49;;;;413:19;5006:1;4999:4;:8;:19;;;;;;;;4992:26;;5068:8;5059:4;5038:18;:25;:39;;;;;5028:49;;;;413:19;5101:1;5094:4;:8;:19;;;;;;;;5087:26;;5163:8;5154:4;5133:18;:25;:39;;;;;5123:49;;;;413:19;5196:1;5189:4;:8;:19;;;;;;;;5182:26;;5255:8;5246:4;5225:18;:25;:39;;;;;5218:46;;5284:4;5274:14;;;;413:19;5309:1;:7;5298:19;;5337:2;5328:11;;;;5362:1;5353:5;:10;;5349:431;;;5408:1;5398:5;5394:3;:9;5383:6;:21;;;;;;;;;;;;;:26;5379:390;;;5453:5;5442:6;5437:21;;;;;;;;;;;;5429:29;;5485:5;5476:14;;;;;;;;;;;;;;;5557:5;5548:4;5535:5;:18;:27;;5531:138;;;5605:4;5592:5;:18;5584:26;;5531:138;;;5661:8;5653:16;;5531:138;5687:7;;5379:390;5750:8;5760;5742:27;;;;;;;;;;;;5349:431;5817:1;5807:5;5806:6;;5797:4;:16;;;;;;;;;;;;;5796:22;5789:29;;5854:5;5853:6;;5841;5836:24;;;;;;;;;;;;;5828:32;;5891:4;5878:5;:18;5870:26;;2226:3693;;;;;;;;:::o;385:47::-;413:19;385:47;:::o;8710:268::-;8780:10;8871:6;8828:1;8814:4;:11;:15;8806:24;;;;;;;;8849:7;8840:16;;8880:1;8871:10;;8866:105;8887:4;:11;8883:1;:15;8866:105;;;8931:6;8921:4;8926:1;8921:7;;;;;;;;;;;;;;;;;;:16;8917:54;;;8964:4;8969:1;8964:7;;;;;;;;;;;;;;;;;;8955:16;;8917:54;8900:3;;;;;;;8866:105;;;8710:268;;;;:::o;692:577::-;757:4;1157:10;1169;909:22;904:1;:27;;896:36;;;;;;;;1061:22;1056:1;:27;;1052:53;;;1104:1;1097:8;;;;1052:53;1183:35;465:18;413:19;1194:1;:12;:23;;;;;;;;1183:10;:35::i;:::-;1156:62;;;;1257:5;1253:1;1244:5;1236;:13;1235:19;;;;;;;;:27;1228:34;;692:577;;;;;;:::o","source":"pragma solidity ^0.4.24;\n\n\n/// @title Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\n/// @author Alan Lu - \n/// @author Stefan George - \nlibrary Fixed192x64Math {\n\n enum EstimationMode { LowerBound, UpperBound, Midpoint }\n\n /*\n * Constants\n */\n // This is equal to 1 in our calculations\n uint public constant ONE = 0x10000000000000000;\n uint public constant LN2 = 0xb17217f7d1cf79ac;\n uint public constant LOG2_E = 0x171547652b82fe177;\n\n /*\n * Public functions\n */\n /// @dev Returns natural exponential function value of given x\n /// @param x x\n /// @return e**x\n function exp(int x)\n public\n pure\n returns (uint)\n {\n // revert if x is > MAX_POWER, where\n // MAX_POWER = int(mp.floor(mp.log(mpf(2**256 - 1) / ONE) * ONE))\n require(x <= 2454971259878909886679);\n // return 0 if exp(x) is tiny, using\n // MIN_POWER = int(mp.floor(mp.log(mpf(1) / ONE) * ONE))\n if (x <= -818323753292969962227)\n return 0;\n\n // Transform so that e^x -> 2^x\n (uint lower, uint upper) = pow2Bounds(x * int(ONE) / int(LN2));\n return (upper - lower) / 2 + lower;\n }\n\n /// @dev Returns estimate of 2**x given x\n /// @param x exponent in fixed point\n /// @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n /// @return estimate of 2**x in fixed point\n function pow2(int x, EstimationMode estimationMode)\n public\n pure\n returns (uint)\n {\n (uint lower, uint upper) = pow2Bounds(x);\n if(estimationMode == EstimationMode.LowerBound) {\n return lower;\n }\n if(estimationMode == EstimationMode.UpperBound) {\n return upper;\n }\n if(estimationMode == EstimationMode.Midpoint) {\n return (upper - lower) / 2 + lower;\n }\n revert();\n }\n\n /// @dev Returns bounds for value of 2**x given x\n /// @param x exponent in fixed point\n /// @return {\n /// \"lower\": \"lower bound of 2**x in fixed point\",\n /// \"upper\": \"upper bound of 2**x in fixed point\"\n /// }\n function pow2Bounds(int x)\n public\n pure\n returns (uint lower, uint upper)\n {\n // revert if x is > MAX_POWER, where\n // MAX_POWER = int(mp.floor(mp.log(mpf(2**256 - 1) / ONE, 2) * ONE))\n require(x <= 3541774862152233910271);\n // return 0 if exp(x) is tiny, using\n // MIN_POWER = int(mp.floor(mp.log(mpf(1) / ONE, 2) * ONE))\n if (x < -1180591620717411303424)\n return (0, 1);\n\n // 2^x = 2^(floor(x)) * 2^(x-floor(x))\n // ^^^^^^^^^^^^^^ is a bit shift of ceil(x)\n // so Taylor expand on z = x-floor(x), z in [0, 1)\n int shift;\n int z;\n if (x >= 0) {\n shift = x / int(ONE);\n z = x % int(ONE);\n }\n else {\n shift = (x+1) / int(ONE) - 1;\n z = x - (int(ONE) * shift);\n }\n assert(z >= 0);\n // 2^x = 1 + (ln 2) x + (ln 2)^2/2! x^2 + ...\n //\n // Can generate the z coefficients using mpmath and the following lines\n // >>> from mpmath import mp\n // >>> mp.dps = 100\n // >>> coeffs = [mp.log(2)**i / mp.factorial(i) for i in range(1, 21)]\n // >>> shifts = [64 - int(mp.log(c, 2)) for c in coeffs]\n // >>> print('\\n'.join(hex(int(c * (1 << s))) + ', ' + str(s) for c, s in zip(coeffs, shifts)))\n int result = int(ONE) << 64;\n int zpow = z;\n result += 0xb17217f7d1cf79ab * zpow;\n zpow = zpow * z / int(ONE);\n result += 0xf5fdeffc162c7543 * zpow >> (66 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe35846b82505fc59 * zpow >> (68 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x9d955b7dd273b94e * zpow >> (70 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xaec3ff3c53398883 * zpow >> (73 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xa184897c363c3b7a * zpow >> (76 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xffe5fe2c45863435 * zpow >> (80 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xb160111d2e411fec * zpow >> (83 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xda929e9caf3e1ed2 * zpow >> (87 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xf267a8ac5c764fb7 * zpow >> (91 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xf465639a8dd92607 * zpow >> (95 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe1deb287e14c2f15 * zpow >> (99 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xc0b0c98b3687cb14 * zpow >> (103 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x98a4b26ac3c54b9f * zpow >> (107 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe1b7421d82010f33 * zpow >> (112 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x9c744d73cfc59c91 * zpow >> (116 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xcc2225a0e12d3eab * zpow >> (121 - 64);\n zpow = zpow * z / int(ONE);\n zpow = 0xfb8bb5eda1b4aeb9 * zpow >> (126 - 64);\n result += zpow;\n zpow = int(8 * ONE);\n\n shift -= 64;\n if (shift >= 0) {\n if (result >> (256-shift) == 0) {\n lower = uint(result) << shift;\n zpow <<= shift; // todo: is this safe?\n if (lower + uint(zpow) >= lower)\n upper = lower + uint(zpow);\n else\n upper = 2**256-1;\n return;\n }\n else\n return (2**256-1, 2**256-1);\n }\n zpow = (zpow >> (-shift)) + 1;\n lower = uint(result) >> (-shift);\n upper = lower + uint(zpow);\n return;\n }\n\n /// @dev Returns natural logarithm value of given x\n /// @param x x\n /// @return ln(x)\n function ln(uint x)\n public\n pure\n returns (int)\n {\n (int lower, int upper) = log2Bounds(x);\n return ((upper - lower) / 2 + lower) * int(ONE) / int(LOG2_E);\n }\n\n /// @dev Returns estimate of binaryLog(x) given x\n /// @param x logarithm argument in fixed point\n /// @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n /// @return estimate of binaryLog(x) in fixed point\n function binaryLog(uint x, EstimationMode estimationMode)\n public\n pure\n returns (int)\n {\n (int lower, int upper) = log2Bounds(x);\n if(estimationMode == EstimationMode.LowerBound) {\n return lower;\n }\n if(estimationMode == EstimationMode.UpperBound) {\n return upper;\n }\n if(estimationMode == EstimationMode.Midpoint) {\n return (upper - lower) / 2 + lower;\n }\n revert();\n }\n\n /// @dev Returns bounds for value of binaryLog(x) given x\n /// @param x logarithm argument in fixed point\n /// @return {\n /// \"lower\": \"lower bound of binaryLog(x) in fixed point\",\n /// \"upper\": \"upper bound of binaryLog(x) in fixed point\"\n /// }\n function log2Bounds(uint x)\n public\n pure\n returns (int lower, int upper)\n {\n require(x > 0);\n // compute ⌊log₂x⌋\n lower = floorLog2(x);\n\n uint y;\n if (lower < 0)\n y = x << uint(-lower);\n else\n y = x >> uint(lower);\n\n lower *= int(ONE);\n\n // y = x * 2^(-⌊log₂x⌋)\n // so 1 <= y < 2\n // and log₂x = ⌊log₂x⌋ + log₂y\n for (int m = 1; m <= 64; m++) {\n if(y == ONE) {\n break;\n }\n y = y * y / ONE;\n if(y >= 2 * ONE) {\n lower += int(ONE >> m);\n y /= 2;\n }\n }\n\n return (lower, lower + 4);\n }\n\n /// @dev Returns base 2 logarithm value of given x\n /// @param x x\n /// @return logarithmic value\n function floorLog2(uint x)\n public\n pure\n returns (int lo)\n {\n lo = -64;\n int hi = 193;\n // I use a shift here instead of / 2 because it floors instead of rounding towards 0\n int mid = (hi + lo) >> 1;\n while((lo + 1) < hi) {\n if (mid < 0 && x << uint(-mid) < ONE || mid >= 0 && x >> uint(mid) < ONE)\n hi = mid;\n else\n lo = mid;\n mid = (hi + lo) >> 1;\n }\n }\n\n /// @dev Returns maximum of an array\n /// @param nums Numbers to look through\n /// @return Maximum number\n function max(int[] nums)\n public\n pure\n returns (int maxNum)\n {\n require(nums.length > 0);\n maxNum = -2**255;\n for (uint i = 0; i < nums.length; i++)\n if (nums[i] > maxNum)\n maxNum = nums[i];\n }\n}\n","sourcePath":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","ast":{"absolutePath":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","exportedSymbols":{"Fixed192x64Math":[6668]},"id":6669,"nodeType":"SourceUnit","nodes":[{"id":5676,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:28"},{"baseContracts":[],"contractDependencies":[],"contractKind":"library","documentation":"@title Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - \n @author Stefan George - ","fullyImplemented":true,"id":6668,"linearizedBaseContracts":[6668],"name":"Fixed192x64Math","nodeType":"ContractDefinition","nodes":[{"canonicalName":"Fixed192x64Math.EstimationMode","id":5680,"members":[{"id":5677,"name":"LowerBound","nodeType":"EnumValue","src":"266:10:28"},{"id":5678,"name":"UpperBound","nodeType":"EnumValue","src":"278:10:28"},{"id":5679,"name":"Midpoint","nodeType":"EnumValue","src":"290:8:28"}],"name":"EstimationMode","nodeType":"EnumDefinition","src":"244:56:28"},{"constant":true,"id":5683,"name":"ONE","nodeType":"VariableDeclaration","scope":6668,"src":"385:47:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5681,"name":"uint","nodeType":"ElementaryTypeName","src":"385:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":5682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"413:19:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"public"},{"constant":true,"id":5686,"name":"LN2","nodeType":"VariableDeclaration","scope":6668,"src":"438:45:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5684,"name":"uint","nodeType":"ElementaryTypeName","src":"438:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"307862313732313766376431636637396163","id":5685,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"465:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12786308645202655660_by_1","typeString":"int_const 12786308645202655660"},"value":"0xb17217f7d1cf79ac"},"visibility":"public"},{"constant":true,"id":5689,"name":"LOG2_E","nodeType":"VariableDeclaration","scope":6668,"src":"489:49:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5687,"name":"uint","nodeType":"ElementaryTypeName","src":"489:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783137313534373635326238326665313737","id":5688,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"519:19:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_26613026195688644983_by_1","typeString":"int_const 26613026195688644983"},"value":"0x171547652b82fe177"},"visibility":"public"},{"body":{"id":5734,"nodeType":"Block","src":"767:502:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5699,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5697,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"904:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"32343534393731323539383738393039383836363739","id":5698,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"909:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2454971259878909886679_by_1","typeString":"int_const 2454971259878909886679"},"value":"2454971259878909886679"},"src":"904:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5696,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"896:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5700,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"896:36:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5701,"nodeType":"ExpressionStatement","src":"896:36:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5705,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5702,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"1056:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":5704,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"1061:22:28","subExpression":{"argumentTypes":null,"hexValue":"383138333233373533323932393639393632323237","id":5703,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1062:21:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_818323753292969962227_by_1","typeString":"int_const 818323753292969962227"},"value":"818323753292969962227"},"typeDescriptions":{"typeIdentifier":"t_rational_-818323753292969962227_by_1","typeString":"int_const -818323753292969962227"}},"src":"1056:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5708,"nodeType":"IfStatement","src":"1052:53:28","trueBody":{"expression":{"argumentTypes":null,"hexValue":"30","id":5706,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1104:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"functionReturnParameters":5695,"id":5707,"nodeType":"Return","src":"1097:8:28"}},{"assignments":[5710,5712],"declarations":[{"constant":false,"id":5710,"name":"lower","nodeType":"VariableDeclaration","scope":5735,"src":"1157:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5709,"name":"uint","nodeType":"ElementaryTypeName","src":"1157:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5712,"name":"upper","nodeType":"VariableDeclaration","scope":5735,"src":"1169:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5711,"name":"uint","nodeType":"ElementaryTypeName","src":"1169:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5724,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5718,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5714,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"1194:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5716,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"1202:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5715,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1198:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5717,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1198:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1194:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5720,"name":"LN2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5686,"src":"1213:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5719,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1209:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5721,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1209:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1194:23:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5713,"name":"pow2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6355,"src":"1183:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$returns$_t_uint256_$_t_uint256_$","typeString":"function (int256) pure returns (uint256,uint256)"}},"id":5723,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1183:35:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"1156:62:28"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5732,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5730,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5727,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5725,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5712,"src":"1236:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":5726,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5710,"src":"1244:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1236:13:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5728,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1235:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5729,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1253:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1235:19:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":5731,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5710,"src":"1257:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1235:27:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5695,"id":5733,"nodeType":"Return","src":"1228:34:28"}]},"documentation":"@dev Returns natural exponential function value of given x\n @param x x\n @return e**x","id":5735,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"exp","nodeType":"FunctionDefinition","parameters":{"id":5692,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5691,"name":"x","nodeType":"VariableDeclaration","scope":5735,"src":"705:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5690,"name":"int","nodeType":"ElementaryTypeName","src":"705:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"704:7:28"},"payable":false,"returnParameters":{"id":5695,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5694,"name":"","nodeType":"VariableDeclaration","scope":5735,"src":"757:4:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5693,"name":"uint","nodeType":"ElementaryTypeName","src":"757:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"756:6:28"},"scope":6668,"src":"692:577:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":5786,"nodeType":"Block","src":"1607:377:28","statements":[{"assignments":[5745,5747],"declarations":[{"constant":false,"id":5745,"name":"lower","nodeType":"VariableDeclaration","scope":5787,"src":"1618:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5744,"name":"uint","nodeType":"ElementaryTypeName","src":"1618:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5747,"name":"upper","nodeType":"VariableDeclaration","scope":5787,"src":"1630:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5746,"name":"uint","nodeType":"ElementaryTypeName","src":"1630:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5751,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5749,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5737,"src":"1655:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5748,"name":"pow2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6355,"src":"1644:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$returns$_t_uint256_$_t_uint256_$","typeString":"function (int256) pure returns (uint256,uint256)"}},"id":5750,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1644:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"1617:40:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5755,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5752,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1670:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5753,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1688:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5754,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1688:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1670:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5759,"nodeType":"IfStatement","src":"1667:85:28","trueBody":{"id":5758,"nodeType":"Block","src":"1715:37:28","statements":[{"expression":{"argumentTypes":null,"id":5756,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1736:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5757,"nodeType":"Return","src":"1729:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5763,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5760,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1764:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5761,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1782:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5762,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1782:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1764:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5767,"nodeType":"IfStatement","src":"1761:85:28","trueBody":{"id":5766,"nodeType":"Block","src":"1809:37:28","statements":[{"expression":{"argumentTypes":null,"id":5764,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5747,"src":"1830:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5765,"nodeType":"Return","src":"1823:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5768,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1858:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5769,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1876:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5770,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1876:23:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1858:41:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5782,"nodeType":"IfStatement","src":"1855:105:28","trueBody":{"id":5781,"nodeType":"Block","src":"1901:59:28","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5777,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5772,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5747,"src":"1923:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":5773,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1931:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1923:13:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5775,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1922:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5776,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1940:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1922:19:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":5778,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1944:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1922:27:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5780,"nodeType":"Return","src":"1915:34:28"}]}},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5783,"name":"revert","nodeType":"Identifier","overloadedDeclarations":[7627,7628],"referencedDeclaration":7627,"src":"1969:6:28","typeDescriptions":{"typeIdentifier":"t_function_revert_pure$__$returns$__$","typeString":"function () pure"}},"id":5784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1969:8:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5785,"nodeType":"ExpressionStatement","src":"1969:8:28"}]},"documentation":"@dev Returns estimate of 2**x given x\n @param x exponent in fixed point\n @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n @return estimate of 2**x in fixed point","id":5787,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"pow2","nodeType":"FunctionDefinition","parameters":{"id":5740,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5737,"name":"x","nodeType":"VariableDeclaration","scope":5787,"src":"1514:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5736,"name":"int","nodeType":"ElementaryTypeName","src":"1514:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5739,"name":"estimationMode","nodeType":"VariableDeclaration","scope":5787,"src":"1521:29:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":5738,"name":"EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"1521:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"1513:38:28"},"payable":false,"returnParameters":{"id":5743,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5742,"name":"","nodeType":"VariableDeclaration","scope":5787,"src":"1597:4:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5741,"name":"uint","nodeType":"ElementaryTypeName","src":"1597:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1596:6:28"},"scope":6668,"src":"1500:484:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6354,"nodeType":"Block","src":"2326:3593:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5799,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5797,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2466:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"33353431373734383632313532323333393130323731","id":5798,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2471:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3541774862152233910271_by_1","typeString":"int_const 3541774862152233910271"},"value":"3541774862152233910271"},"src":"2466:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5796,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2458:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5800,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2458:36:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5801,"nodeType":"ExpressionStatement","src":"2458:36:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5805,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5802,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2621:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":5804,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"2625:23:28","subExpression":{"argumentTypes":null,"hexValue":"31313830353931363230373137343131333033343234","id":5803,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2626:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1180591620717411303424_by_1","typeString":"int_const 1180591620717411303424"},"value":"1180591620717411303424"},"typeDescriptions":{"typeIdentifier":"t_rational_-1180591620717411303424_by_1","typeString":"int_const -1180591620717411303424"}},"src":"2621:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5810,"nodeType":"IfStatement","src":"2617:58:28","trueBody":{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"hexValue":"30","id":5806,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2670:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"argumentTypes":null,"hexValue":"31","id":5807,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2673:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"id":5808,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"2669:6:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_0_by_1_$_t_rational_1_by_1_$","typeString":"tuple(int_const 0,int_const 1)"}},"functionReturnParameters":5795,"id":5809,"nodeType":"Return","src":"2662:13:28"}},{"assignments":[],"declarations":[{"constant":false,"id":5812,"name":"shift","nodeType":"VariableDeclaration","scope":6355,"src":"2850:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5811,"name":"int","nodeType":"ElementaryTypeName","src":"2850:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5813,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2850:9:28"},{"assignments":[],"declarations":[{"constant":false,"id":5815,"name":"z","nodeType":"VariableDeclaration","scope":6355,"src":"2869:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5814,"name":"int","nodeType":"ElementaryTypeName","src":"2869:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5816,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2869:5:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5819,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5817,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2888:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5818,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2893:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2888:6:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":5861,"nodeType":"Block","src":"2985:93:28","statements":[{"expression":{"argumentTypes":null,"id":5848,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5837,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"2999:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5845,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5840,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5838,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"3008:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":5839,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3010:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3008:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":5841,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3007:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5843,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3019:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5842,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3015:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5844,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3015:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3007:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":5846,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3026:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3007:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2999:28:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5849,"nodeType":"ExpressionStatement","src":"2999:28:28"},{"expression":{"argumentTypes":null,"id":5859,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5850,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3041:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5851,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"3045:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5853,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3054:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5852,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3050:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5854,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3050:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5855,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"3061:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3050:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":5857,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3049:18:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3045:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3041:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5860,"nodeType":"ExpressionStatement","src":"3041:26:28"}]},"id":5862,"nodeType":"IfStatement","src":"2884:194:28","trueBody":{"id":5836,"nodeType":"Block","src":"2896:75:28","statements":[{"expression":{"argumentTypes":null,"id":5826,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5820,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"2910:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5825,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5821,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2918:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5823,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"2926:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5822,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2922:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5824,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2922:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2918:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2910:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5827,"nodeType":"ExpressionStatement","src":"2910:20:28"},{"expression":{"argumentTypes":null,"id":5834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5828,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"2944:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5833,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5829,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2948:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5831,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"2956:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2952:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5832,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2952:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2948:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2944:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5835,"nodeType":"ExpressionStatement","src":"2944:16:28"}]}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5866,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5864,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3094:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5865,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3099:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3094:6:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5863,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"3087:6:28","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3087:14:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5868,"nodeType":"ExpressionStatement","src":"3087:14:28"},{"assignments":[5870],"declarations":[{"constant":false,"id":5870,"name":"result","nodeType":"VariableDeclaration","scope":6355,"src":"3569:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5869,"name":"int","nodeType":"ElementaryTypeName","src":"3569:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5876,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5875,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5872,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3586:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5871,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3582:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5873,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3582:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5874,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3594:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3582:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3569:27:28"},{"assignments":[5878],"declarations":[{"constant":false,"id":5878,"name":"zpow","nodeType":"VariableDeclaration","scope":6355,"src":"3606:8:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5877,"name":"int","nodeType":"ElementaryTypeName","src":"3606:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5880,"initialValue":{"argumentTypes":null,"id":5879,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3617:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3606:12:28"},{"expression":{"argumentTypes":null,"id":5885,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5881,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3628:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5884,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307862313732313766376431636637396162","id":5882,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3638:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12786308645202655659_by_1","typeString":"int_const 12786308645202655659"},"value":"0xb17217f7d1cf79ab"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5883,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3659:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3638:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3628:35:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5886,"nodeType":"ExpressionStatement","src":"3628:35:28"},{"expression":{"argumentTypes":null,"id":5895,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5887,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3673:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5890,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5888,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3680:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5889,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3687:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3680:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5892,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3695:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5891,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3691:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5893,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3691:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3680:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3673:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5896,"nodeType":"ExpressionStatement","src":"3673:26:28"},{"expression":{"argumentTypes":null,"id":5906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5897,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3709:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5905,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5900,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866356664656666633136326337353433","id":5898,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3719:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17725587574382949699_by_1","typeString":"int_const 17725587574382949699"},"value":"0xf5fdeffc162c7543"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5899,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3740:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3719:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"id":5903,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3636","id":5901,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3749:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_66_by_1","typeString":"int_const 66"},"value":"66"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5902,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3754:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3749:7:28","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"}}],"id":5904,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3748:9:28","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"}},"src":"3719:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3709:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5907,"nodeType":"ExpressionStatement","src":"3709:48:28"},{"expression":{"argumentTypes":null,"id":5916,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5908,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3767:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5911,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5909,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3774:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5910,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3781:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3774:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5913,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3789:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5912,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3785:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5914,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3785:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3774:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3767:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5917,"nodeType":"ExpressionStatement","src":"3767:26:28"},{"expression":{"argumentTypes":null,"id":5927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5918,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3803:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5926,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5921,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865333538343662383235303566633539","id":5919,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3813:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16381921401269255257_by_1","typeString":"int_const 16381921401269255257"},"value":"0xe35846b82505fc59"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5920,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3834:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3813:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"id":5924,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3638","id":5922,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3843:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_68_by_1","typeString":"int_const 68"},"value":"68"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5923,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3848:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3843:7:28","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"}}],"id":5925,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3842:9:28","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"}},"src":"3813:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3803:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5928,"nodeType":"ExpressionStatement","src":"3803:48:28"},{"expression":{"argumentTypes":null,"id":5937,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5929,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3861:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5936,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5932,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5930,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3868:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5931,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3875:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3868:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5934,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3883:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5933,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3879:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5935,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3879:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3868:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3861:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5938,"nodeType":"ExpressionStatement","src":"3861:26:28"},{"expression":{"argumentTypes":null,"id":5948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5939,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3897:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5947,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5942,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839643935356237646432373362393465","id":5940,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3907:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11355082631444412750_by_1","typeString":"int_const 11355082631444412750"},"value":"0x9d955b7dd273b94e"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5941,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3928:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3907:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"},"id":5945,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3730","id":5943,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3937:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_70_by_1","typeString":"int_const 70"},"value":"70"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5944,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3942:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3937:7:28","typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"}}],"id":5946,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3936:9:28","typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"}},"src":"3907:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3897:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5949,"nodeType":"ExpressionStatement","src":"3897:48:28"},{"expression":{"argumentTypes":null,"id":5958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5950,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3955:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5951,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3962:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5952,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3969:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3962:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5955,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3977:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5954,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3973:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5956,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3973:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3962:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3955:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5959,"nodeType":"ExpressionStatement","src":"3955:26:28"},{"expression":{"argumentTypes":null,"id":5969,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5960,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3991:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5963,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307861656333666633633533333938383833","id":5961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4001:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12593189617617438851_by_1","typeString":"int_const 12593189617617438851"},"value":"0xaec3ff3c53398883"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5962,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4022:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4001:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"},"id":5966,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3733","id":5964,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4031:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_73_by_1","typeString":"int_const 73"},"value":"73"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5965,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4036:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4031:7:28","typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"}}],"id":5967,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4030:9:28","typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"}},"src":"4001:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3991:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5970,"nodeType":"ExpressionStatement","src":"3991:48:28"},{"expression":{"argumentTypes":null,"id":5979,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5971,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4049:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5972,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4056:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5973,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4063:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4056:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5976,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4071:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5975,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4067:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5977,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4067:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4056:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4049:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5980,"nodeType":"ExpressionStatement","src":"4049:26:28"},{"expression":{"argumentTypes":null,"id":5990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5981,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4085:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5989,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307861313834383937633336336333623761","id":5982,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4095:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11638578503611071354_by_1","typeString":"int_const 11638578503611071354"},"value":"0xa184897c363c3b7a"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5983,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4116:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4095:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"},"id":5987,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3736","id":5985,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4125:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_76_by_1","typeString":"int_const 76"},"value":"76"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5986,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4130:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4125:7:28","typeDescriptions":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"}}],"id":5988,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4124:9:28","typeDescriptions":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"}},"src":"4095:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4085:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5991,"nodeType":"ExpressionStatement","src":"4085:48:28"},{"expression":{"argumentTypes":null,"id":6000,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5992,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4143:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5999,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5993,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4150:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5994,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4157:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4150:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5997,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4165:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5996,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4161:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5998,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4161:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4150:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4143:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6001,"nodeType":"ExpressionStatement","src":"4143:26:28"},{"expression":{"argumentTypes":null,"id":6011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6002,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4179:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6010,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866666535666532633435383633343335","id":6003,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4189:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18439423715436803125_by_1","typeString":"int_const 18439423715436803125"},"value":"0xffe5fe2c45863435"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6004,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4210:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4189:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"},"id":6008,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3830","id":6006,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4219:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_80_by_1","typeString":"int_const 80"},"value":"80"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4224:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4219:7:28","typeDescriptions":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"}}],"id":6009,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4218:9:28","typeDescriptions":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"}},"src":"4189:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4179:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6012,"nodeType":"ExpressionStatement","src":"4179:48:28"},{"expression":{"argumentTypes":null,"id":6021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6013,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4237:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6020,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6014,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4244:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6015,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4251:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4244:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6018,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4259:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6017,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4255:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6019,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4255:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4244:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4237:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6022,"nodeType":"ExpressionStatement","src":"4237:26:28"},{"expression":{"argumentTypes":null,"id":6032,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6023,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4273:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6031,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6026,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307862313630313131643265343131666563","id":6024,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4283:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12781234559505211372_by_1","typeString":"int_const 12781234559505211372"},"value":"0xb160111d2e411fec"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6025,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4304:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4283:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"},"id":6029,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3833","id":6027,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4313:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_83_by_1","typeString":"int_const 83"},"value":"83"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6028,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4318:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4313:7:28","typeDescriptions":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"}}],"id":6030,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4312:9:28","typeDescriptions":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"}},"src":"4283:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4273:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6033,"nodeType":"ExpressionStatement","src":"4273:48:28"},{"expression":{"argumentTypes":null,"id":6042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6034,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4331:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6041,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6037,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6035,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4338:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6036,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4345:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4338:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6039,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4353:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6038,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4349:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6040,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4349:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4338:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4331:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6043,"nodeType":"ExpressionStatement","src":"4331:26:28"},{"expression":{"argumentTypes":null,"id":6053,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6044,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4367:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6047,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307864613932396539636166336531656432","id":6045,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4377:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_15749825242660216530_by_1","typeString":"int_const 15749825242660216530"},"value":"0xda929e9caf3e1ed2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6046,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4398:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4377:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"},"id":6050,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3837","id":6048,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4407:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_87_by_1","typeString":"int_const 87"},"value":"87"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6049,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4412:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4407:7:28","typeDescriptions":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"}}],"id":6051,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4406:9:28","typeDescriptions":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"}},"src":"4377:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4367:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6054,"nodeType":"ExpressionStatement","src":"4367:48:28"},{"expression":{"argumentTypes":null,"id":6063,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6055,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4425:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6062,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6058,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6056,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4432:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6057,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4439:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4432:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6060,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4447:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6059,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4443:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6061,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4443:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4432:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4425:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6064,"nodeType":"ExpressionStatement","src":"4425:26:28"},{"expression":{"argumentTypes":null,"id":6074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6065,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4461:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6073,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866323637613861633563373634666237","id":6066,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4471:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17467115138018856887_by_1","typeString":"int_const 17467115138018856887"},"value":"0xf267a8ac5c764fb7"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6067,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4492:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4471:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"},"id":6071,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3931","id":6069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4501:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_91_by_1","typeString":"int_const 91"},"value":"91"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6070,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4506:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4501:7:28","typeDescriptions":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"}}],"id":6072,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4500:9:28","typeDescriptions":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"}},"src":"4471:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4461:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6075,"nodeType":"ExpressionStatement","src":"4461:48:28"},{"expression":{"argumentTypes":null,"id":6084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6076,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4519:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6077,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4526:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6078,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4533:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4526:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6081,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4541:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6080,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4537:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6082,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4537:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4526:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4519:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6085,"nodeType":"ExpressionStatement","src":"4519:26:28"},{"expression":{"argumentTypes":null,"id":6095,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6086,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4555:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6094,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6089,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866343635363339613864643932363037","id":6087,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4565:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17610591433358124551_by_1","typeString":"int_const 17610591433358124551"},"value":"0xf465639a8dd92607"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6088,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4586:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4565:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"},"id":6092,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3935","id":6090,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4595:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_95_by_1","typeString":"int_const 95"},"value":"95"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6091,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4600:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4595:7:28","typeDescriptions":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"}}],"id":6093,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4594:9:28","typeDescriptions":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"}},"src":"4565:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4555:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6096,"nodeType":"ExpressionStatement","src":"4555:48:28"},{"expression":{"argumentTypes":null,"id":6105,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6097,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4613:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6098,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4620:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6099,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4627:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4620:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6102,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4635:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6101,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4631:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6103,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4620:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4613:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6106,"nodeType":"ExpressionStatement","src":"4613:26:28"},{"expression":{"argumentTypes":null,"id":6116,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6107,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4649:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6115,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6110,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865316465623238376531346332663135","id":6108,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4659:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16275642400033746709_by_1","typeString":"int_const 16275642400033746709"},"value":"0xe1deb287e14c2f15"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6109,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4680:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4659:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"},"id":6113,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3939","id":6111,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4689:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_99_by_1","typeString":"int_const 99"},"value":"99"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6112,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4694:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4689:7:28","typeDescriptions":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"}}],"id":6114,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4688:9:28","typeDescriptions":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"}},"src":"4659:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4649:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6117,"nodeType":"ExpressionStatement","src":"4649:48:28"},{"expression":{"argumentTypes":null,"id":6126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6118,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4707:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6125,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6119,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4714:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6120,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4721:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4714:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6123,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4729:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6122,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4725:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6124,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4725:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4714:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4707:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6127,"nodeType":"ExpressionStatement","src":"4707:26:28"},{"expression":{"argumentTypes":null,"id":6137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6128,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4743:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6131,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307863306230633938623336383763623134","id":6129,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4753:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_13884819250935745300_by_1","typeString":"int_const 13884819250935745300"},"value":"0xc0b0c98b3687cb14"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6130,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4774:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4753:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"},"id":6134,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313033","id":6132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4783:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_103_by_1","typeString":"int_const 103"},"value":"103"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6133,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4789:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4783:8:28","typeDescriptions":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"}}],"id":6135,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4782:10:28","typeDescriptions":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"}},"src":"4753:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4743:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6138,"nodeType":"ExpressionStatement","src":"4743:49:28"},{"expression":{"argumentTypes":null,"id":6147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6139,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4802:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6146,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6140,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4809:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6141,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4816:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4809:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6144,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4824:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6143,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6145,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4809:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4802:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6148,"nodeType":"ExpressionStatement","src":"4802:26:28"},{"expression":{"argumentTypes":null,"id":6158,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6149,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4838:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839386134623236616333633534623966","id":6150,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4848:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_10999112361566358431_by_1","typeString":"int_const 10999112361566358431"},"value":"0x98a4b26ac3c54b9f"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6151,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4869:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4848:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"},"id":6155,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313037","id":6153,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4878:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_107_by_1","typeString":"int_const 107"},"value":"107"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6154,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4884:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4878:8:28","typeDescriptions":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"}}],"id":6156,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4877:10:28","typeDescriptions":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"}},"src":"4848:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4838:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6159,"nodeType":"ExpressionStatement","src":"4838:49:28"},{"expression":{"argumentTypes":null,"id":6168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6160,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4897:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6163,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6161,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4904:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6162,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4911:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4904:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6165,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4919:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6164,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4915:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6166,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4915:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4904:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4897:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6169,"nodeType":"ExpressionStatement","src":"4897:26:28"},{"expression":{"argumentTypes":null,"id":6179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6170,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4933:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6178,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6173,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865316237343231643832303130663333","id":6171,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4943:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16264541273774427955_by_1","typeString":"int_const 16264541273774427955"},"value":"0xe1b7421d82010f33"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6172,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4964:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4943:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"},"id":6176,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313132","id":6174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4973:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_112_by_1","typeString":"int_const 112"},"value":"112"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6175,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4979:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4973:8:28","typeDescriptions":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"}}],"id":6177,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4972:10:28","typeDescriptions":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"}},"src":"4943:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4933:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6180,"nodeType":"ExpressionStatement","src":"4933:49:28"},{"expression":{"argumentTypes":null,"id":6189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6181,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4992:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6184,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6182,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4999:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6183,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5006:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4999:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6186,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5014:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6185,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5010:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6187,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5010:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4999:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4992:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6190,"nodeType":"ExpressionStatement","src":"4992:26:28"},{"expression":{"argumentTypes":null,"id":6200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6191,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5028:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6199,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6194,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839633734346437336366633539633931","id":6192,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5038:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11273720927017606289_by_1","typeString":"int_const 11273720927017606289"},"value":"0x9c744d73cfc59c91"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6193,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5059:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5038:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"},"id":6197,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313136","id":6195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5068:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_116_by_1","typeString":"int_const 116"},"value":"116"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6196,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5074:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5068:8:28","typeDescriptions":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"}}],"id":6198,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5067:10:28","typeDescriptions":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"}},"src":"5038:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5028:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6201,"nodeType":"ExpressionStatement","src":"5028:49:28"},{"expression":{"argumentTypes":null,"id":6210,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6202,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5087:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6205,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6203,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5094:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6204,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5101:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5094:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6207,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5109:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6206,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5105:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6208,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5105:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5094:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6211,"nodeType":"ExpressionStatement","src":"5087:26:28"},{"expression":{"argumentTypes":null,"id":6221,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6212,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5123:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6215,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307863633232323561306531326433656162","id":6213,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5133:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_14709360705848295083_by_1","typeString":"int_const 14709360705848295083"},"value":"0xcc2225a0e12d3eab"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6214,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5154:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5133:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"},"id":6218,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313231","id":6216,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5163:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_121_by_1","typeString":"int_const 121"},"value":"121"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6217,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5169:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5163:8:28","typeDescriptions":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"}}],"id":6219,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5162:10:28","typeDescriptions":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"}},"src":"5133:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5123:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6222,"nodeType":"ExpressionStatement","src":"5123:49:28"},{"expression":{"argumentTypes":null,"id":6231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6223,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5182:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6230,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6224,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5189:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6225,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5196:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5189:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6228,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5204:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6227,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5200:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6229,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5200:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5189:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5182:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6232,"nodeType":"ExpressionStatement","src":"5182:26:28"},{"expression":{"argumentTypes":null,"id":6242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6233,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5218:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866623862623565646131623461656239","id":6234,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5225:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18125781157507542713_by_1","typeString":"int_const 18125781157507542713"},"value":"0xfb8bb5eda1b4aeb9"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6235,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5246:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5225:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"},"id":6239,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313236","id":6237,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5255:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_126_by_1","typeString":"int_const 126"},"value":"126"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6238,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5261:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5255:8:28","typeDescriptions":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"}}],"id":6240,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5254:10:28","typeDescriptions":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"}},"src":"5225:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5218:46:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6243,"nodeType":"ExpressionStatement","src":"5218:46:28"},{"expression":{"argumentTypes":null,"id":6246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6244,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5274:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"id":6245,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5284:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5274:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6247,"nodeType":"ExpressionStatement","src":"5274:14:28"},{"expression":{"argumentTypes":null,"id":6254,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6248,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5298:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6252,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"38","id":6250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5309:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_8_by_1","typeString":"int_const 8"},"value":"8"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6251,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5313:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5309:7:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6249,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5305:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6253,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5305:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5298:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6255,"nodeType":"ExpressionStatement","src":"5298:19:28"},{"expression":{"argumentTypes":null,"id":6258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6256,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5328:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"hexValue":"3634","id":6257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5337:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5328:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6259,"nodeType":"ExpressionStatement","src":"5328:11:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6260,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5353:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6261,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5362:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5353:10:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6323,"nodeType":"IfStatement","src":"5349:431:28","trueBody":{"id":6322,"nodeType":"Block","src":"5365:415:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6263,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5383:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"323536","id":6264,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5394:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6265,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5398:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5394:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6267,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5393:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5383:21:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6269,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5408:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5383:26:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6313,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6311,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6309,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5750:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6310,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5753:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5750:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6312,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5757:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5750:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}},{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6318,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6316,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6314,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5760:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6315,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5763:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5760:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6317,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5767:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5760:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}}],"id":6319,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5749:20:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_$_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_$","typeString":"tuple(int_const 1157...(70 digits omitted)...9935,int_const 1157...(70 digits omitted)...9935)"}},"functionReturnParameters":5795,"id":6320,"nodeType":"Return","src":"5742:27:28"},"id":6321,"nodeType":"IfStatement","src":"5379:390:28","trueBody":{"id":6308,"nodeType":"Block","src":"5411:297:28","statements":[{"expression":{"argumentTypes":null,"id":6277,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6271,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5429:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6273,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5442:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6272,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5437:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6274,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5437:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"id":6275,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5453:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5437:21:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5429:29:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6278,"nodeType":"ExpressionStatement","src":"5429:29:28"},{"expression":{"argumentTypes":null,"id":6281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6279,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5476:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"<<=","rightHandSide":{"argumentTypes":null,"id":6280,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5485:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5476:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6282,"nodeType":"ExpressionStatement","src":"5476:14:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6289,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6287,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6283,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5535:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6285,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5548:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6284,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5543:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5535:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":6288,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5557:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5535:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6304,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6298,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5653:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6303,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6301,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6299,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5661:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6300,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5664:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5661:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6302,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5668:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5661:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}},"src":"5653:16:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6305,"nodeType":"ExpressionStatement","src":"5653:16:28"},"id":6306,"nodeType":"IfStatement","src":"5531:138:28","trueBody":{"expression":{"argumentTypes":null,"id":6296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6290,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5584:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6291,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5592:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6293,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5605:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6292,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5600:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6294,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5600:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5592:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5584:26:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6297,"nodeType":"ExpressionStatement","src":"5584:26:28"}},{"expression":null,"functionReturnParameters":5795,"id":6307,"nodeType":"Return","src":"5687:7:28"}]}}]}},{"expression":{"argumentTypes":null,"id":6333,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6324,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5789:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6332,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6329,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6325,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5797:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6327,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5806:6:28","subExpression":{"argumentTypes":null,"id":6326,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5807:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6328,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5805:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5797:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6330,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5796:18:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6331,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5817:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5796:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5789:29:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6334,"nodeType":"ExpressionStatement","src":"5789:29:28"},{"expression":{"argumentTypes":null,"id":6343,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6335,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5828:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6342,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6337,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5841:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6336,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5836:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5836:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5853:6:28","subExpression":{"argumentTypes":null,"id":6339,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5854:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6341,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5852:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5836:24:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5828:32:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6344,"nodeType":"ExpressionStatement","src":"5828:32:28"},{"expression":{"argumentTypes":null,"id":6351,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6345,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5870:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6350,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6346,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5878:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6348,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5891:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6347,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5886:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6349,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5886:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5878:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5870:26:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6352,"nodeType":"ExpressionStatement","src":"5870:26:28"},{"expression":null,"functionReturnParameters":5795,"id":6353,"nodeType":"Return","src":"5906:7:28"}]},"documentation":"@dev Returns bounds for value of 2**x given x\n @param x exponent in fixed point\n @return {\n \"lower\": \"lower bound of 2**x in fixed point\",\n \"upper\": \"upper bound of 2**x in fixed point\"\n }","id":6355,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"pow2Bounds","nodeType":"FunctionDefinition","parameters":{"id":5790,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5789,"name":"x","nodeType":"VariableDeclaration","scope":6355,"src":"2246:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5788,"name":"int","nodeType":"ElementaryTypeName","src":"2246:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2245:7:28"},"payable":false,"returnParameters":{"id":5795,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5792,"name":"lower","nodeType":"VariableDeclaration","scope":6355,"src":"2298:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5791,"name":"uint","nodeType":"ElementaryTypeName","src":"2298:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5794,"name":"upper","nodeType":"VariableDeclaration","scope":6355,"src":"2310:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5793,"name":"uint","nodeType":"ElementaryTypeName","src":"2310:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2297:24:28"},"scope":6668,"src":"2226:3693:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6388,"nodeType":"Block","src":"6096:126:28","statements":[{"assignments":[6363,6365],"declarations":[{"constant":false,"id":6363,"name":"lower","nodeType":"VariableDeclaration","scope":6389,"src":"6107:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6362,"name":"int","nodeType":"ElementaryTypeName","src":"6107:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6365,"name":"upper","nodeType":"VariableDeclaration","scope":6389,"src":"6118:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6364,"name":"int","nodeType":"ElementaryTypeName","src":"6118:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6369,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6367,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6357,"src":"6142:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6366,"name":"log2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6544,"src":"6131:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$_t_int256_$","typeString":"function (uint256) pure returns (int256,int256)"}},"id":6368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6131:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"6106:38:28"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6386,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6382,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6377,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6370,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6365,"src":"6163:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6371,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6363,"src":"6171:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6163:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6373,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6162:15:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":6374,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6180:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"6162:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6376,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6363,"src":"6184:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6162:27:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6378,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6161:29:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6380,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"6197:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6379,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6193:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6381,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6193:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6161:40:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6384,"name":"LOG2_E","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5689,"src":"6208:6:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6383,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6204:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6385,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6204:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6161:54:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6361,"id":6387,"nodeType":"Return","src":"6154:61:28"}]},"documentation":"@dev Returns natural logarithm value of given x\n @param x x\n @return ln(x)","id":6389,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"ln","nodeType":"FunctionDefinition","parameters":{"id":6358,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6357,"name":"x","nodeType":"VariableDeclaration","scope":6389,"src":"6034:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6356,"name":"uint","nodeType":"ElementaryTypeName","src":"6034:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6033:8:28"},"payable":false,"returnParameters":{"id":6361,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6360,"name":"","nodeType":"VariableDeclaration","scope":6389,"src":"6087:3:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6359,"name":"int","nodeType":"ElementaryTypeName","src":"6087:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"6086:5:28"},"scope":6668,"src":"6022:200:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6440,"nodeType":"Block","src":"6591:375:28","statements":[{"assignments":[6399,6401],"declarations":[{"constant":false,"id":6399,"name":"lower","nodeType":"VariableDeclaration","scope":6441,"src":"6602:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6398,"name":"int","nodeType":"ElementaryTypeName","src":"6602:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6401,"name":"upper","nodeType":"VariableDeclaration","scope":6441,"src":"6613:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6400,"name":"int","nodeType":"ElementaryTypeName","src":"6613:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6405,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6403,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6391,"src":"6637:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6402,"name":"log2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6544,"src":"6626:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$_t_int256_$","typeString":"function (uint256) pure returns (int256,int256)"}},"id":6404,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6626:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"6601:38:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6409,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6406,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6652:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6407,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6670:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6408,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6670:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6652:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6413,"nodeType":"IfStatement","src":"6649:85:28","trueBody":{"id":6412,"nodeType":"Block","src":"6697:37:28","statements":[{"expression":{"argumentTypes":null,"id":6410,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6718:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6411,"nodeType":"Return","src":"6711:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6417,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6414,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6746:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6415,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6764:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6416,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6764:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6746:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6421,"nodeType":"IfStatement","src":"6743:85:28","trueBody":{"id":6420,"nodeType":"Block","src":"6791:37:28","statements":[{"expression":{"argumentTypes":null,"id":6418,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6401,"src":"6812:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6419,"nodeType":"Return","src":"6805:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6425,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6422,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6840:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6423,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6858:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6424,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6858:23:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6840:41:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6436,"nodeType":"IfStatement","src":"6837:105:28","trueBody":{"id":6435,"nodeType":"Block","src":"6883:59:28","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6426,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6401,"src":"6905:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6427,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6913:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6905:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6429,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6904:15:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":6430,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6922:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"6904:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6432,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6926:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6904:27:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6434,"nodeType":"Return","src":"6897:34:28"}]}},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":6437,"name":"revert","nodeType":"Identifier","overloadedDeclarations":[7627,7628],"referencedDeclaration":7627,"src":"6951:6:28","typeDescriptions":{"typeIdentifier":"t_function_revert_pure$__$returns$__$","typeString":"function () pure"}},"id":6438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6951:8:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6439,"nodeType":"ExpressionStatement","src":"6951:8:28"}]},"documentation":"@dev Returns estimate of binaryLog(x) given x\n @param x logarithm argument in fixed point\n @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n @return estimate of binaryLog(x) in fixed point","id":6441,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"binaryLog","nodeType":"FunctionDefinition","parameters":{"id":6394,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6391,"name":"x","nodeType":"VariableDeclaration","scope":6441,"src":"6498:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6390,"name":"uint","nodeType":"ElementaryTypeName","src":"6498:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6393,"name":"estimationMode","nodeType":"VariableDeclaration","scope":6441,"src":"6506:29:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":6392,"name":"EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"6506:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"6497:39:28"},"payable":false,"returnParameters":{"id":6397,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6396,"name":"","nodeType":"VariableDeclaration","scope":6441,"src":"6582:3:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6395,"name":"int","nodeType":"ElementaryTypeName","src":"6582:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"6581:5:28"},"scope":6668,"src":"6479:487:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6543,"nodeType":"Block","src":"7341:645:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6453,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6451,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7359:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6452,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7363:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"7359:5:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6450,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"7351:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7351:14:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6455,"nodeType":"ExpressionStatement","src":"7351:14:28"},{"expression":{"argumentTypes":null,"id":6460,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6456,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7408:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6458,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7426:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6457,"name":"floorLog2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6620,"src":"7416:9:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$","typeString":"function (uint256) pure returns (int256)"}},"id":6459,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7416:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7408:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6461,"nodeType":"ExpressionStatement","src":"7408:20:28"},{"assignments":[],"declarations":[{"constant":false,"id":6463,"name":"y","nodeType":"VariableDeclaration","scope":6544,"src":"7439:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6462,"name":"uint","nodeType":"ElementaryTypeName","src":"7439:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":6464,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"7439:6:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6467,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6465,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7459:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6466,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7467:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"7459:9:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6483,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6477,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7530:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6482,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6478,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7534:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6480,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7544:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6479,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7539:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6481,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7539:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7534:16:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7530:20:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6484,"nodeType":"ExpressionStatement","src":"7530:20:28"},"id":6485,"nodeType":"IfStatement","src":"7455:95:28","trueBody":{"expression":{"argumentTypes":null,"id":6475,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6468,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7482:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6469,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7486:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6472,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"7496:6:28","subExpression":{"argumentTypes":null,"id":6471,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7497:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6470,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7491:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7491:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7486:17:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7482:21:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6476,"nodeType":"ExpressionStatement","src":"7482:21:28"}},{"expression":{"argumentTypes":null,"id":6490,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6486,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7561:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"*=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6488,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7574:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6487,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7570:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6489,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7570:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7561:17:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6491,"nodeType":"ExpressionStatement","src":"7561:17:28"},{"body":{"id":6535,"nodeType":"Block","src":"7731:213:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6502,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7748:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":6503,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7753:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7748:8:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6507,"nodeType":"IfStatement","src":"7745:51:28","trueBody":{"id":6506,"nodeType":"Block","src":"7758:38:28","statements":[{"id":6505,"nodeType":"Break","src":"7776:5:28"}]}},{"expression":{"argumentTypes":null,"id":6514,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6508,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7809:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6513,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6509,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7813:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6510,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7817:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7813:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":6512,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7821:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7813:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7809:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6515,"nodeType":"ExpressionStatement","src":"7809:15:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6520,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6516,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7841:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6519,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6517,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7846:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6518,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7850:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7846:7:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7841:12:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6534,"nodeType":"IfStatement","src":"7838:96:28","trueBody":{"id":6533,"nodeType":"Block","src":"7855:79:28","statements":[{"expression":{"argumentTypes":null,"id":6527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6521,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7873:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6525,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6523,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7886:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"id":6524,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7893:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7886:8:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6522,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7882:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6526,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7882:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7873:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6528,"nodeType":"ExpressionStatement","src":"7873:22:28"},{"expression":{"argumentTypes":null,"id":6531,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6529,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7913:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"/=","rightHandSide":{"argumentTypes":null,"hexValue":"32","id":6530,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7918:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"7913:6:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6532,"nodeType":"ExpressionStatement","src":"7913:6:28"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6498,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6496,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7717:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6497,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7722:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"7717:7:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6536,"initializationExpression":{"assignments":[6493],"declarations":[{"constant":false,"id":6493,"name":"m","nodeType":"VariableDeclaration","scope":6544,"src":"7706:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6492,"name":"int","nodeType":"ElementaryTypeName","src":"7706:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6495,"initialValue":{"argumentTypes":null,"hexValue":"31","id":6494,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7714:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"7706:9:28"},"loopExpression":{"expression":{"argumentTypes":null,"id":6500,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"7726:3:28","subExpression":{"argumentTypes":null,"id":6499,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7726:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6501,"nodeType":"ExpressionStatement","src":"7726:3:28"},"nodeType":"ForStatement","src":"7701:243:28"},{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6537,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7962:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6538,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7969:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"34","id":6539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7977:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"7969:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6541,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"7961:18:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"functionReturnParameters":6449,"id":6542,"nodeType":"Return","src":"7954:25:28"}]},"documentation":"@dev Returns bounds for value of binaryLog(x) given x\n @param x logarithm argument in fixed point\n @return {\n \"lower\": \"lower bound of binaryLog(x) in fixed point\",\n \"upper\": \"upper bound of binaryLog(x) in fixed point\"\n }","id":6544,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"log2Bounds","nodeType":"FunctionDefinition","parameters":{"id":6444,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6443,"name":"x","nodeType":"VariableDeclaration","scope":6544,"src":"7262:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6442,"name":"uint","nodeType":"ElementaryTypeName","src":"7262:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"7261:8:28"},"payable":false,"returnParameters":{"id":6449,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6446,"name":"lower","nodeType":"VariableDeclaration","scope":6544,"src":"7315:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6445,"name":"int","nodeType":"ElementaryTypeName","src":"7315:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6448,"name":"upper","nodeType":"VariableDeclaration","scope":6544,"src":"7326:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6447,"name":"int","nodeType":"ElementaryTypeName","src":"7326:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7314:22:28"},"scope":6668,"src":"7242:744:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6619,"nodeType":"Block","src":"8184:404:28","statements":[{"expression":{"argumentTypes":null,"id":6554,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6551,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8194:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6553,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8199:3:28","subExpression":{"argumentTypes":null,"hexValue":"3634","id":6552,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8200:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"typeDescriptions":{"typeIdentifier":"t_rational_-64_by_1","typeString":"int_const -64"}},"src":"8194:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6555,"nodeType":"ExpressionStatement","src":"8194:8:28"},{"assignments":[6557],"declarations":[{"constant":false,"id":6557,"name":"hi","nodeType":"VariableDeclaration","scope":6620,"src":"8212:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6556,"name":"int","nodeType":"ElementaryTypeName","src":"8212:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6559,"initialValue":{"argumentTypes":null,"hexValue":"313933","id":6558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8221:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_193_by_1","typeString":"int_const 193"},"value":"193"},"nodeType":"VariableDeclarationStatement","src":"8212:12:28"},{"assignments":[6561],"declarations":[{"constant":false,"id":6561,"name":"mid","nodeType":"VariableDeclaration","scope":6620,"src":"8327:7:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6560,"name":"int","nodeType":"ElementaryTypeName","src":"8327:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6568,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6567,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6564,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6562,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8338:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6563,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8343:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8338:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6565,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8337:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6566,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8350:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8337:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"8327:24:28"},{"body":{"id":6617,"nodeType":"Block","src":"8382:200:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6598,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6577,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6575,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8400:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6576,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8406:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8400:7:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6585,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6583,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6578,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6546,"src":"8411:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6581,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8421:4:28","subExpression":{"argumentTypes":null,"id":6580,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8422:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8416:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6582,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8416:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8411:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6584,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"8429:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8411:21:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8400:32:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6589,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6587,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8436:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6588,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8443:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8436:8:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6596,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6594,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6590,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6546,"src":"8448:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6592,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8458:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6591,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8453:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8453:9:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8448:14:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6595,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"8465:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8448:20:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8436:32:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8400:68:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6605,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6603,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8529:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6604,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8534:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8529:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6606,"nodeType":"ExpressionStatement","src":"8529:8:28"},"id":6607,"nodeType":"IfStatement","src":"8396:141:28","trueBody":{"expression":{"argumentTypes":null,"id":6601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6599,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8486:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6600,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8491:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8486:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6602,"nodeType":"ExpressionStatement","src":"8486:8:28"}},{"expression":{"argumentTypes":null,"id":6615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6608,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8551:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6609,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8558:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6610,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8563:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8558:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6612,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8557:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8570:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8557:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8551:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6616,"nodeType":"ExpressionStatement","src":"8551:20:28"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6569,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8368:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8373:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8368:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6572,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8367:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6573,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8378:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8367:13:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6618,"nodeType":"WhileStatement","src":"8361:221:28"}]},"documentation":"@dev Returns base 2 logarithm value of given x\n @param x x\n @return logarithmic value","id":6620,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"floorLog2","nodeType":"FunctionDefinition","parameters":{"id":6547,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6546,"name":"x","nodeType":"VariableDeclaration","scope":6620,"src":"8119:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6545,"name":"uint","nodeType":"ElementaryTypeName","src":"8119:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8118:8:28"},"payable":false,"returnParameters":{"id":6550,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6549,"name":"lo","nodeType":"VariableDeclaration","scope":6620,"src":"8172:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6548,"name":"int","nodeType":"ElementaryTypeName","src":"8172:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8171:8:28"},"scope":6668,"src":"8100:488:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6666,"nodeType":"Block","src":"8796:182:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6629,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8814:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8814:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6631,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8828:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8814:15:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6628,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8806:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8806:24:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6634,"nodeType":"ExpressionStatement","src":"8806:24:28"},{"expression":{"argumentTypes":null,"id":6640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6635,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8840:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_-57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1","typeString":"int_const -578...(70 digits omitted)...9968"},"id":6639,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6637,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8849:2:28","subExpression":{"argumentTypes":null,"hexValue":"32","id":6636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8850:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"typeDescriptions":{"typeIdentifier":"t_rational_-2_by_1","typeString":"int_const -2"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323535","id":6638,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8853:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_255_by_1","typeString":"int_const 255"},"value":"255"},"src":"8849:7:28","typeDescriptions":{"typeIdentifier":"t_rational_-57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1","typeString":"int_const -578...(70 digits omitted)...9968"}},"src":"8840:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6641,"nodeType":"ExpressionStatement","src":"8840:16:28"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":6653,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8921:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6655,"indexExpression":{"argumentTypes":null,"id":6654,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8926:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8921:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":6656,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8931:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8921:16:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6664,"nodeType":"IfStatement","src":"8917:54:28","trueBody":{"expression":{"argumentTypes":null,"id":6662,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6658,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8955:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":6659,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8964:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6661,"indexExpression":{"argumentTypes":null,"id":6660,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8969:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8964:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8955:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6663,"nodeType":"ExpressionStatement","src":"8955:16:28"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8883:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6647,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8887:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8887:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8883:15:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6665,"initializationExpression":{"assignments":[6643],"declarations":[{"constant":false,"id":6643,"name":"i","nodeType":"VariableDeclaration","scope":6667,"src":"8871:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6642,"name":"uint","nodeType":"ElementaryTypeName","src":"8871:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":6645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":6644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8880:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"8871:10:28"},"loopExpression":{"expression":{"argumentTypes":null,"id":6651,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"8900:3:28","subExpression":{"argumentTypes":null,"id":6650,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8900:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6652,"nodeType":"ExpressionStatement","src":"8900:3:28"},"nodeType":"ForStatement","src":"8866:105:28"}]},"documentation":"@dev Returns maximum of an array\n @param nums Numbers to look through\n @return Maximum number","id":6667,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"max","nodeType":"FunctionDefinition","parameters":{"id":6624,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6623,"name":"nums","nodeType":"VariableDeclaration","scope":6667,"src":"8723:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":6621,"name":"int","nodeType":"ElementaryTypeName","src":"8723:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6622,"length":null,"nodeType":"ArrayTypeName","src":"8723:5:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"8722:12:28"},"payable":false,"returnParameters":{"id":6627,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6626,"name":"maxNum","nodeType":"VariableDeclaration","scope":6667,"src":"8780:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6625,"name":"int","nodeType":"ElementaryTypeName","src":"8780:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8779:12:28"},"scope":6668,"src":"8710:268:28","stateMutability":"pure","superFunction":null,"visibility":"public"}],"scope":6669,"src":"213:8767:28"}],"src":"0:8981:28"},"legacyAST":{"absolutePath":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","exportedSymbols":{"Fixed192x64Math":[6668]},"id":6669,"nodeType":"SourceUnit","nodes":[{"id":5676,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:28"},{"baseContracts":[],"contractDependencies":[],"contractKind":"library","documentation":"@title Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - \n @author Stefan George - ","fullyImplemented":true,"id":6668,"linearizedBaseContracts":[6668],"name":"Fixed192x64Math","nodeType":"ContractDefinition","nodes":[{"canonicalName":"Fixed192x64Math.EstimationMode","id":5680,"members":[{"id":5677,"name":"LowerBound","nodeType":"EnumValue","src":"266:10:28"},{"id":5678,"name":"UpperBound","nodeType":"EnumValue","src":"278:10:28"},{"id":5679,"name":"Midpoint","nodeType":"EnumValue","src":"290:8:28"}],"name":"EstimationMode","nodeType":"EnumDefinition","src":"244:56:28"},{"constant":true,"id":5683,"name":"ONE","nodeType":"VariableDeclaration","scope":6668,"src":"385:47:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5681,"name":"uint","nodeType":"ElementaryTypeName","src":"385:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":5682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"413:19:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"public"},{"constant":true,"id":5686,"name":"LN2","nodeType":"VariableDeclaration","scope":6668,"src":"438:45:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5684,"name":"uint","nodeType":"ElementaryTypeName","src":"438:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"307862313732313766376431636637396163","id":5685,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"465:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12786308645202655660_by_1","typeString":"int_const 12786308645202655660"},"value":"0xb17217f7d1cf79ac"},"visibility":"public"},{"constant":true,"id":5689,"name":"LOG2_E","nodeType":"VariableDeclaration","scope":6668,"src":"489:49:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5687,"name":"uint","nodeType":"ElementaryTypeName","src":"489:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783137313534373635326238326665313737","id":5688,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"519:19:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_26613026195688644983_by_1","typeString":"int_const 26613026195688644983"},"value":"0x171547652b82fe177"},"visibility":"public"},{"body":{"id":5734,"nodeType":"Block","src":"767:502:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5699,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5697,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"904:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"32343534393731323539383738393039383836363739","id":5698,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"909:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2454971259878909886679_by_1","typeString":"int_const 2454971259878909886679"},"value":"2454971259878909886679"},"src":"904:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5696,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"896:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5700,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"896:36:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5701,"nodeType":"ExpressionStatement","src":"896:36:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5705,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5702,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"1056:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":5704,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"1061:22:28","subExpression":{"argumentTypes":null,"hexValue":"383138333233373533323932393639393632323237","id":5703,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1062:21:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_818323753292969962227_by_1","typeString":"int_const 818323753292969962227"},"value":"818323753292969962227"},"typeDescriptions":{"typeIdentifier":"t_rational_-818323753292969962227_by_1","typeString":"int_const -818323753292969962227"}},"src":"1056:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5708,"nodeType":"IfStatement","src":"1052:53:28","trueBody":{"expression":{"argumentTypes":null,"hexValue":"30","id":5706,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1104:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"functionReturnParameters":5695,"id":5707,"nodeType":"Return","src":"1097:8:28"}},{"assignments":[5710,5712],"declarations":[{"constant":false,"id":5710,"name":"lower","nodeType":"VariableDeclaration","scope":5735,"src":"1157:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5709,"name":"uint","nodeType":"ElementaryTypeName","src":"1157:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5712,"name":"upper","nodeType":"VariableDeclaration","scope":5735,"src":"1169:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5711,"name":"uint","nodeType":"ElementaryTypeName","src":"1169:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5724,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5718,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5714,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"1194:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5716,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"1202:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5715,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1198:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5717,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1198:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1194:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5720,"name":"LN2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5686,"src":"1213:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5719,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1209:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5721,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1209:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1194:23:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5713,"name":"pow2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6355,"src":"1183:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$returns$_t_uint256_$_t_uint256_$","typeString":"function (int256) pure returns (uint256,uint256)"}},"id":5723,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1183:35:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"1156:62:28"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5732,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5730,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5727,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5725,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5712,"src":"1236:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":5726,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5710,"src":"1244:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1236:13:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5728,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1235:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5729,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1253:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1235:19:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":5731,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5710,"src":"1257:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1235:27:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5695,"id":5733,"nodeType":"Return","src":"1228:34:28"}]},"documentation":"@dev Returns natural exponential function value of given x\n @param x x\n @return e**x","id":5735,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"exp","nodeType":"FunctionDefinition","parameters":{"id":5692,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5691,"name":"x","nodeType":"VariableDeclaration","scope":5735,"src":"705:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5690,"name":"int","nodeType":"ElementaryTypeName","src":"705:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"704:7:28"},"payable":false,"returnParameters":{"id":5695,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5694,"name":"","nodeType":"VariableDeclaration","scope":5735,"src":"757:4:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5693,"name":"uint","nodeType":"ElementaryTypeName","src":"757:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"756:6:28"},"scope":6668,"src":"692:577:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":5786,"nodeType":"Block","src":"1607:377:28","statements":[{"assignments":[5745,5747],"declarations":[{"constant":false,"id":5745,"name":"lower","nodeType":"VariableDeclaration","scope":5787,"src":"1618:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5744,"name":"uint","nodeType":"ElementaryTypeName","src":"1618:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5747,"name":"upper","nodeType":"VariableDeclaration","scope":5787,"src":"1630:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5746,"name":"uint","nodeType":"ElementaryTypeName","src":"1630:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5751,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5749,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5737,"src":"1655:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5748,"name":"pow2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6355,"src":"1644:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$returns$_t_uint256_$_t_uint256_$","typeString":"function (int256) pure returns (uint256,uint256)"}},"id":5750,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1644:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"1617:40:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5755,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5752,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1670:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5753,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1688:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5754,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1688:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1670:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5759,"nodeType":"IfStatement","src":"1667:85:28","trueBody":{"id":5758,"nodeType":"Block","src":"1715:37:28","statements":[{"expression":{"argumentTypes":null,"id":5756,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1736:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5757,"nodeType":"Return","src":"1729:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5763,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5760,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1764:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5761,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1782:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5762,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1782:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1764:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5767,"nodeType":"IfStatement","src":"1761:85:28","trueBody":{"id":5766,"nodeType":"Block","src":"1809:37:28","statements":[{"expression":{"argumentTypes":null,"id":5764,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5747,"src":"1830:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5765,"nodeType":"Return","src":"1823:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5768,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1858:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5769,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1876:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5770,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1876:23:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1858:41:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5782,"nodeType":"IfStatement","src":"1855:105:28","trueBody":{"id":5781,"nodeType":"Block","src":"1901:59:28","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5777,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5772,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5747,"src":"1923:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":5773,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1931:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1923:13:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5775,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1922:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5776,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1940:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1922:19:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":5778,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1944:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1922:27:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5780,"nodeType":"Return","src":"1915:34:28"}]}},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5783,"name":"revert","nodeType":"Identifier","overloadedDeclarations":[7627,7628],"referencedDeclaration":7627,"src":"1969:6:28","typeDescriptions":{"typeIdentifier":"t_function_revert_pure$__$returns$__$","typeString":"function () pure"}},"id":5784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1969:8:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5785,"nodeType":"ExpressionStatement","src":"1969:8:28"}]},"documentation":"@dev Returns estimate of 2**x given x\n @param x exponent in fixed point\n @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n @return estimate of 2**x in fixed point","id":5787,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"pow2","nodeType":"FunctionDefinition","parameters":{"id":5740,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5737,"name":"x","nodeType":"VariableDeclaration","scope":5787,"src":"1514:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5736,"name":"int","nodeType":"ElementaryTypeName","src":"1514:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5739,"name":"estimationMode","nodeType":"VariableDeclaration","scope":5787,"src":"1521:29:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":5738,"name":"EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"1521:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"1513:38:28"},"payable":false,"returnParameters":{"id":5743,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5742,"name":"","nodeType":"VariableDeclaration","scope":5787,"src":"1597:4:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5741,"name":"uint","nodeType":"ElementaryTypeName","src":"1597:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1596:6:28"},"scope":6668,"src":"1500:484:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6354,"nodeType":"Block","src":"2326:3593:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5799,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5797,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2466:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"33353431373734383632313532323333393130323731","id":5798,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2471:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3541774862152233910271_by_1","typeString":"int_const 3541774862152233910271"},"value":"3541774862152233910271"},"src":"2466:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5796,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2458:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5800,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2458:36:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5801,"nodeType":"ExpressionStatement","src":"2458:36:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5805,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5802,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2621:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":5804,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"2625:23:28","subExpression":{"argumentTypes":null,"hexValue":"31313830353931363230373137343131333033343234","id":5803,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2626:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1180591620717411303424_by_1","typeString":"int_const 1180591620717411303424"},"value":"1180591620717411303424"},"typeDescriptions":{"typeIdentifier":"t_rational_-1180591620717411303424_by_1","typeString":"int_const -1180591620717411303424"}},"src":"2621:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5810,"nodeType":"IfStatement","src":"2617:58:28","trueBody":{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"hexValue":"30","id":5806,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2670:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"argumentTypes":null,"hexValue":"31","id":5807,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2673:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"id":5808,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"2669:6:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_0_by_1_$_t_rational_1_by_1_$","typeString":"tuple(int_const 0,int_const 1)"}},"functionReturnParameters":5795,"id":5809,"nodeType":"Return","src":"2662:13:28"}},{"assignments":[],"declarations":[{"constant":false,"id":5812,"name":"shift","nodeType":"VariableDeclaration","scope":6355,"src":"2850:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5811,"name":"int","nodeType":"ElementaryTypeName","src":"2850:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5813,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2850:9:28"},{"assignments":[],"declarations":[{"constant":false,"id":5815,"name":"z","nodeType":"VariableDeclaration","scope":6355,"src":"2869:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5814,"name":"int","nodeType":"ElementaryTypeName","src":"2869:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5816,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2869:5:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5819,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5817,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2888:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5818,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2893:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2888:6:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":5861,"nodeType":"Block","src":"2985:93:28","statements":[{"expression":{"argumentTypes":null,"id":5848,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5837,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"2999:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5845,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5840,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5838,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"3008:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":5839,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3010:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3008:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":5841,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3007:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5843,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3019:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5842,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3015:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5844,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3015:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3007:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":5846,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3026:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3007:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2999:28:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5849,"nodeType":"ExpressionStatement","src":"2999:28:28"},{"expression":{"argumentTypes":null,"id":5859,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5850,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3041:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5851,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"3045:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5853,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3054:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5852,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3050:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5854,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3050:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5855,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"3061:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3050:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":5857,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3049:18:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3045:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3041:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5860,"nodeType":"ExpressionStatement","src":"3041:26:28"}]},"id":5862,"nodeType":"IfStatement","src":"2884:194:28","trueBody":{"id":5836,"nodeType":"Block","src":"2896:75:28","statements":[{"expression":{"argumentTypes":null,"id":5826,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5820,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"2910:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5825,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5821,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2918:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5823,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"2926:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5822,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2922:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5824,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2922:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2918:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2910:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5827,"nodeType":"ExpressionStatement","src":"2910:20:28"},{"expression":{"argumentTypes":null,"id":5834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5828,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"2944:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5833,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5829,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2948:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5831,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"2956:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2952:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5832,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2952:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2948:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2944:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5835,"nodeType":"ExpressionStatement","src":"2944:16:28"}]}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5866,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5864,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3094:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5865,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3099:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3094:6:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5863,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"3087:6:28","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3087:14:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5868,"nodeType":"ExpressionStatement","src":"3087:14:28"},{"assignments":[5870],"declarations":[{"constant":false,"id":5870,"name":"result","nodeType":"VariableDeclaration","scope":6355,"src":"3569:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5869,"name":"int","nodeType":"ElementaryTypeName","src":"3569:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5876,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5875,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5872,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3586:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5871,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3582:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5873,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3582:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5874,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3594:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3582:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3569:27:28"},{"assignments":[5878],"declarations":[{"constant":false,"id":5878,"name":"zpow","nodeType":"VariableDeclaration","scope":6355,"src":"3606:8:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5877,"name":"int","nodeType":"ElementaryTypeName","src":"3606:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5880,"initialValue":{"argumentTypes":null,"id":5879,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3617:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3606:12:28"},{"expression":{"argumentTypes":null,"id":5885,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5881,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3628:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5884,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307862313732313766376431636637396162","id":5882,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3638:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12786308645202655659_by_1","typeString":"int_const 12786308645202655659"},"value":"0xb17217f7d1cf79ab"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5883,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3659:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3638:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3628:35:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5886,"nodeType":"ExpressionStatement","src":"3628:35:28"},{"expression":{"argumentTypes":null,"id":5895,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5887,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3673:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5890,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5888,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3680:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5889,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3687:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3680:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5892,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3695:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5891,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3691:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5893,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3691:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3680:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3673:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5896,"nodeType":"ExpressionStatement","src":"3673:26:28"},{"expression":{"argumentTypes":null,"id":5906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5897,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3709:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5905,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5900,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866356664656666633136326337353433","id":5898,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3719:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17725587574382949699_by_1","typeString":"int_const 17725587574382949699"},"value":"0xf5fdeffc162c7543"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5899,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3740:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3719:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"id":5903,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3636","id":5901,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3749:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_66_by_1","typeString":"int_const 66"},"value":"66"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5902,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3754:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3749:7:28","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"}}],"id":5904,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3748:9:28","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"}},"src":"3719:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3709:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5907,"nodeType":"ExpressionStatement","src":"3709:48:28"},{"expression":{"argumentTypes":null,"id":5916,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5908,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3767:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5911,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5909,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3774:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5910,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3781:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3774:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5913,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3789:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5912,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3785:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5914,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3785:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3774:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3767:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5917,"nodeType":"ExpressionStatement","src":"3767:26:28"},{"expression":{"argumentTypes":null,"id":5927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5918,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3803:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5926,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5921,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865333538343662383235303566633539","id":5919,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3813:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16381921401269255257_by_1","typeString":"int_const 16381921401269255257"},"value":"0xe35846b82505fc59"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5920,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3834:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3813:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"id":5924,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3638","id":5922,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3843:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_68_by_1","typeString":"int_const 68"},"value":"68"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5923,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3848:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3843:7:28","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"}}],"id":5925,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3842:9:28","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"}},"src":"3813:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3803:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5928,"nodeType":"ExpressionStatement","src":"3803:48:28"},{"expression":{"argumentTypes":null,"id":5937,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5929,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3861:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5936,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5932,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5930,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3868:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5931,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3875:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3868:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5934,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3883:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5933,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3879:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5935,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3879:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3868:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3861:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5938,"nodeType":"ExpressionStatement","src":"3861:26:28"},{"expression":{"argumentTypes":null,"id":5948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5939,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3897:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5947,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5942,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839643935356237646432373362393465","id":5940,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3907:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11355082631444412750_by_1","typeString":"int_const 11355082631444412750"},"value":"0x9d955b7dd273b94e"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5941,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3928:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3907:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"},"id":5945,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3730","id":5943,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3937:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_70_by_1","typeString":"int_const 70"},"value":"70"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5944,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3942:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3937:7:28","typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"}}],"id":5946,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3936:9:28","typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"}},"src":"3907:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3897:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5949,"nodeType":"ExpressionStatement","src":"3897:48:28"},{"expression":{"argumentTypes":null,"id":5958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5950,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3955:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5951,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3962:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5952,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3969:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3962:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5955,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3977:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5954,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3973:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5956,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3973:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3962:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3955:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5959,"nodeType":"ExpressionStatement","src":"3955:26:28"},{"expression":{"argumentTypes":null,"id":5969,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5960,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3991:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5963,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307861656333666633633533333938383833","id":5961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4001:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12593189617617438851_by_1","typeString":"int_const 12593189617617438851"},"value":"0xaec3ff3c53398883"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5962,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4022:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4001:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"},"id":5966,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3733","id":5964,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4031:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_73_by_1","typeString":"int_const 73"},"value":"73"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5965,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4036:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4031:7:28","typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"}}],"id":5967,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4030:9:28","typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"}},"src":"4001:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3991:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5970,"nodeType":"ExpressionStatement","src":"3991:48:28"},{"expression":{"argumentTypes":null,"id":5979,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5971,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4049:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5972,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4056:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5973,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4063:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4056:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5976,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4071:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5975,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4067:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5977,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4067:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4056:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4049:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5980,"nodeType":"ExpressionStatement","src":"4049:26:28"},{"expression":{"argumentTypes":null,"id":5990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5981,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4085:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5989,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307861313834383937633336336333623761","id":5982,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4095:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11638578503611071354_by_1","typeString":"int_const 11638578503611071354"},"value":"0xa184897c363c3b7a"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5983,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4116:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4095:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"},"id":5987,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3736","id":5985,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4125:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_76_by_1","typeString":"int_const 76"},"value":"76"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5986,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4130:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4125:7:28","typeDescriptions":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"}}],"id":5988,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4124:9:28","typeDescriptions":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"}},"src":"4095:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4085:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5991,"nodeType":"ExpressionStatement","src":"4085:48:28"},{"expression":{"argumentTypes":null,"id":6000,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5992,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4143:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5999,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5993,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4150:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5994,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4157:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4150:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5997,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4165:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5996,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4161:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5998,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4161:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4150:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4143:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6001,"nodeType":"ExpressionStatement","src":"4143:26:28"},{"expression":{"argumentTypes":null,"id":6011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6002,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4179:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6010,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866666535666532633435383633343335","id":6003,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4189:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18439423715436803125_by_1","typeString":"int_const 18439423715436803125"},"value":"0xffe5fe2c45863435"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6004,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4210:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4189:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"},"id":6008,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3830","id":6006,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4219:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_80_by_1","typeString":"int_const 80"},"value":"80"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4224:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4219:7:28","typeDescriptions":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"}}],"id":6009,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4218:9:28","typeDescriptions":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"}},"src":"4189:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4179:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6012,"nodeType":"ExpressionStatement","src":"4179:48:28"},{"expression":{"argumentTypes":null,"id":6021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6013,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4237:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6020,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6014,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4244:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6015,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4251:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4244:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6018,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4259:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6017,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4255:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6019,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4255:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4244:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4237:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6022,"nodeType":"ExpressionStatement","src":"4237:26:28"},{"expression":{"argumentTypes":null,"id":6032,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6023,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4273:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6031,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6026,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307862313630313131643265343131666563","id":6024,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4283:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12781234559505211372_by_1","typeString":"int_const 12781234559505211372"},"value":"0xb160111d2e411fec"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6025,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4304:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4283:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"},"id":6029,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3833","id":6027,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4313:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_83_by_1","typeString":"int_const 83"},"value":"83"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6028,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4318:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4313:7:28","typeDescriptions":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"}}],"id":6030,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4312:9:28","typeDescriptions":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"}},"src":"4283:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4273:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6033,"nodeType":"ExpressionStatement","src":"4273:48:28"},{"expression":{"argumentTypes":null,"id":6042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6034,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4331:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6041,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6037,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6035,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4338:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6036,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4345:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4338:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6039,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4353:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6038,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4349:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6040,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4349:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4338:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4331:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6043,"nodeType":"ExpressionStatement","src":"4331:26:28"},{"expression":{"argumentTypes":null,"id":6053,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6044,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4367:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6047,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307864613932396539636166336531656432","id":6045,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4377:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_15749825242660216530_by_1","typeString":"int_const 15749825242660216530"},"value":"0xda929e9caf3e1ed2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6046,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4398:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4377:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"},"id":6050,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3837","id":6048,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4407:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_87_by_1","typeString":"int_const 87"},"value":"87"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6049,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4412:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4407:7:28","typeDescriptions":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"}}],"id":6051,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4406:9:28","typeDescriptions":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"}},"src":"4377:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4367:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6054,"nodeType":"ExpressionStatement","src":"4367:48:28"},{"expression":{"argumentTypes":null,"id":6063,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6055,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4425:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6062,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6058,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6056,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4432:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6057,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4439:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4432:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6060,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4447:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6059,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4443:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6061,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4443:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4432:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4425:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6064,"nodeType":"ExpressionStatement","src":"4425:26:28"},{"expression":{"argumentTypes":null,"id":6074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6065,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4461:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6073,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866323637613861633563373634666237","id":6066,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4471:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17467115138018856887_by_1","typeString":"int_const 17467115138018856887"},"value":"0xf267a8ac5c764fb7"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6067,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4492:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4471:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"},"id":6071,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3931","id":6069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4501:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_91_by_1","typeString":"int_const 91"},"value":"91"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6070,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4506:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4501:7:28","typeDescriptions":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"}}],"id":6072,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4500:9:28","typeDescriptions":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"}},"src":"4471:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4461:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6075,"nodeType":"ExpressionStatement","src":"4461:48:28"},{"expression":{"argumentTypes":null,"id":6084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6076,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4519:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6077,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4526:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6078,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4533:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4526:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6081,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4541:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6080,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4537:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6082,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4537:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4526:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4519:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6085,"nodeType":"ExpressionStatement","src":"4519:26:28"},{"expression":{"argumentTypes":null,"id":6095,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6086,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4555:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6094,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6089,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866343635363339613864643932363037","id":6087,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4565:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17610591433358124551_by_1","typeString":"int_const 17610591433358124551"},"value":"0xf465639a8dd92607"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6088,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4586:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4565:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"},"id":6092,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3935","id":6090,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4595:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_95_by_1","typeString":"int_const 95"},"value":"95"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6091,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4600:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4595:7:28","typeDescriptions":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"}}],"id":6093,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4594:9:28","typeDescriptions":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"}},"src":"4565:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4555:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6096,"nodeType":"ExpressionStatement","src":"4555:48:28"},{"expression":{"argumentTypes":null,"id":6105,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6097,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4613:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6098,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4620:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6099,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4627:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4620:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6102,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4635:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6101,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4631:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6103,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4620:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4613:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6106,"nodeType":"ExpressionStatement","src":"4613:26:28"},{"expression":{"argumentTypes":null,"id":6116,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6107,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4649:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6115,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6110,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865316465623238376531346332663135","id":6108,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4659:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16275642400033746709_by_1","typeString":"int_const 16275642400033746709"},"value":"0xe1deb287e14c2f15"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6109,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4680:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4659:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"},"id":6113,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3939","id":6111,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4689:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_99_by_1","typeString":"int_const 99"},"value":"99"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6112,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4694:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4689:7:28","typeDescriptions":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"}}],"id":6114,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4688:9:28","typeDescriptions":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"}},"src":"4659:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4649:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6117,"nodeType":"ExpressionStatement","src":"4649:48:28"},{"expression":{"argumentTypes":null,"id":6126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6118,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4707:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6125,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6119,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4714:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6120,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4721:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4714:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6123,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4729:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6122,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4725:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6124,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4725:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4714:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4707:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6127,"nodeType":"ExpressionStatement","src":"4707:26:28"},{"expression":{"argumentTypes":null,"id":6137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6128,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4743:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6131,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307863306230633938623336383763623134","id":6129,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4753:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_13884819250935745300_by_1","typeString":"int_const 13884819250935745300"},"value":"0xc0b0c98b3687cb14"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6130,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4774:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4753:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"},"id":6134,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313033","id":6132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4783:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_103_by_1","typeString":"int_const 103"},"value":"103"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6133,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4789:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4783:8:28","typeDescriptions":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"}}],"id":6135,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4782:10:28","typeDescriptions":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"}},"src":"4753:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4743:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6138,"nodeType":"ExpressionStatement","src":"4743:49:28"},{"expression":{"argumentTypes":null,"id":6147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6139,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4802:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6146,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6140,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4809:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6141,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4816:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4809:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6144,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4824:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6143,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6145,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4809:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4802:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6148,"nodeType":"ExpressionStatement","src":"4802:26:28"},{"expression":{"argumentTypes":null,"id":6158,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6149,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4838:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839386134623236616333633534623966","id":6150,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4848:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_10999112361566358431_by_1","typeString":"int_const 10999112361566358431"},"value":"0x98a4b26ac3c54b9f"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6151,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4869:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4848:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"},"id":6155,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313037","id":6153,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4878:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_107_by_1","typeString":"int_const 107"},"value":"107"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6154,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4884:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4878:8:28","typeDescriptions":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"}}],"id":6156,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4877:10:28","typeDescriptions":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"}},"src":"4848:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4838:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6159,"nodeType":"ExpressionStatement","src":"4838:49:28"},{"expression":{"argumentTypes":null,"id":6168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6160,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4897:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6163,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6161,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4904:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6162,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4911:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4904:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6165,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4919:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6164,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4915:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6166,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4915:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4904:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4897:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6169,"nodeType":"ExpressionStatement","src":"4897:26:28"},{"expression":{"argumentTypes":null,"id":6179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6170,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4933:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6178,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6173,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865316237343231643832303130663333","id":6171,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4943:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16264541273774427955_by_1","typeString":"int_const 16264541273774427955"},"value":"0xe1b7421d82010f33"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6172,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4964:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4943:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"},"id":6176,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313132","id":6174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4973:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_112_by_1","typeString":"int_const 112"},"value":"112"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6175,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4979:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4973:8:28","typeDescriptions":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"}}],"id":6177,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4972:10:28","typeDescriptions":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"}},"src":"4943:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4933:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6180,"nodeType":"ExpressionStatement","src":"4933:49:28"},{"expression":{"argumentTypes":null,"id":6189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6181,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4992:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6184,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6182,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4999:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6183,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5006:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4999:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6186,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5014:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6185,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5010:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6187,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5010:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4999:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4992:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6190,"nodeType":"ExpressionStatement","src":"4992:26:28"},{"expression":{"argumentTypes":null,"id":6200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6191,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5028:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6199,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6194,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839633734346437336366633539633931","id":6192,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5038:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11273720927017606289_by_1","typeString":"int_const 11273720927017606289"},"value":"0x9c744d73cfc59c91"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6193,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5059:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5038:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"},"id":6197,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313136","id":6195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5068:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_116_by_1","typeString":"int_const 116"},"value":"116"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6196,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5074:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5068:8:28","typeDescriptions":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"}}],"id":6198,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5067:10:28","typeDescriptions":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"}},"src":"5038:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5028:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6201,"nodeType":"ExpressionStatement","src":"5028:49:28"},{"expression":{"argumentTypes":null,"id":6210,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6202,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5087:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6205,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6203,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5094:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6204,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5101:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5094:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6207,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5109:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6206,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5105:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6208,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5105:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5094:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6211,"nodeType":"ExpressionStatement","src":"5087:26:28"},{"expression":{"argumentTypes":null,"id":6221,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6212,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5123:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6215,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307863633232323561306531326433656162","id":6213,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5133:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_14709360705848295083_by_1","typeString":"int_const 14709360705848295083"},"value":"0xcc2225a0e12d3eab"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6214,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5154:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5133:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"},"id":6218,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313231","id":6216,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5163:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_121_by_1","typeString":"int_const 121"},"value":"121"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6217,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5169:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5163:8:28","typeDescriptions":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"}}],"id":6219,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5162:10:28","typeDescriptions":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"}},"src":"5133:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5123:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6222,"nodeType":"ExpressionStatement","src":"5123:49:28"},{"expression":{"argumentTypes":null,"id":6231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6223,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5182:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6230,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6224,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5189:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6225,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5196:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5189:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6228,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5204:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6227,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5200:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6229,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5200:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5189:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5182:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6232,"nodeType":"ExpressionStatement","src":"5182:26:28"},{"expression":{"argumentTypes":null,"id":6242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6233,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5218:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866623862623565646131623461656239","id":6234,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5225:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18125781157507542713_by_1","typeString":"int_const 18125781157507542713"},"value":"0xfb8bb5eda1b4aeb9"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6235,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5246:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5225:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"},"id":6239,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313236","id":6237,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5255:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_126_by_1","typeString":"int_const 126"},"value":"126"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6238,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5261:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5255:8:28","typeDescriptions":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"}}],"id":6240,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5254:10:28","typeDescriptions":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"}},"src":"5225:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5218:46:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6243,"nodeType":"ExpressionStatement","src":"5218:46:28"},{"expression":{"argumentTypes":null,"id":6246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6244,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5274:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"id":6245,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5284:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5274:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6247,"nodeType":"ExpressionStatement","src":"5274:14:28"},{"expression":{"argumentTypes":null,"id":6254,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6248,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5298:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6252,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"38","id":6250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5309:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_8_by_1","typeString":"int_const 8"},"value":"8"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6251,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5313:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5309:7:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6249,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5305:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6253,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5305:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5298:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6255,"nodeType":"ExpressionStatement","src":"5298:19:28"},{"expression":{"argumentTypes":null,"id":6258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6256,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5328:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"hexValue":"3634","id":6257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5337:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5328:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6259,"nodeType":"ExpressionStatement","src":"5328:11:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6260,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5353:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6261,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5362:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5353:10:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6323,"nodeType":"IfStatement","src":"5349:431:28","trueBody":{"id":6322,"nodeType":"Block","src":"5365:415:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6263,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5383:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"323536","id":6264,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5394:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6265,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5398:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5394:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6267,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5393:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5383:21:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6269,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5408:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5383:26:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6313,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6311,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6309,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5750:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6310,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5753:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5750:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6312,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5757:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5750:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}},{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6318,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6316,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6314,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5760:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6315,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5763:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5760:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6317,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5767:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5760:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}}],"id":6319,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5749:20:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_$_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_$","typeString":"tuple(int_const 1157...(70 digits omitted)...9935,int_const 1157...(70 digits omitted)...9935)"}},"functionReturnParameters":5795,"id":6320,"nodeType":"Return","src":"5742:27:28"},"id":6321,"nodeType":"IfStatement","src":"5379:390:28","trueBody":{"id":6308,"nodeType":"Block","src":"5411:297:28","statements":[{"expression":{"argumentTypes":null,"id":6277,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6271,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5429:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6273,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5442:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6272,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5437:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6274,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5437:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"id":6275,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5453:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5437:21:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5429:29:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6278,"nodeType":"ExpressionStatement","src":"5429:29:28"},{"expression":{"argumentTypes":null,"id":6281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6279,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5476:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"<<=","rightHandSide":{"argumentTypes":null,"id":6280,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5485:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5476:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6282,"nodeType":"ExpressionStatement","src":"5476:14:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6289,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6287,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6283,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5535:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6285,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5548:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6284,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5543:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5535:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":6288,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5557:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5535:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6304,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6298,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5653:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6303,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6301,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6299,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5661:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6300,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5664:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5661:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6302,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5668:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5661:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}},"src":"5653:16:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6305,"nodeType":"ExpressionStatement","src":"5653:16:28"},"id":6306,"nodeType":"IfStatement","src":"5531:138:28","trueBody":{"expression":{"argumentTypes":null,"id":6296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6290,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5584:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6291,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5592:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6293,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5605:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6292,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5600:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6294,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5600:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5592:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5584:26:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6297,"nodeType":"ExpressionStatement","src":"5584:26:28"}},{"expression":null,"functionReturnParameters":5795,"id":6307,"nodeType":"Return","src":"5687:7:28"}]}}]}},{"expression":{"argumentTypes":null,"id":6333,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6324,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5789:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6332,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6329,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6325,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5797:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6327,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5806:6:28","subExpression":{"argumentTypes":null,"id":6326,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5807:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6328,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5805:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5797:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6330,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5796:18:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6331,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5817:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5796:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5789:29:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6334,"nodeType":"ExpressionStatement","src":"5789:29:28"},{"expression":{"argumentTypes":null,"id":6343,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6335,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5828:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6342,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6337,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5841:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6336,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5836:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5836:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5853:6:28","subExpression":{"argumentTypes":null,"id":6339,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5854:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6341,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5852:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5836:24:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5828:32:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6344,"nodeType":"ExpressionStatement","src":"5828:32:28"},{"expression":{"argumentTypes":null,"id":6351,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6345,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5870:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6350,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6346,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5878:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6348,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5891:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6347,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5886:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6349,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5886:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5878:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5870:26:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6352,"nodeType":"ExpressionStatement","src":"5870:26:28"},{"expression":null,"functionReturnParameters":5795,"id":6353,"nodeType":"Return","src":"5906:7:28"}]},"documentation":"@dev Returns bounds for value of 2**x given x\n @param x exponent in fixed point\n @return {\n \"lower\": \"lower bound of 2**x in fixed point\",\n \"upper\": \"upper bound of 2**x in fixed point\"\n }","id":6355,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"pow2Bounds","nodeType":"FunctionDefinition","parameters":{"id":5790,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5789,"name":"x","nodeType":"VariableDeclaration","scope":6355,"src":"2246:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5788,"name":"int","nodeType":"ElementaryTypeName","src":"2246:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2245:7:28"},"payable":false,"returnParameters":{"id":5795,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5792,"name":"lower","nodeType":"VariableDeclaration","scope":6355,"src":"2298:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5791,"name":"uint","nodeType":"ElementaryTypeName","src":"2298:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5794,"name":"upper","nodeType":"VariableDeclaration","scope":6355,"src":"2310:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5793,"name":"uint","nodeType":"ElementaryTypeName","src":"2310:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2297:24:28"},"scope":6668,"src":"2226:3693:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6388,"nodeType":"Block","src":"6096:126:28","statements":[{"assignments":[6363,6365],"declarations":[{"constant":false,"id":6363,"name":"lower","nodeType":"VariableDeclaration","scope":6389,"src":"6107:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6362,"name":"int","nodeType":"ElementaryTypeName","src":"6107:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6365,"name":"upper","nodeType":"VariableDeclaration","scope":6389,"src":"6118:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6364,"name":"int","nodeType":"ElementaryTypeName","src":"6118:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6369,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6367,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6357,"src":"6142:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6366,"name":"log2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6544,"src":"6131:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$_t_int256_$","typeString":"function (uint256) pure returns (int256,int256)"}},"id":6368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6131:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"6106:38:28"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6386,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6382,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6377,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6370,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6365,"src":"6163:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6371,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6363,"src":"6171:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6163:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6373,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6162:15:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":6374,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6180:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"6162:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6376,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6363,"src":"6184:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6162:27:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6378,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6161:29:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6380,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"6197:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6379,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6193:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6381,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6193:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6161:40:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6384,"name":"LOG2_E","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5689,"src":"6208:6:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6383,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6204:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6385,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6204:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6161:54:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6361,"id":6387,"nodeType":"Return","src":"6154:61:28"}]},"documentation":"@dev Returns natural logarithm value of given x\n @param x x\n @return ln(x)","id":6389,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"ln","nodeType":"FunctionDefinition","parameters":{"id":6358,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6357,"name":"x","nodeType":"VariableDeclaration","scope":6389,"src":"6034:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6356,"name":"uint","nodeType":"ElementaryTypeName","src":"6034:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6033:8:28"},"payable":false,"returnParameters":{"id":6361,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6360,"name":"","nodeType":"VariableDeclaration","scope":6389,"src":"6087:3:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6359,"name":"int","nodeType":"ElementaryTypeName","src":"6087:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"6086:5:28"},"scope":6668,"src":"6022:200:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6440,"nodeType":"Block","src":"6591:375:28","statements":[{"assignments":[6399,6401],"declarations":[{"constant":false,"id":6399,"name":"lower","nodeType":"VariableDeclaration","scope":6441,"src":"6602:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6398,"name":"int","nodeType":"ElementaryTypeName","src":"6602:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6401,"name":"upper","nodeType":"VariableDeclaration","scope":6441,"src":"6613:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6400,"name":"int","nodeType":"ElementaryTypeName","src":"6613:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6405,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6403,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6391,"src":"6637:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6402,"name":"log2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6544,"src":"6626:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$_t_int256_$","typeString":"function (uint256) pure returns (int256,int256)"}},"id":6404,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6626:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"6601:38:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6409,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6406,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6652:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6407,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6670:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6408,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6670:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6652:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6413,"nodeType":"IfStatement","src":"6649:85:28","trueBody":{"id":6412,"nodeType":"Block","src":"6697:37:28","statements":[{"expression":{"argumentTypes":null,"id":6410,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6718:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6411,"nodeType":"Return","src":"6711:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6417,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6414,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6746:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6415,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6764:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6416,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6764:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6746:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6421,"nodeType":"IfStatement","src":"6743:85:28","trueBody":{"id":6420,"nodeType":"Block","src":"6791:37:28","statements":[{"expression":{"argumentTypes":null,"id":6418,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6401,"src":"6812:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6419,"nodeType":"Return","src":"6805:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6425,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6422,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6840:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6423,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6858:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6424,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6858:23:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6840:41:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6436,"nodeType":"IfStatement","src":"6837:105:28","trueBody":{"id":6435,"nodeType":"Block","src":"6883:59:28","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6426,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6401,"src":"6905:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6427,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6913:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6905:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6429,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6904:15:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":6430,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6922:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"6904:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6432,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6926:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6904:27:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6434,"nodeType":"Return","src":"6897:34:28"}]}},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":6437,"name":"revert","nodeType":"Identifier","overloadedDeclarations":[7627,7628],"referencedDeclaration":7627,"src":"6951:6:28","typeDescriptions":{"typeIdentifier":"t_function_revert_pure$__$returns$__$","typeString":"function () pure"}},"id":6438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6951:8:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6439,"nodeType":"ExpressionStatement","src":"6951:8:28"}]},"documentation":"@dev Returns estimate of binaryLog(x) given x\n @param x logarithm argument in fixed point\n @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n @return estimate of binaryLog(x) in fixed point","id":6441,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"binaryLog","nodeType":"FunctionDefinition","parameters":{"id":6394,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6391,"name":"x","nodeType":"VariableDeclaration","scope":6441,"src":"6498:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6390,"name":"uint","nodeType":"ElementaryTypeName","src":"6498:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6393,"name":"estimationMode","nodeType":"VariableDeclaration","scope":6441,"src":"6506:29:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":6392,"name":"EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"6506:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"6497:39:28"},"payable":false,"returnParameters":{"id":6397,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6396,"name":"","nodeType":"VariableDeclaration","scope":6441,"src":"6582:3:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6395,"name":"int","nodeType":"ElementaryTypeName","src":"6582:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"6581:5:28"},"scope":6668,"src":"6479:487:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6543,"nodeType":"Block","src":"7341:645:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6453,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6451,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7359:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6452,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7363:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"7359:5:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6450,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"7351:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7351:14:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6455,"nodeType":"ExpressionStatement","src":"7351:14:28"},{"expression":{"argumentTypes":null,"id":6460,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6456,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7408:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6458,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7426:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6457,"name":"floorLog2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6620,"src":"7416:9:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$","typeString":"function (uint256) pure returns (int256)"}},"id":6459,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7416:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7408:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6461,"nodeType":"ExpressionStatement","src":"7408:20:28"},{"assignments":[],"declarations":[{"constant":false,"id":6463,"name":"y","nodeType":"VariableDeclaration","scope":6544,"src":"7439:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6462,"name":"uint","nodeType":"ElementaryTypeName","src":"7439:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":6464,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"7439:6:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6467,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6465,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7459:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6466,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7467:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"7459:9:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6483,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6477,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7530:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6482,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6478,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7534:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6480,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7544:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6479,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7539:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6481,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7539:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7534:16:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7530:20:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6484,"nodeType":"ExpressionStatement","src":"7530:20:28"},"id":6485,"nodeType":"IfStatement","src":"7455:95:28","trueBody":{"expression":{"argumentTypes":null,"id":6475,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6468,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7482:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6469,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7486:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6472,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"7496:6:28","subExpression":{"argumentTypes":null,"id":6471,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7497:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6470,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7491:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7491:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7486:17:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7482:21:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6476,"nodeType":"ExpressionStatement","src":"7482:21:28"}},{"expression":{"argumentTypes":null,"id":6490,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6486,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7561:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"*=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6488,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7574:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6487,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7570:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6489,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7570:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7561:17:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6491,"nodeType":"ExpressionStatement","src":"7561:17:28"},{"body":{"id":6535,"nodeType":"Block","src":"7731:213:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6502,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7748:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":6503,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7753:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7748:8:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6507,"nodeType":"IfStatement","src":"7745:51:28","trueBody":{"id":6506,"nodeType":"Block","src":"7758:38:28","statements":[{"id":6505,"nodeType":"Break","src":"7776:5:28"}]}},{"expression":{"argumentTypes":null,"id":6514,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6508,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7809:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6513,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6509,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7813:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6510,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7817:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7813:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":6512,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7821:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7813:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7809:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6515,"nodeType":"ExpressionStatement","src":"7809:15:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6520,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6516,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7841:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6519,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6517,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7846:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6518,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7850:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7846:7:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7841:12:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6534,"nodeType":"IfStatement","src":"7838:96:28","trueBody":{"id":6533,"nodeType":"Block","src":"7855:79:28","statements":[{"expression":{"argumentTypes":null,"id":6527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6521,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7873:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6525,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6523,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7886:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"id":6524,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7893:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7886:8:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6522,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7882:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6526,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7882:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7873:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6528,"nodeType":"ExpressionStatement","src":"7873:22:28"},{"expression":{"argumentTypes":null,"id":6531,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6529,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7913:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"/=","rightHandSide":{"argumentTypes":null,"hexValue":"32","id":6530,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7918:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"7913:6:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6532,"nodeType":"ExpressionStatement","src":"7913:6:28"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6498,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6496,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7717:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6497,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7722:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"7717:7:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6536,"initializationExpression":{"assignments":[6493],"declarations":[{"constant":false,"id":6493,"name":"m","nodeType":"VariableDeclaration","scope":6544,"src":"7706:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6492,"name":"int","nodeType":"ElementaryTypeName","src":"7706:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6495,"initialValue":{"argumentTypes":null,"hexValue":"31","id":6494,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7714:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"7706:9:28"},"loopExpression":{"expression":{"argumentTypes":null,"id":6500,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"7726:3:28","subExpression":{"argumentTypes":null,"id":6499,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7726:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6501,"nodeType":"ExpressionStatement","src":"7726:3:28"},"nodeType":"ForStatement","src":"7701:243:28"},{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6537,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7962:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6538,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7969:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"34","id":6539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7977:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"7969:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6541,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"7961:18:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"functionReturnParameters":6449,"id":6542,"nodeType":"Return","src":"7954:25:28"}]},"documentation":"@dev Returns bounds for value of binaryLog(x) given x\n @param x logarithm argument in fixed point\n @return {\n \"lower\": \"lower bound of binaryLog(x) in fixed point\",\n \"upper\": \"upper bound of binaryLog(x) in fixed point\"\n }","id":6544,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"log2Bounds","nodeType":"FunctionDefinition","parameters":{"id":6444,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6443,"name":"x","nodeType":"VariableDeclaration","scope":6544,"src":"7262:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6442,"name":"uint","nodeType":"ElementaryTypeName","src":"7262:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"7261:8:28"},"payable":false,"returnParameters":{"id":6449,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6446,"name":"lower","nodeType":"VariableDeclaration","scope":6544,"src":"7315:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6445,"name":"int","nodeType":"ElementaryTypeName","src":"7315:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6448,"name":"upper","nodeType":"VariableDeclaration","scope":6544,"src":"7326:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6447,"name":"int","nodeType":"ElementaryTypeName","src":"7326:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7314:22:28"},"scope":6668,"src":"7242:744:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6619,"nodeType":"Block","src":"8184:404:28","statements":[{"expression":{"argumentTypes":null,"id":6554,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6551,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8194:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6553,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8199:3:28","subExpression":{"argumentTypes":null,"hexValue":"3634","id":6552,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8200:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"typeDescriptions":{"typeIdentifier":"t_rational_-64_by_1","typeString":"int_const -64"}},"src":"8194:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6555,"nodeType":"ExpressionStatement","src":"8194:8:28"},{"assignments":[6557],"declarations":[{"constant":false,"id":6557,"name":"hi","nodeType":"VariableDeclaration","scope":6620,"src":"8212:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6556,"name":"int","nodeType":"ElementaryTypeName","src":"8212:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6559,"initialValue":{"argumentTypes":null,"hexValue":"313933","id":6558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8221:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_193_by_1","typeString":"int_const 193"},"value":"193"},"nodeType":"VariableDeclarationStatement","src":"8212:12:28"},{"assignments":[6561],"declarations":[{"constant":false,"id":6561,"name":"mid","nodeType":"VariableDeclaration","scope":6620,"src":"8327:7:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6560,"name":"int","nodeType":"ElementaryTypeName","src":"8327:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6568,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6567,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6564,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6562,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8338:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6563,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8343:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8338:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6565,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8337:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6566,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8350:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8337:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"8327:24:28"},{"body":{"id":6617,"nodeType":"Block","src":"8382:200:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6598,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6577,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6575,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8400:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6576,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8406:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8400:7:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6585,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6583,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6578,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6546,"src":"8411:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6581,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8421:4:28","subExpression":{"argumentTypes":null,"id":6580,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8422:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8416:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6582,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8416:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8411:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6584,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"8429:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8411:21:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8400:32:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6589,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6587,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8436:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6588,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8443:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8436:8:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6596,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6594,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6590,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6546,"src":"8448:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6592,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8458:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6591,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8453:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8453:9:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8448:14:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6595,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"8465:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8448:20:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8436:32:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8400:68:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6605,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6603,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8529:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6604,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8534:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8529:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6606,"nodeType":"ExpressionStatement","src":"8529:8:28"},"id":6607,"nodeType":"IfStatement","src":"8396:141:28","trueBody":{"expression":{"argumentTypes":null,"id":6601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6599,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8486:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6600,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8491:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8486:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6602,"nodeType":"ExpressionStatement","src":"8486:8:28"}},{"expression":{"argumentTypes":null,"id":6615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6608,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8551:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6609,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8558:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6610,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8563:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8558:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6612,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8557:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8570:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8557:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8551:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6616,"nodeType":"ExpressionStatement","src":"8551:20:28"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6569,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8368:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8373:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8368:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6572,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8367:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6573,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8378:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8367:13:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6618,"nodeType":"WhileStatement","src":"8361:221:28"}]},"documentation":"@dev Returns base 2 logarithm value of given x\n @param x x\n @return logarithmic value","id":6620,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"floorLog2","nodeType":"FunctionDefinition","parameters":{"id":6547,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6546,"name":"x","nodeType":"VariableDeclaration","scope":6620,"src":"8119:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6545,"name":"uint","nodeType":"ElementaryTypeName","src":"8119:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8118:8:28"},"payable":false,"returnParameters":{"id":6550,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6549,"name":"lo","nodeType":"VariableDeclaration","scope":6620,"src":"8172:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6548,"name":"int","nodeType":"ElementaryTypeName","src":"8172:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8171:8:28"},"scope":6668,"src":"8100:488:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6666,"nodeType":"Block","src":"8796:182:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6629,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8814:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8814:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6631,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8828:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8814:15:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6628,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8806:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8806:24:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6634,"nodeType":"ExpressionStatement","src":"8806:24:28"},{"expression":{"argumentTypes":null,"id":6640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6635,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8840:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_-57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1","typeString":"int_const -578...(70 digits omitted)...9968"},"id":6639,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6637,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8849:2:28","subExpression":{"argumentTypes":null,"hexValue":"32","id":6636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8850:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"typeDescriptions":{"typeIdentifier":"t_rational_-2_by_1","typeString":"int_const -2"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323535","id":6638,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8853:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_255_by_1","typeString":"int_const 255"},"value":"255"},"src":"8849:7:28","typeDescriptions":{"typeIdentifier":"t_rational_-57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1","typeString":"int_const -578...(70 digits omitted)...9968"}},"src":"8840:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6641,"nodeType":"ExpressionStatement","src":"8840:16:28"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":6653,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8921:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6655,"indexExpression":{"argumentTypes":null,"id":6654,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8926:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8921:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":6656,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8931:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8921:16:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6664,"nodeType":"IfStatement","src":"8917:54:28","trueBody":{"expression":{"argumentTypes":null,"id":6662,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6658,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8955:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":6659,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8964:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6661,"indexExpression":{"argumentTypes":null,"id":6660,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8969:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8964:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8955:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6663,"nodeType":"ExpressionStatement","src":"8955:16:28"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8883:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6647,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8887:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8887:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8883:15:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6665,"initializationExpression":{"assignments":[6643],"declarations":[{"constant":false,"id":6643,"name":"i","nodeType":"VariableDeclaration","scope":6667,"src":"8871:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6642,"name":"uint","nodeType":"ElementaryTypeName","src":"8871:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":6645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":6644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8880:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"8871:10:28"},"loopExpression":{"expression":{"argumentTypes":null,"id":6651,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"8900:3:28","subExpression":{"argumentTypes":null,"id":6650,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8900:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6652,"nodeType":"ExpressionStatement","src":"8900:3:28"},"nodeType":"ForStatement","src":"8866:105:28"}]},"documentation":"@dev Returns maximum of an array\n @param nums Numbers to look through\n @return Maximum number","id":6667,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"max","nodeType":"FunctionDefinition","parameters":{"id":6624,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6623,"name":"nums","nodeType":"VariableDeclaration","scope":6667,"src":"8723:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":6621,"name":"int","nodeType":"ElementaryTypeName","src":"8723:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6622,"length":null,"nodeType":"ArrayTypeName","src":"8723:5:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"8722:12:28"},"payable":false,"returnParameters":{"id":6627,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6626,"name":"maxNum","nodeType":"VariableDeclaration","scope":6667,"src":"8780:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6625,"name":"int","nodeType":"ElementaryTypeName","src":"8780:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8779:12:28"},"scope":6668,"src":"8710:268:28","stateMutability":"pure","superFunction":null,"visibility":"public"}],"scope":6669,"src":"213:8767:28"}],"src":"0:8981:28"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0x11c59b10ebe450cf403e1a07255da5cd2aef2084","transactionHash":"0xb48594ae3ae78f626d260421db309789e00fd9859da95cd4188a13ba3685ba5f"},"3":{"address":"0x265e6694f83fbcfd037be0126fbafc0fcfd5b181","transactionHash":"0x0c334caea3e2c383c7a54d9fd38c06f65ae46d788c216b47ddecdc24019901d9"},"4":{"address":"0xce036308718c3f704cb6cc492fa405c6d811d627","transactionHash":"0x479b0a6513e1849a8f8e3ad0a37018c360dbef7244ffa5d0b9044394e6fa0b1f"},"42":{"address":"0x09d7ffa61ad04acb47b27043335018a92e539b2c","transactionHash":"0x23cad8e3fa64cd28d4e8e84cf6c2f1859804a3b86ba598d39c028ac794670c03"},"437894314312":{"address":"0x5b1869d9a4c187f2eaa108f3062412ecf0526b24","transactionHash":"0xcaf343745b00f928539b699c58681a6841a2f14b856bdc552ce76abbbbe85cc3"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:42.561Z"}; /***/ }), @@ -253,10 +417,21 @@ module.exports = {"contract_name":"EventFactory","abi":[{"constant":false,"input /*!**********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracle.json ***! \**********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"FutarchyOracle","abi":[{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"winningMarketIndex","outputs":[{"name":"","type":"uint256"}],"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":"","type":"uint256"}],"name":"markets","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"categoricalEvent","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradingPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"FutarchyFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"FutarchyClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winningMarketIndex","type":"uint256"}],"name":"OutcomeAssignment","type":"event"},{"constant":false,"inputs":[{"name":"funding","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setOutcome","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5061190e806100206000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d146100bf57806343d726d6146100d6578063561cce0a146100ed57806356cfb75f1461011e5780637e7e4b4714610149578063a619486e14610174578063b1283e77146101cb578063c3730d0314610238578063c65fb3801461028f578063ca1d209d146102be578063ccdf68f3146102eb578063f86e31531461031a575b600080fd5b3480156100cb57600080fd5b506100d4610345565b005b3480156100e257600080fd5b506100eb61069f565b005b3480156100f957600080fd5b50610102610ffc565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b50610133611001565b6040518082815260200191505060405180910390f35b34801561015557600080fd5b5061015e611007565b6040518082815260200191505060405180910390f35b34801561018057600080fd5b50610189611011565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d757600080fd5b506101f660048036038101908080359060200190929190505050611036565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561024457600080fd5b5061024d611074565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029b57600080fd5b506102a461109a565b604051808215151515815260200191505060405180910390f35b3480156102ca57600080fd5b506102e9600480360381019080803590602001909291905050506110ad565b005b3480156102f757600080fd5b506103006118c5565b604051808215151515815260200191505060405180910390f35b34801561032657600080fd5b5061032f6118dc565b6040518082815260200191505060405180910390f35b600080600080600660009054906101000a900460ff161580156104435750426004546002600081548110151561037757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630b97bc866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561040557600080fd5b505af1158015610419573d6000803e3d6000fd5b505050506040513d602081101561042f57600080fd5b810190808051906020019092919050505001105b151561044e57600080fd5b6002600081548110151561045e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f01e66ec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156104ec57600080fd5b505af1158015610500573d6000803e3d6000fd5b505050506040513d602081101561051657600080fd5b8101908080519060200190929190505050935060009250600191505b6002805490508260ff16101561063e5760028260ff1681548110151561055457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f01e66ec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105e257600080fd5b505af11580156105f6573d6000803e3d6000fd5b505050506040513d602081101561060c57600080fd5b8101908080519060200190929190505050905083811115610631578093508160ff1692505b8180600101925050610532565b826005819055506001600660006101000a81548160ff0219169083151502179055507f39972cb21edd888c2061a2b4b37874524bbc055cfeaa3054682ba5369f5029aa6005546040518082815260200191505060405180910390a150505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106fd57600080fd5b6002610707611007565b81548110151561071357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b505050506040513d60208110156107f057600080fd5b8101908080519060200190929190505050801561094657508073ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561086c57600080fd5b505af1158015610880573d6000803e3d6000fd5b505050506040513d602081101561089657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561090a57600080fd5b505af115801561091e573d6000803e3d6000fd5b505050506040513d602081101561093457600080fd5b81019080805190602001909291905050505b151561095157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166343d726d66040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156109b557600080fd5b505af11580156109c9573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a3157600080fd5b505af1158015610a45573d6000803e3d6000fd5b505050506040513d6020811015610a5b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663ad0b2bec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610acf57600080fd5b505af1158015610ae3573d6000803e3d6000fd5b505050506040513d6020811015610af957600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663476343ee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610b6f57600080fd5b505af1158015610b83573d6000803e3d6000fd5b505050506040513d6020811015610b9957600080fd5b810190808051906020019092919050505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad0b2bec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050506040513d6020811015610c5b57600080fd5b810190808051906020019092919050505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610cf357600080fd5b505af1158015610d07573d6000803e3d6000fd5b505050506040513d6020811015610d1d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050506040513d6020811015610e1c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610ec757600080fd5b505af1158015610edb573d6000803e3d6000fd5b505050506040513d6020811015610ef157600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f8757600080fd5b505af1158015610f9b573d6000803e3d6000fd5b505050506040513d6020811015610fb157600080fd5b81019080805190602001909291905050501515610fcd57600080fd5b7f5f5592c20f009bc231fd8491ce6ff3d11f2067fd2bd08c2a9999391a09b67dd460405160405180910390a150565b600181565b60055481565b6000600554905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028181548110151561104557fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900460ff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561110c57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561119257600080fd5b505af11580156111a6573d6000803e3d6000fd5b505050506040513d60208110156111bc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156112c557600080fd5b505af11580156112d9573d6000803e3d6000fd5b505050506040513d60208110156112ef57600080fd5b810190808051906020019092919050505080156114c85750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561138d57600080fd5b505af11580156113a1573d6000803e3d6000fd5b505050506040513d60208110156113b757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561148c57600080fd5b505af11580156114a0573d6000803e3d6000fd5b505050506040513d60208110156114b657600080fd5b81019080805190602001909291905050505b15156114d357600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561156457600080fd5b505af1158015611578573d6000803e3d6000fd5b50505050600091505b6002805490508260ff1610156118895760028260ff168154811015156115a357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561163457600080fd5b505af1158015611648573d6000803e3d6000fd5b505050506040513d602081101561165e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156116d257600080fd5b505af11580156116e6573d6000803e3d6000fd5b505050506040513d60208110156116fc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b382856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156117af57600080fd5b505af11580156117c3573d6000803e3d6000fd5b505050506040513d60208110156117d957600080fd5b810190808051906020019092919050505015156117f557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663ca1d209d846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561186457600080fd5b505af1158015611878573d6000803e3d6000fd5b505050508180600101925050611581565b7f8b8d4001f25800969052b4c8925891e8acbe35d672701edb74e52265fed9786e836040518082815260200191505060405180910390a1505050565b6000600660009054906101000a900460ff16905090565b600454815600a165627a7a72305820cae5701ddae1567bd3364b28fbe5ec85699402deead2c09d3bb2c69362f85e320029","deployedBytecode":"0x6080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d146100bf57806343d726d6146100d6578063561cce0a146100ed57806356cfb75f1461011e5780637e7e4b4714610149578063a619486e14610174578063b1283e77146101cb578063c3730d0314610238578063c65fb3801461028f578063ca1d209d146102be578063ccdf68f3146102eb578063f86e31531461031a575b600080fd5b3480156100cb57600080fd5b506100d4610345565b005b3480156100e257600080fd5b506100eb61069f565b005b3480156100f957600080fd5b50610102610ffc565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b50610133611001565b6040518082815260200191505060405180910390f35b34801561015557600080fd5b5061015e611007565b6040518082815260200191505060405180910390f35b34801561018057600080fd5b50610189611011565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d757600080fd5b506101f660048036038101908080359060200190929190505050611036565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561024457600080fd5b5061024d611074565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029b57600080fd5b506102a461109a565b604051808215151515815260200191505060405180910390f35b3480156102ca57600080fd5b506102e9600480360381019080803590602001909291905050506110ad565b005b3480156102f757600080fd5b506103006118c5565b604051808215151515815260200191505060405180910390f35b34801561032657600080fd5b5061032f6118dc565b6040518082815260200191505060405180910390f35b600080600080600660009054906101000a900460ff161580156104435750426004546002600081548110151561037757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630b97bc866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561040557600080fd5b505af1158015610419573d6000803e3d6000fd5b505050506040513d602081101561042f57600080fd5b810190808051906020019092919050505001105b151561044e57600080fd5b6002600081548110151561045e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f01e66ec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156104ec57600080fd5b505af1158015610500573d6000803e3d6000fd5b505050506040513d602081101561051657600080fd5b8101908080519060200190929190505050935060009250600191505b6002805490508260ff16101561063e5760028260ff1681548110151561055457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f01e66ec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105e257600080fd5b505af11580156105f6573d6000803e3d6000fd5b505050506040513d602081101561060c57600080fd5b8101908080519060200190929190505050905083811115610631578093508160ff1692505b8180600101925050610532565b826005819055506001600660006101000a81548160ff0219169083151502179055507f39972cb21edd888c2061a2b4b37874524bbc055cfeaa3054682ba5369f5029aa6005546040518082815260200191505060405180910390a150505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106fd57600080fd5b6002610707611007565b81548110151561071357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b505050506040513d60208110156107f057600080fd5b8101908080519060200190929190505050801561094657508073ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561086c57600080fd5b505af1158015610880573d6000803e3d6000fd5b505050506040513d602081101561089657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561090a57600080fd5b505af115801561091e573d6000803e3d6000fd5b505050506040513d602081101561093457600080fd5b81019080805190602001909291905050505b151561095157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166343d726d66040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156109b557600080fd5b505af11580156109c9573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a3157600080fd5b505af1158015610a45573d6000803e3d6000fd5b505050506040513d6020811015610a5b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663ad0b2bec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610acf57600080fd5b505af1158015610ae3573d6000803e3d6000fd5b505050506040513d6020811015610af957600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663476343ee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610b6f57600080fd5b505af1158015610b83573d6000803e3d6000fd5b505050506040513d6020811015610b9957600080fd5b810190808051906020019092919050505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad0b2bec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050506040513d6020811015610c5b57600080fd5b810190808051906020019092919050505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610cf357600080fd5b505af1158015610d07573d6000803e3d6000fd5b505050506040513d6020811015610d1d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050506040513d6020811015610e1c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610ec757600080fd5b505af1158015610edb573d6000803e3d6000fd5b505050506040513d6020811015610ef157600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f8757600080fd5b505af1158015610f9b573d6000803e3d6000fd5b505050506040513d6020811015610fb157600080fd5b81019080805190602001909291905050501515610fcd57600080fd5b7f5f5592c20f009bc231fd8491ce6ff3d11f2067fd2bd08c2a9999391a09b67dd460405160405180910390a150565b600181565b60055481565b6000600554905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028181548110151561104557fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900460ff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561110c57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561119257600080fd5b505af11580156111a6573d6000803e3d6000fd5b505050506040513d60208110156111bc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156112c557600080fd5b505af11580156112d9573d6000803e3d6000fd5b505050506040513d60208110156112ef57600080fd5b810190808051906020019092919050505080156114c85750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561138d57600080fd5b505af11580156113a1573d6000803e3d6000fd5b505050506040513d60208110156113b757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561148c57600080fd5b505af11580156114a0573d6000803e3d6000fd5b505050506040513d60208110156114b657600080fd5b81019080805190602001909291905050505b15156114d357600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561156457600080fd5b505af1158015611578573d6000803e3d6000fd5b50505050600091505b6002805490508260ff1610156118895760028260ff168154811015156115a357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561163457600080fd5b505af1158015611648573d6000803e3d6000fd5b505050506040513d602081101561165e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156116d257600080fd5b505af11580156116e6573d6000803e3d6000fd5b505050506040513d60208110156116fc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b382856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156117af57600080fd5b505af11580156117c3573d6000803e3d6000fd5b505050506040513d60208110156117d957600080fd5b810190808051906020019092919050505015156117f557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663ca1d209d846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561186457600080fd5b505af1158015611878573d6000803e3d6000fd5b505050508180600101925050611581565b7f8b8d4001f25800969052b4c8925891e8acbe35d672701edb74e52265fed9786e836040518082815260200191505060405180910390a1505050565b6000600660009054906101000a900460ff16905090565b600454815600a165627a7a72305820cae5701ddae1567bd3364b28fbe5ec85699402deead2c09d3bb2c69362f85e320029","sourceMap":"2998:3010:18:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2998:3010:18;;;;;;;","deployedSourceMap":"2998:3010:18:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4906:717;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4906:717:18;;;;;;4061:746;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4061:746:18;;;;;;437:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;437:30:18;;;;;;;;;;;;;;;;;;;;;;;;;;;655;;8:9:-1;5:2;;;30:1;27;20:12;5:2;655:30:18;;;;;;;;;;;;;;;;;;;;;;;5883:123;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5883:123:18;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;526:46:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;526:46:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;578:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;578:40:18;;;;;;;;;;;;;;;;;;;;;;;;;;;691:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;691:17:18;;;;;;;;;;;;;;;;;;;;;;;;;;;3235:709;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3235:709:18;;;;;;;;;;;;;;;;;;;;;;;;;;5708:108;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5708:108:18;;;;;;;;;;;;;;;;;;;;;;;;;;;624:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;624:25:18;;;;;;;;;;;;;;;;;;;;;;;4906:717;5166:20;5223:17;5259:7;5311:13;5027:5;;;;;;;;;;;5026:6;:54;;;;;5077:3;5061:13;;5036:7;5044:1;5036:10;;;;;;;;;;;;;;;;;;;;;;;;;;;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5036:22:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5036:22:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5036:22:18;;;;;;;;;;;;;;;;:38;:44;5026:54;5018:63;;;;;;;;5189:7;5197:1;5189:10;;;;;;;;;;;;;;;;;;;;;;;;;;;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5189:24:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5189:24:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5189:24:18;;;;;;;;;;;;;;;;5166:47;;5243:1;5223:21;;5269:1;5259:11;;5254:246;5276:7;:14;;;;5272:1;:18;;;5254:246;;;5327:7;5335:1;5327:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5327:24:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5327:24:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5327:24:18;;;;;;;;;;;;;;;;5311:40;;5380:15;5369:8;:26;5365:125;;;5433:8;5415:26;;5474:1;5459:16;;;;5365:125;5292:3;;;;;;;5254:246;;;5530:12;5509:18;:33;;;;5560:4;5552:5;;:12;;;;;;;;;;;;;;;;;;5579:37;5597:18;;5579:37;;;;;;;;;;;;;;;;;;4906:717;;;;:::o;4061:746::-;4166:13;847:7;;;;;;;;;;;833:21;;:10;:21;;;825:30;;;;;;;;4182:7;4195:12;:10;:12::i;:::-;4182:27;;;;;;;;;;;;;;;;;;;;;;;;;;;4166:43;;4227:16;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4227:31:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4227:31:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4227:31:18;;;;;;;;;;;;;;;;:72;;;;;4262:6;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4262:22:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4262:22:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4262:22:18;;;;;;;;;;;;;;;;:35;;;:37;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4262:37:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4262:37:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4262:37:18;;;;;;;;;;;;;;;;4227:72;4219:81;;;;;;;;4404:6;:12;;;:14;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4404:14:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4404:14:18;;;;4428:6;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4428:22:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4428:22:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4428:22:18;;;;;;;;;;;;;;;;:37;;;:39;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4428:39:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4428:39:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4428:39:18;;;;;;;;;;;;;;;;;4477:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4477:21:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4477:21:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4477:21:18;;;;;;;;;;;;;;;;;4612:16;;;;;;;;;;;:31;;;:33;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4612:33:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4612:33:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4612:33:18;;;;;;;;;;;;;;;;;4663:16;;;;;;;;;;;:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4663:34:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4663:34:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4663:34:18;;;;;;;;;;;;;;;;:43;;;4707:7;;;;;;;;;;;4716:16;;;;;;;;;;;:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4716:34:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4716:34:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4716:34:18;;;;;;;;;;;;;;;;:44;;;4761:4;4716:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4716:50:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4716:50:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4716:50:18;;;;;;;;;;;;;;;;4663:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4663:104:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4663:104:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4663:104:18;;;;;;;;;;;;;;;;4655:113;;;;;;;;4783:17;;;;;;;;;;4061:746;:::o;437:30::-;466:1;437:30;:::o;655:::-;;;;:::o;5883:123::-;5950:3;5980:18;;5969:30;;5883:123;:::o;197:25:29:-;;;;;;;;;;;;;:::o;526:46:18:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;578:40::-;;;;;;;;;;;;;:::o;691:17::-;;;;;;;;;;;;;:::o;3235:709::-;3646:7;3698:13;847:7;;;;;;;;;;;833:21;;:10;:21;;;825:30;;;;;;;;3349:16;;;;;;;;;;;:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3349:34:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3349:34:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3349:34:18;;;;;;;;;;;;;;;;:47;;;3397:7;;;;;;;;;;;3406:4;3412:7;3349:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3349:71:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3349:71:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3349:71:18;;;;;;;;;;;;;;;;:160;;;;;3440:16;;;;;;;;;;;:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3440:34:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3440:34:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3440:34:18;;;;;;;;;;;;;;;;:42;;;3483:16;;;;;;;;;;;3501:7;3440:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3440:69:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3440:69:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3440:69:18;;;;;;;;;;;;;;;;3349:160;3338:172;;;;;;;;3520:16;;;;;;;;;;;:31;;;3552:7;3520:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3520:40:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3520:40:18;;;;3656:1;3646:11;;3641:258;3663:7;:14;;;;3659:1;:18;;;3641:258;;;3714:7;3722:1;3714:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3698:26;;3788:6;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3788:22:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3788:22:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3788:22:18;;;;;;;;;;;;;;;;:38;;;:40;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3788:40:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3788:40:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3788:40:18;;;;;;;;;;;;;;;;:48;;;3837:6;3845:7;3788:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3788:65:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3788:65:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3788:65:18;;;;;;;;;;;;;;;;3780:74;;;;;;;;3868:6;:11;;;3880:7;3868:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3868:20:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3868:20:18;;;;3679:3;;;;;;;3641:258;;;3913:24;3929:7;3913:24;;;;;;;;;;;;;;;;;;3235:709;;;:::o;5708:108::-;5777:4;5804:5;;;;;;;;;;;5797:12;;5708:108;:::o;624:25::-;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"../Events/EventFactory.sol\";\nimport \"../Markets/StandardMarketWithPriceLoggerFactory.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract FutarchyOracleData {\n\n /*\n * Events\n */\n event FutarchyFunding(uint funding);\n event FutarchyClosing();\n event OutcomeAssignment(uint winningMarketIndex);\n\n /*\n * Constants\n */\n uint8 public constant LONG = 1;\n\n /*\n * Storage\n */\n address creator;\n StandardMarketWithPriceLogger[] public markets;\n CategoricalEvent public categoricalEvent;\n uint public tradingPeriod;\n uint public winningMarketIndex;\n bool public isSet;\n\n /*\n * Modifiers\n */\n modifier isCreator() {\n // Only creator is allowed to proceed\n require(msg.sender == creator);\n _;\n }\n}\n\ncontract FutarchyOracleProxy is Proxy, FutarchyOracleData {\n\n /// @dev Constructor creates events and markets for futarchy oracle\n /// @param _creator Oracle creator\n /// @param eventFactory Event factory contract\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 /// @param lowerBound Lower bound for event outcome\n /// @param upperBound Lower bound for event outcome\n /// @param marketFactory Market factory contract\n /// @param marketMaker Market maker contract\n /// @param fee Market fee\n /// @param _tradingPeriod Trading period before decision can be determined\n /// @param startDate Start date for price logging\n constructor(\n address proxied,\n address _creator,\n EventFactory eventFactory,\n ERC20 collateralToken,\n Oracle oracle,\n uint8 outcomeCount,\n int lowerBound,\n int upperBound,\n StandardMarketWithPriceLoggerFactory marketFactory,\n MarketMaker marketMaker,\n uint24 fee,\n uint _tradingPeriod,\n uint startDate\n )\n Proxy(proxied)\n public\n {\n // trading period is at least a second\n require(_tradingPeriod > 0);\n // Create decision event\n categoricalEvent = eventFactory.createCategoricalEvent(collateralToken, Oracle(this), outcomeCount);\n // Create outcome events\n for (uint8 i = 0; i < categoricalEvent.getOutcomeCount(); i++) {\n ScalarEvent scalarEvent = eventFactory.createScalarEvent(\n categoricalEvent.outcomeTokens(i),\n oracle,\n lowerBound,\n upperBound\n );\n markets.push(marketFactory.createMarket(scalarEvent, marketMaker, fee, startDate));\n }\n creator = _creator;\n tradingPeriod = _tradingPeriod;\n }\n}\n\n/// @title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n/// @author Stefan George - \ncontract FutarchyOracle is Proxied, Oracle, FutarchyOracleData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Funds all markets with equal amount of funding\n /// @param funding Amount of funding\n function fund(uint funding)\n public\n isCreator\n {\n // Buy all outcomes\n require( categoricalEvent.collateralToken().transferFrom(creator, this, funding)\n && categoricalEvent.collateralToken().approve(categoricalEvent, funding));\n categoricalEvent.buyAllOutcomes(funding);\n // Fund each market with outcome tokens from categorical event\n for (uint8 i = 0; i < markets.length; i++) {\n Market market = markets[i];\n // Approve funding for market\n require(market.eventContract().collateralToken().approve(market, funding));\n market.fund(funding);\n }\n emit FutarchyFunding(funding);\n }\n\n /// @dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator\n function close()\n public\n isCreator\n {\n // Winning outcome has to be set\n Market market = markets[uint(getOutcome())];\n require(categoricalEvent.isOutcomeSet() && market.eventContract().isOutcomeSet());\n // Close market and transfer all outcome tokens from winning outcome to this contract\n market.close();\n market.eventContract().redeemWinnings();\n market.withdrawFees();\n // Redeem collateral token for winning outcome tokens and transfer collateral tokens to creator\n categoricalEvent.redeemWinnings();\n require(categoricalEvent.collateralToken().transfer(creator, categoricalEvent.collateralToken().balanceOf(this)));\n emit FutarchyClosing();\n }\n\n /// @dev Allows to set the oracle outcome based on the market with largest long position\n function setOutcome()\n public\n {\n // Outcome is not set yet and trading period is over\n require(!isSet && markets[0].startDate() + tradingPeriod < now);\n // Find market with highest marginal price for long outcome tokens\n uint highestAvgPrice = markets[0].getAvgPrice();\n uint highestIndex = 0;\n for (uint8 i = 1; i < markets.length; i++) {\n uint avgPrice = markets[i].getAvgPrice();\n if (avgPrice > highestAvgPrice) {\n highestAvgPrice = avgPrice;\n highestIndex = i;\n }\n }\n winningMarketIndex = highestIndex;\n isSet = true;\n emit OutcomeAssignment(winningMarketIndex);\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return int(winningMarketIndex);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","exportedSymbols":{"FutarchyOracle":[4270],"FutarchyOracleData":[3923],"FutarchyOracleProxy":[4025]},"id":4271,"nodeType":"SourceUnit","nodes":[{"id":3881,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:18"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3882,"nodeType":"ImportDirective","scope":4271,"sourceUnit":4718,"src":"25:31:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","file":"../Events/EventFactory.sol","id":3883,"nodeType":"ImportDirective","scope":4271,"sourceUnit":579,"src":"57:36:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","file":"../Markets/StandardMarketWithPriceLoggerFactory.sol","id":3884,"nodeType":"ImportDirective","scope":4271,"sourceUnit":3528,"src":"94:61:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3885,"nodeType":"ImportDirective","scope":4271,"sourceUnit":6702,"src":"156:55:18","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3923,"linearizedBaseContracts":[3923],"name":"FutarchyOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3889,"name":"FutarchyFunding","nodeType":"EventDefinition","parameters":{"id":3888,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3887,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":3889,"src":"301:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3886,"name":"uint","nodeType":"ElementaryTypeName","src":"301:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"300:14:18"},"src":"279:36:18"},{"anonymous":false,"documentation":null,"id":3891,"name":"FutarchyClosing","nodeType":"EventDefinition","parameters":{"id":3890,"nodeType":"ParameterList","parameters":[],"src":"341:2:18"},"src":"320:24:18"},{"anonymous":false,"documentation":null,"id":3895,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3894,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3893,"indexed":false,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3895,"src":"373:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3892,"name":"uint","nodeType":"ElementaryTypeName","src":"373:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"372:25:18"},"src":"349:49:18"},{"constant":true,"id":3898,"name":"LONG","nodeType":"VariableDeclaration","scope":3923,"src":"437:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3896,"name":"uint8","nodeType":"ElementaryTypeName","src":"437:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3897,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"466:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3900,"name":"creator","nodeType":"VariableDeclaration","scope":3923,"src":"505:15:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3899,"name":"address","nodeType":"ElementaryTypeName","src":"505:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3903,"name":"markets","nodeType":"VariableDeclaration","scope":3923,"src":"526:46:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[]"},"typeName":{"baseType":{"contractScope":null,"id":3901,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"526:29:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3902,"length":null,"nodeType":"ArrayTypeName","src":"526:31:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage_ptr","typeString":"contract StandardMarketWithPriceLogger[]"}},"value":null,"visibility":"public"},{"constant":false,"id":3905,"name":"categoricalEvent","nodeType":"VariableDeclaration","scope":3923,"src":"578:40:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":3904,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"578:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":3907,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":3923,"src":"624:25:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3906,"name":"uint","nodeType":"ElementaryTypeName","src":"624:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3909,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3923,"src":"655:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3908,"name":"uint","nodeType":"ElementaryTypeName","src":"655:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3911,"name":"isSet","nodeType":"VariableDeclaration","scope":3923,"src":"691:17:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3910,"name":"bool","nodeType":"ElementaryTypeName","src":"691:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"body":{"id":3921,"nodeType":"Block","src":"769:104:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3914,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"833:3:18","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"833:10:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3916,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"847:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"833:21:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3913,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"825:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3918,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"825:30:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3919,"nodeType":"ExpressionStatement","src":"825:30:18"},{"id":3920,"nodeType":"PlaceholderStatement","src":"865:1:18"}]},"documentation":null,"id":3922,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":3912,"nodeType":"ParameterList","parameters":[],"src":"766:2:18"},"src":"748:125:18","visibility":"internal"}],"scope":4271,"src":"214:661:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3924,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"909:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3925,"nodeType":"InheritanceSpecifier","src":"909:5:18"},{"arguments":null,"baseName":{"contractScope":null,"id":3926,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"916:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":3927,"nodeType":"InheritanceSpecifier","src":"916:18:18"}],"contractDependencies":[3923,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4025,"linearizedBaseContracts":[4025,3923,6701,6673],"name":"FutarchyOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4023,"nodeType":"Block","src":"2128:728:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3962,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3960,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2193:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2210:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2193:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3959,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2185:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3963,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2185:27:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3964,"nodeType":"ExpressionStatement","src":"2185:27:18"},{"expression":{"argumentTypes":null,"id":3974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3965,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2255:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3968,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3935,"src":"2310:15:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3970,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7723,"src":"2334:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}],"id":3969,"name":"Oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4717,"src":"2327:6:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Oracle_$4717_$","typeString":"type(contract Oracle)"}},"id":3971,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2327:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3972,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3939,"src":"2341:12:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3966,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2274:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3967,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createCategoricalEvent","nodeType":"MemberAccess","referencedDeclaration":511,"src":"2274:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$_t_contract$_CategoricalEvent_$152_$","typeString":"function (contract ERC20,contract Oracle,uint8) external returns (contract CategoricalEvent)"}},"id":3973,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2274:80:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2255:99:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3975,"nodeType":"ExpressionStatement","src":"2255:99:18"},{"body":{"id":4013,"nodeType":"Block","src":"2460:322:18","statements":[{"assignments":[3989],"declarations":[{"constant":false,"id":3989,"name":"scalarEvent","nodeType":"VariableDeclaration","scope":4024,"src":"2474:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":3988,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"2474:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"}],"id":4000,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3994,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2579:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3992,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2548:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3993,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2548:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2548:33:18","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":3996,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3937,"src":"2599:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3997,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3941,"src":"2623:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":3998,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3943,"src":"2651:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3990,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2500:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3991,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createScalarEvent","nodeType":"MemberAccess","referencedDeclaration":577,"src":"2500:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$_t_contract$_ScalarEvent_$840_$","typeString":"function (contract ERC20,contract Oracle,int256,int256) external returns (contract ScalarEvent)"}},"id":3999,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2500:175:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"VariableDeclarationStatement","src":"2474:201:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4006,"name":"scalarEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3989,"src":"2729:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":4007,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3947,"src":"2742:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4008,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3949,"src":"2755:3:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4009,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3953,"src":"2760:9:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4004,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3945,"src":"2702:13:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"id":4005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3526,"src":"2702:26:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$_t_contract$_StandardMarketWithPriceLogger_$3458_$","typeString":"function (contract Event,contract MarketMaker,uint24,uint256) external returns (contract StandardMarketWithPriceLogger)"}},"id":4010,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2702:68:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}],"expression":{"argumentTypes":null,"id":4001,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"2689:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2689:12:18","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_StandardMarketWithPriceLogger_$3458_$returns$_t_uint256_$","typeString":"function (contract StandardMarketWithPriceLogger) returns (uint256)"}},"id":4011,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2689:82:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4012,"nodeType":"ExpressionStatement","src":"2689:82:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3980,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2415:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3981,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2419:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2419:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3983,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2419:34:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2415:38:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4014,"initializationExpression":{"assignments":[3977],"declarations":[{"constant":false,"id":3977,"name":"i","nodeType":"VariableDeclaration","scope":4024,"src":"2402:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3976,"name":"uint8","nodeType":"ElementaryTypeName","src":"2402:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":3979,"initialValue":{"argumentTypes":null,"hexValue":"30","id":3978,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2412:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2402:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":3986,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2455:3:18","subExpression":{"argumentTypes":null,"id":3985,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2455:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":3987,"nodeType":"ExpressionStatement","src":"2455:3:18"},"nodeType":"ForStatement","src":"2397:385:18"},{"expression":{"argumentTypes":null,"id":4017,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4015,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"2791:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4016,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3931,"src":"2801:8:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2791:18:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4018,"nodeType":"ExpressionStatement","src":"2791:18:18"},{"expression":{"argumentTypes":null,"id":4021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4019,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"2819:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4020,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2835:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2819:30:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4022,"nodeType":"ExpressionStatement","src":"2819:30:18"}]},"documentation":"@dev Constructor creates events and markets for futarchy oracle\n @param _creator Oracle creator\n @param eventFactory Event factory contract\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 @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @param marketFactory Market factory contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param _tradingPeriod Trading period before decision can be determined\n @param startDate Start date for price logging","id":4024,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3956,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3929,"src":"2100:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3957,"modifierName":{"argumentTypes":null,"id":3955,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2094:5:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2094:14:18"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3954,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3929,"name":"proxied","nodeType":"VariableDeclaration","scope":4024,"src":"1707:15:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3928,"name":"address","nodeType":"ElementaryTypeName","src":"1707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3931,"name":"_creator","nodeType":"VariableDeclaration","scope":4024,"src":"1732:16:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3930,"name":"address","nodeType":"ElementaryTypeName","src":"1732:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3933,"name":"eventFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1758:25:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":3932,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"1758:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3935,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4024,"src":"1793:21:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":3934,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1793:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":3937,"name":"oracle","nodeType":"VariableDeclaration","scope":4024,"src":"1824:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":3936,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1824:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3939,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4024,"src":"1847:18:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3938,"name":"uint8","nodeType":"ElementaryTypeName","src":"1847:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3941,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4024,"src":"1875:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3940,"name":"int","nodeType":"ElementaryTypeName","src":"1875:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3943,"name":"upperBound","nodeType":"VariableDeclaration","scope":4024,"src":"1899:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3942,"name":"int","nodeType":"ElementaryTypeName","src":"1899:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3945,"name":"marketFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1923:50:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":3944,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"1923:36:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3947,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4024,"src":"1983:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3946,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1983:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3949,"name":"fee","nodeType":"VariableDeclaration","scope":4024,"src":"2016:10:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3948,"name":"uint24","nodeType":"ElementaryTypeName","src":"2016:6:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3951,"name":"_tradingPeriod","nodeType":"VariableDeclaration","scope":4024,"src":"2036:19:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3950,"name":"uint","nodeType":"ElementaryTypeName","src":"2036:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3953,"name":"startDate","nodeType":"VariableDeclaration","scope":4024,"src":"2065:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3952,"name":"uint","nodeType":"ElementaryTypeName","src":"2065:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1697:388:18"},"payable":false,"returnParameters":{"id":3958,"nodeType":"ParameterList","parameters":[],"src":"2128:0:18"},"scope":4025,"src":"1686:1170:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4271,"src":"877:1981:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4026,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"3025:7:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4027,"nodeType":"InheritanceSpecifier","src":"3025:7:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4028,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"3034:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4029,"nodeType":"InheritanceSpecifier","src":"3034:6:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4030,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"3042:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":4031,"nodeType":"InheritanceSpecifier","src":"3042:18:18"}],"contractDependencies":[3923,4717,6673],"contractKind":"contract","documentation":"@title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n @author Stefan George - ","fullyImplemented":true,"id":4270,"linearizedBaseContracts":[4270,3923,4717,6673],"name":"FutarchyOracle","nodeType":"ContractDefinition","nodes":[{"id":4033,"libraryName":{"contractScope":null,"id":4032,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"3073:8:18","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"3067:21:18","typeName":null},{"body":{"id":4106,"nodeType":"Block","src":"3300:644:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4056,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4045,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"3397:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4046,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"3406:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"id":4047,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3412:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4041,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3349:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3349:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4043,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4044,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3349:47:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":4048,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:71:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4053,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3483:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":4054,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3501:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4049,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3440:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4050,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3440:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4051,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3440:42:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4055,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:69:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3349:160:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4040,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3338:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3338:172:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4058,"nodeType":"ExpressionStatement","src":"3338:172:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4062,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3552:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4059,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3520:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4061,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"3520:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3520:40:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4064,"nodeType":"ExpressionStatement","src":"3520:40:18"},{"body":{"id":4100,"nodeType":"Block","src":"3684:215:18","statements":[{"assignments":[4077],"declarations":[{"constant":false,"id":4077,"name":"market","nodeType":"VariableDeclaration","scope":4107,"src":"3698:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4076,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"3698:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4081,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4078,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3714:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4080,"indexExpression":{"argumentTypes":null,"id":4079,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3722:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3714:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"3698:26:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4089,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3837:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":4090,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3845:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4083,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3788:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3788:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4085,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3788:38:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4087,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:40:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4088,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3788:48:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4091,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:65:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4082,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3780:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4092,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3780:74:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4093,"nodeType":"ExpressionStatement","src":"3780:74:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4097,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3880:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4094,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3868:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"3868:11:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4098,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3868:20:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4099,"nodeType":"ExpressionStatement","src":"3868:20:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4072,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4069,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3659:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4070,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3663:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4071,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3663:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3659:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4101,"initializationExpression":{"assignments":[4066],"declarations":[{"constant":false,"id":4066,"name":"i","nodeType":"VariableDeclaration","scope":4107,"src":"3646:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4065,"name":"uint8","nodeType":"ElementaryTypeName","src":"3646:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4068,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4067,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3656:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3646:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3679:3:18","subExpression":{"argumentTypes":null,"id":4073,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3679:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4075,"nodeType":"ExpressionStatement","src":"3679:3:18"},"nodeType":"ForStatement","src":"3641:258:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4103,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3929:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4102,"name":"FutarchyFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3889,"src":"3913:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4104,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:24:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4105,"nodeType":"EmitStatement","src":"3908:29:18"}]},"documentation":"@dev Funds all markets with equal amount of funding\n @param funding Amount of funding","id":4107,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4038,"modifierName":{"argumentTypes":null,"id":4037,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"3286:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3286:9:18"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":4036,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4035,"name":"funding","nodeType":"VariableDeclaration","scope":4107,"src":"3249:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4034,"name":"uint","nodeType":"ElementaryTypeName","src":"3249:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3248:14:18"},"payable":false,"returnParameters":{"id":4039,"nodeType":"ParameterList","parameters":[],"src":"3300:0:18"},"scope":4270,"src":"3235:709:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4173,"nodeType":"Block","src":"4115:692:18","statements":[{"assignments":[4113],"declarations":[{"constant":false,"id":4113,"name":"market","nodeType":"VariableDeclaration","scope":4174,"src":"4166:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4112,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4166:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4120,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4114,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"4182:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4119,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4116,"name":"getOutcome","nodeType":"Identifier","overloadedDeclarations":[4269],"referencedDeclaration":4269,"src":"4195:10:18","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_int256_$","typeString":"function () view returns (int256)"}},"id":4117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4195:12:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4115,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4190:4:18","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":4118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4190:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4182:27:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"4166:43:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4122,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4227:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4227:29:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4124,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:31:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4125,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4262:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4262:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4127,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4128,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4262:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:37:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4227:72:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4121,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4219:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4131,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4219:81:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4132,"nodeType":"ExpressionStatement","src":"4219:81:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4133,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4404:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4135,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4404:12:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":4136,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4404:14:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4137,"nodeType":"ExpressionStatement","src":"4404:14:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4138,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4428:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4140,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4428:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4141,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4428:37:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4143,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:39:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4144,"nodeType":"ExpressionStatement","src":"4428:39:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4145,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4477:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4477:19:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4477:21:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4149,"nodeType":"ExpressionStatement","src":"4477:21:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4150,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4612:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":135,"src":"4612:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4612:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4154,"nodeType":"ExpressionStatement","src":"4612:33:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4160,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"4707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4165,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"4761:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4161,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4716:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4716:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4716:44:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":4166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:50:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4156,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4663:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4663:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4158,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4159,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"4663:43:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4167,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:104:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4155,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4655:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4168,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4655:113:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4169,"nodeType":"ExpressionStatement","src":"4655:113:18"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4170,"name":"FutarchyClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3891,"src":"4783:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":4171,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4783:17:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4172,"nodeType":"EmitStatement","src":"4778:22:18"}]},"documentation":"@dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator","id":4174,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4110,"modifierName":{"argumentTypes":null,"id":4109,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"4101:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4101:9:18"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":4108,"nodeType":"ParameterList","parameters":[],"src":"4075:2:18"},"payable":false,"returnParameters":{"id":4111,"nodeType":"ParameterList","parameters":[],"src":"4115:0:18"},"scope":4270,"src":"4061:746:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4250,"nodeType":"Block","src":"4947:676:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"5026:6:18","subExpression":{"argumentTypes":null,"id":4178,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5027:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4180,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5036:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4182,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4181,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5044:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5036:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4183,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"startDate","nodeType":"MemberAccess","referencedDeclaration":3186,"src":"5036:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4184,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5036:22:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":4185,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"5061:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:38:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":4187,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5077:3:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:44:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5026:54:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4177,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5018:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4190,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5018:63:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4191,"nodeType":"ExpressionStatement","src":"5018:63:18"},{"assignments":[4193],"declarations":[{"constant":false,"id":4193,"name":"highestAvgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5166:20:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4192,"name":"uint","nodeType":"ElementaryTypeName","src":"5166:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4199,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4194,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5189:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4196,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5197:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5189:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4197,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5189:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5189:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5166:47:18"},{"assignments":[4201],"declarations":[{"constant":false,"id":4201,"name":"highestIndex","nodeType":"VariableDeclaration","scope":4251,"src":"5223:17:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4200,"name":"uint","nodeType":"ElementaryTypeName","src":"5223:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4203,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4202,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5243:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"5223:21:18"},{"body":{"id":4236,"nodeType":"Block","src":"5297:203:18","statements":[{"assignments":[4216],"declarations":[{"constant":false,"id":4216,"name":"avgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5311:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4215,"name":"uint","nodeType":"ElementaryTypeName","src":"5311:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4222,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4217,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5327:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4219,"indexExpression":{"argumentTypes":null,"id":4218,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5335:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5327:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5327:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4221,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5327:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5311:40:18"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4225,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4223,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5369:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4224,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5380:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5369:26:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4235,"nodeType":"IfStatement","src":"5365:125:18","trueBody":{"id":4234,"nodeType":"Block","src":"5397:93:18","statements":[{"expression":{"argumentTypes":null,"id":4228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4226,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5415:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4227,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5433:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5415:26:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4229,"nodeType":"ExpressionStatement","src":"5415:26:18"},{"expression":{"argumentTypes":null,"id":4232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4230,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5459:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4231,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5474:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"5459:16:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4233,"nodeType":"ExpressionStatement","src":"5459:16:18"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4211,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4208,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5272:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4209,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5276:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4210,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5276:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5272:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4237,"initializationExpression":{"assignments":[4205],"declarations":[{"constant":false,"id":4205,"name":"i","nodeType":"VariableDeclaration","scope":4251,"src":"5259:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4204,"name":"uint8","nodeType":"ElementaryTypeName","src":"5259:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4207,"initialValue":{"argumentTypes":null,"hexValue":"31","id":4206,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5269:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"5259:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4213,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"5292:3:18","subExpression":{"argumentTypes":null,"id":4212,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5292:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4214,"nodeType":"ExpressionStatement","src":"5292:3:18"},"nodeType":"ForStatement","src":"5254:246:18"},{"expression":{"argumentTypes":null,"id":4240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4238,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5509:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4239,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5530:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5509:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4241,"nodeType":"ExpressionStatement","src":"5509:33:18"},{"expression":{"argumentTypes":null,"id":4244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4242,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5552:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4243,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"5560:4:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"5552:12:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4245,"nodeType":"ExpressionStatement","src":"5552:12:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4247,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5597:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4246,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3895,"src":"5579:17:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4248,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5579:37:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4249,"nodeType":"EmitStatement","src":"5574:42:18"}]},"documentation":"@dev Allows to set the oracle outcome based on the market with largest long position","id":4251,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4175,"nodeType":"ParameterList","parameters":[],"src":"4925:2:18"},"payable":false,"returnParameters":{"id":4176,"nodeType":"ParameterList","parameters":[],"src":"4947:0:18"},"scope":4270,"src":"4906:717:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4258,"nodeType":"Block","src":"5787:29:18","statements":[{"expression":{"argumentTypes":null,"id":4256,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5804:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4255,"id":4257,"nodeType":"Return","src":"5797:12:18"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4259,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4252,"nodeType":"ParameterList","parameters":[],"src":"5729:2:18"},"payable":false,"returnParameters":{"id":4255,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4254,"name":"","nodeType":"VariableDeclaration","scope":4259,"src":"5777:4:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4253,"name":"bool","nodeType":"ElementaryTypeName","src":"5777:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5776:6:18"},"scope":4270,"src":"5708:108:18","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4268,"nodeType":"Block","src":"5959:47:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4265,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5980:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4264,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5976:3:18","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":4266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5976:23:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4263,"id":4267,"nodeType":"Return","src":"5969:30:18"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4269,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4260,"nodeType":"ParameterList","parameters":[],"src":"5902:2:18"},"payable":false,"returnParameters":{"id":4263,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4262,"name":"","nodeType":"VariableDeclaration","scope":4269,"src":"5950:3:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4261,"name":"int","nodeType":"ElementaryTypeName","src":"5950:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"5949:5:18"},"scope":4270,"src":"5883:123:18","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4271,"src":"2998:3010:18"}],"src":"0:6009:18"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","exportedSymbols":{"FutarchyOracle":[4270],"FutarchyOracleData":[3923],"FutarchyOracleProxy":[4025]},"id":4271,"nodeType":"SourceUnit","nodes":[{"id":3881,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:18"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3882,"nodeType":"ImportDirective","scope":4271,"sourceUnit":4718,"src":"25:31:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","file":"../Events/EventFactory.sol","id":3883,"nodeType":"ImportDirective","scope":4271,"sourceUnit":579,"src":"57:36:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","file":"../Markets/StandardMarketWithPriceLoggerFactory.sol","id":3884,"nodeType":"ImportDirective","scope":4271,"sourceUnit":3528,"src":"94:61:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3885,"nodeType":"ImportDirective","scope":4271,"sourceUnit":6702,"src":"156:55:18","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3923,"linearizedBaseContracts":[3923],"name":"FutarchyOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3889,"name":"FutarchyFunding","nodeType":"EventDefinition","parameters":{"id":3888,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3887,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":3889,"src":"301:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3886,"name":"uint","nodeType":"ElementaryTypeName","src":"301:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"300:14:18"},"src":"279:36:18"},{"anonymous":false,"documentation":null,"id":3891,"name":"FutarchyClosing","nodeType":"EventDefinition","parameters":{"id":3890,"nodeType":"ParameterList","parameters":[],"src":"341:2:18"},"src":"320:24:18"},{"anonymous":false,"documentation":null,"id":3895,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3894,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3893,"indexed":false,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3895,"src":"373:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3892,"name":"uint","nodeType":"ElementaryTypeName","src":"373:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"372:25:18"},"src":"349:49:18"},{"constant":true,"id":3898,"name":"LONG","nodeType":"VariableDeclaration","scope":3923,"src":"437:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3896,"name":"uint8","nodeType":"ElementaryTypeName","src":"437:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3897,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"466:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3900,"name":"creator","nodeType":"VariableDeclaration","scope":3923,"src":"505:15:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3899,"name":"address","nodeType":"ElementaryTypeName","src":"505:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3903,"name":"markets","nodeType":"VariableDeclaration","scope":3923,"src":"526:46:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[]"},"typeName":{"baseType":{"contractScope":null,"id":3901,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"526:29:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3902,"length":null,"nodeType":"ArrayTypeName","src":"526:31:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage_ptr","typeString":"contract StandardMarketWithPriceLogger[]"}},"value":null,"visibility":"public"},{"constant":false,"id":3905,"name":"categoricalEvent","nodeType":"VariableDeclaration","scope":3923,"src":"578:40:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":3904,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"578:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":3907,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":3923,"src":"624:25:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3906,"name":"uint","nodeType":"ElementaryTypeName","src":"624:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3909,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3923,"src":"655:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3908,"name":"uint","nodeType":"ElementaryTypeName","src":"655:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3911,"name":"isSet","nodeType":"VariableDeclaration","scope":3923,"src":"691:17:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3910,"name":"bool","nodeType":"ElementaryTypeName","src":"691:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"body":{"id":3921,"nodeType":"Block","src":"769:104:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3914,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"833:3:18","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"833:10:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3916,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"847:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"833:21:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3913,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"825:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3918,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"825:30:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3919,"nodeType":"ExpressionStatement","src":"825:30:18"},{"id":3920,"nodeType":"PlaceholderStatement","src":"865:1:18"}]},"documentation":null,"id":3922,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":3912,"nodeType":"ParameterList","parameters":[],"src":"766:2:18"},"src":"748:125:18","visibility":"internal"}],"scope":4271,"src":"214:661:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3924,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"909:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3925,"nodeType":"InheritanceSpecifier","src":"909:5:18"},{"arguments":null,"baseName":{"contractScope":null,"id":3926,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"916:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":3927,"nodeType":"InheritanceSpecifier","src":"916:18:18"}],"contractDependencies":[3923,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4025,"linearizedBaseContracts":[4025,3923,6701,6673],"name":"FutarchyOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4023,"nodeType":"Block","src":"2128:728:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3962,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3960,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2193:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2210:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2193:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3959,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2185:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3963,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2185:27:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3964,"nodeType":"ExpressionStatement","src":"2185:27:18"},{"expression":{"argumentTypes":null,"id":3974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3965,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2255:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3968,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3935,"src":"2310:15:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3970,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7723,"src":"2334:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}],"id":3969,"name":"Oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4717,"src":"2327:6:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Oracle_$4717_$","typeString":"type(contract Oracle)"}},"id":3971,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2327:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3972,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3939,"src":"2341:12:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3966,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2274:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3967,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createCategoricalEvent","nodeType":"MemberAccess","referencedDeclaration":511,"src":"2274:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$_t_contract$_CategoricalEvent_$152_$","typeString":"function (contract ERC20,contract Oracle,uint8) external returns (contract CategoricalEvent)"}},"id":3973,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2274:80:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2255:99:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3975,"nodeType":"ExpressionStatement","src":"2255:99:18"},{"body":{"id":4013,"nodeType":"Block","src":"2460:322:18","statements":[{"assignments":[3989],"declarations":[{"constant":false,"id":3989,"name":"scalarEvent","nodeType":"VariableDeclaration","scope":4024,"src":"2474:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":3988,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"2474:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"}],"id":4000,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3994,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2579:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3992,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2548:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3993,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2548:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2548:33:18","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":3996,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3937,"src":"2599:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3997,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3941,"src":"2623:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":3998,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3943,"src":"2651:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3990,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2500:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3991,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createScalarEvent","nodeType":"MemberAccess","referencedDeclaration":577,"src":"2500:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$_t_contract$_ScalarEvent_$840_$","typeString":"function (contract ERC20,contract Oracle,int256,int256) external returns (contract ScalarEvent)"}},"id":3999,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2500:175:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"VariableDeclarationStatement","src":"2474:201:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4006,"name":"scalarEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3989,"src":"2729:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":4007,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3947,"src":"2742:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4008,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3949,"src":"2755:3:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4009,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3953,"src":"2760:9:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4004,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3945,"src":"2702:13:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"id":4005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3526,"src":"2702:26:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$_t_contract$_StandardMarketWithPriceLogger_$3458_$","typeString":"function (contract Event,contract MarketMaker,uint24,uint256) external returns (contract StandardMarketWithPriceLogger)"}},"id":4010,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2702:68:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}],"expression":{"argumentTypes":null,"id":4001,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"2689:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2689:12:18","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_StandardMarketWithPriceLogger_$3458_$returns$_t_uint256_$","typeString":"function (contract StandardMarketWithPriceLogger) returns (uint256)"}},"id":4011,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2689:82:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4012,"nodeType":"ExpressionStatement","src":"2689:82:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3980,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2415:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3981,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2419:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2419:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3983,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2419:34:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2415:38:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4014,"initializationExpression":{"assignments":[3977],"declarations":[{"constant":false,"id":3977,"name":"i","nodeType":"VariableDeclaration","scope":4024,"src":"2402:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3976,"name":"uint8","nodeType":"ElementaryTypeName","src":"2402:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":3979,"initialValue":{"argumentTypes":null,"hexValue":"30","id":3978,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2412:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2402:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":3986,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2455:3:18","subExpression":{"argumentTypes":null,"id":3985,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2455:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":3987,"nodeType":"ExpressionStatement","src":"2455:3:18"},"nodeType":"ForStatement","src":"2397:385:18"},{"expression":{"argumentTypes":null,"id":4017,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4015,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"2791:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4016,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3931,"src":"2801:8:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2791:18:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4018,"nodeType":"ExpressionStatement","src":"2791:18:18"},{"expression":{"argumentTypes":null,"id":4021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4019,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"2819:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4020,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2835:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2819:30:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4022,"nodeType":"ExpressionStatement","src":"2819:30:18"}]},"documentation":"@dev Constructor creates events and markets for futarchy oracle\n @param _creator Oracle creator\n @param eventFactory Event factory contract\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 @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @param marketFactory Market factory contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param _tradingPeriod Trading period before decision can be determined\n @param startDate Start date for price logging","id":4024,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3956,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3929,"src":"2100:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3957,"modifierName":{"argumentTypes":null,"id":3955,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2094:5:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2094:14:18"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3954,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3929,"name":"proxied","nodeType":"VariableDeclaration","scope":4024,"src":"1707:15:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3928,"name":"address","nodeType":"ElementaryTypeName","src":"1707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3931,"name":"_creator","nodeType":"VariableDeclaration","scope":4024,"src":"1732:16:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3930,"name":"address","nodeType":"ElementaryTypeName","src":"1732:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3933,"name":"eventFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1758:25:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":3932,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"1758:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3935,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4024,"src":"1793:21:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":3934,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1793:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":3937,"name":"oracle","nodeType":"VariableDeclaration","scope":4024,"src":"1824:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":3936,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1824:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3939,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4024,"src":"1847:18:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3938,"name":"uint8","nodeType":"ElementaryTypeName","src":"1847:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3941,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4024,"src":"1875:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3940,"name":"int","nodeType":"ElementaryTypeName","src":"1875:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3943,"name":"upperBound","nodeType":"VariableDeclaration","scope":4024,"src":"1899:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3942,"name":"int","nodeType":"ElementaryTypeName","src":"1899:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3945,"name":"marketFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1923:50:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":3944,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"1923:36:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3947,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4024,"src":"1983:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3946,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1983:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3949,"name":"fee","nodeType":"VariableDeclaration","scope":4024,"src":"2016:10:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3948,"name":"uint24","nodeType":"ElementaryTypeName","src":"2016:6:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3951,"name":"_tradingPeriod","nodeType":"VariableDeclaration","scope":4024,"src":"2036:19:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3950,"name":"uint","nodeType":"ElementaryTypeName","src":"2036:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3953,"name":"startDate","nodeType":"VariableDeclaration","scope":4024,"src":"2065:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3952,"name":"uint","nodeType":"ElementaryTypeName","src":"2065:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1697:388:18"},"payable":false,"returnParameters":{"id":3958,"nodeType":"ParameterList","parameters":[],"src":"2128:0:18"},"scope":4025,"src":"1686:1170:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4271,"src":"877:1981:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4026,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"3025:7:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4027,"nodeType":"InheritanceSpecifier","src":"3025:7:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4028,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"3034:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4029,"nodeType":"InheritanceSpecifier","src":"3034:6:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4030,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"3042:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":4031,"nodeType":"InheritanceSpecifier","src":"3042:18:18"}],"contractDependencies":[3923,4717,6673],"contractKind":"contract","documentation":"@title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n @author Stefan George - ","fullyImplemented":true,"id":4270,"linearizedBaseContracts":[4270,3923,4717,6673],"name":"FutarchyOracle","nodeType":"ContractDefinition","nodes":[{"id":4033,"libraryName":{"contractScope":null,"id":4032,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"3073:8:18","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"3067:21:18","typeName":null},{"body":{"id":4106,"nodeType":"Block","src":"3300:644:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4056,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4045,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"3397:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4046,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"3406:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"id":4047,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3412:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4041,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3349:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3349:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4043,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4044,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3349:47:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":4048,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:71:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4053,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3483:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":4054,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3501:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4049,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3440:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4050,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3440:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4051,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3440:42:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4055,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:69:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3349:160:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4040,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3338:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3338:172:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4058,"nodeType":"ExpressionStatement","src":"3338:172:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4062,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3552:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4059,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3520:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4061,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"3520:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3520:40:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4064,"nodeType":"ExpressionStatement","src":"3520:40:18"},{"body":{"id":4100,"nodeType":"Block","src":"3684:215:18","statements":[{"assignments":[4077],"declarations":[{"constant":false,"id":4077,"name":"market","nodeType":"VariableDeclaration","scope":4107,"src":"3698:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4076,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"3698:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4081,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4078,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3714:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4080,"indexExpression":{"argumentTypes":null,"id":4079,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3722:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3714:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"3698:26:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4089,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3837:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":4090,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3845:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4083,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3788:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3788:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4085,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3788:38:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4087,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:40:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4088,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3788:48:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4091,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:65:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4082,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3780:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4092,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3780:74:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4093,"nodeType":"ExpressionStatement","src":"3780:74:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4097,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3880:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4094,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3868:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"3868:11:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4098,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3868:20:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4099,"nodeType":"ExpressionStatement","src":"3868:20:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4072,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4069,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3659:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4070,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3663:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4071,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3663:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3659:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4101,"initializationExpression":{"assignments":[4066],"declarations":[{"constant":false,"id":4066,"name":"i","nodeType":"VariableDeclaration","scope":4107,"src":"3646:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4065,"name":"uint8","nodeType":"ElementaryTypeName","src":"3646:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4068,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4067,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3656:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3646:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3679:3:18","subExpression":{"argumentTypes":null,"id":4073,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3679:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4075,"nodeType":"ExpressionStatement","src":"3679:3:18"},"nodeType":"ForStatement","src":"3641:258:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4103,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3929:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4102,"name":"FutarchyFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3889,"src":"3913:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4104,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:24:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4105,"nodeType":"EmitStatement","src":"3908:29:18"}]},"documentation":"@dev Funds all markets with equal amount of funding\n @param funding Amount of funding","id":4107,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4038,"modifierName":{"argumentTypes":null,"id":4037,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"3286:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3286:9:18"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":4036,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4035,"name":"funding","nodeType":"VariableDeclaration","scope":4107,"src":"3249:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4034,"name":"uint","nodeType":"ElementaryTypeName","src":"3249:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3248:14:18"},"payable":false,"returnParameters":{"id":4039,"nodeType":"ParameterList","parameters":[],"src":"3300:0:18"},"scope":4270,"src":"3235:709:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4173,"nodeType":"Block","src":"4115:692:18","statements":[{"assignments":[4113],"declarations":[{"constant":false,"id":4113,"name":"market","nodeType":"VariableDeclaration","scope":4174,"src":"4166:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4112,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4166:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4120,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4114,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"4182:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4119,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4116,"name":"getOutcome","nodeType":"Identifier","overloadedDeclarations":[4269],"referencedDeclaration":4269,"src":"4195:10:18","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_int256_$","typeString":"function () view returns (int256)"}},"id":4117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4195:12:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4115,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4190:4:18","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":4118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4190:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4182:27:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"4166:43:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4122,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4227:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4227:29:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4124,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:31:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4125,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4262:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4262:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4127,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4128,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4262:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:37:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4227:72:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4121,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4219:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4131,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4219:81:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4132,"nodeType":"ExpressionStatement","src":"4219:81:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4133,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4404:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4135,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4404:12:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":4136,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4404:14:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4137,"nodeType":"ExpressionStatement","src":"4404:14:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4138,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4428:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4140,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4428:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4141,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4428:37:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4143,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:39:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4144,"nodeType":"ExpressionStatement","src":"4428:39:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4145,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4477:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4477:19:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4477:21:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4149,"nodeType":"ExpressionStatement","src":"4477:21:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4150,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4612:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":135,"src":"4612:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4612:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4154,"nodeType":"ExpressionStatement","src":"4612:33:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4160,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"4707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4165,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"4761:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4161,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4716:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4716:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4716:44:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":4166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:50:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4156,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4663:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4663:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4158,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4159,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"4663:43:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4167,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:104:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4155,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4655:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4168,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4655:113:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4169,"nodeType":"ExpressionStatement","src":"4655:113:18"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4170,"name":"FutarchyClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3891,"src":"4783:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":4171,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4783:17:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4172,"nodeType":"EmitStatement","src":"4778:22:18"}]},"documentation":"@dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator","id":4174,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4110,"modifierName":{"argumentTypes":null,"id":4109,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"4101:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4101:9:18"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":4108,"nodeType":"ParameterList","parameters":[],"src":"4075:2:18"},"payable":false,"returnParameters":{"id":4111,"nodeType":"ParameterList","parameters":[],"src":"4115:0:18"},"scope":4270,"src":"4061:746:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4250,"nodeType":"Block","src":"4947:676:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"5026:6:18","subExpression":{"argumentTypes":null,"id":4178,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5027:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4180,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5036:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4182,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4181,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5044:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5036:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4183,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"startDate","nodeType":"MemberAccess","referencedDeclaration":3186,"src":"5036:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4184,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5036:22:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":4185,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"5061:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:38:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":4187,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5077:3:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:44:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5026:54:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4177,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5018:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4190,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5018:63:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4191,"nodeType":"ExpressionStatement","src":"5018:63:18"},{"assignments":[4193],"declarations":[{"constant":false,"id":4193,"name":"highestAvgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5166:20:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4192,"name":"uint","nodeType":"ElementaryTypeName","src":"5166:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4199,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4194,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5189:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4196,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5197:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5189:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4197,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5189:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5189:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5166:47:18"},{"assignments":[4201],"declarations":[{"constant":false,"id":4201,"name":"highestIndex","nodeType":"VariableDeclaration","scope":4251,"src":"5223:17:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4200,"name":"uint","nodeType":"ElementaryTypeName","src":"5223:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4203,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4202,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5243:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"5223:21:18"},{"body":{"id":4236,"nodeType":"Block","src":"5297:203:18","statements":[{"assignments":[4216],"declarations":[{"constant":false,"id":4216,"name":"avgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5311:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4215,"name":"uint","nodeType":"ElementaryTypeName","src":"5311:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4222,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4217,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5327:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4219,"indexExpression":{"argumentTypes":null,"id":4218,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5335:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5327:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5327:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4221,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5327:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5311:40:18"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4225,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4223,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5369:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4224,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5380:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5369:26:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4235,"nodeType":"IfStatement","src":"5365:125:18","trueBody":{"id":4234,"nodeType":"Block","src":"5397:93:18","statements":[{"expression":{"argumentTypes":null,"id":4228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4226,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5415:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4227,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5433:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5415:26:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4229,"nodeType":"ExpressionStatement","src":"5415:26:18"},{"expression":{"argumentTypes":null,"id":4232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4230,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5459:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4231,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5474:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"5459:16:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4233,"nodeType":"ExpressionStatement","src":"5459:16:18"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4211,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4208,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5272:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4209,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5276:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4210,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5276:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5272:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4237,"initializationExpression":{"assignments":[4205],"declarations":[{"constant":false,"id":4205,"name":"i","nodeType":"VariableDeclaration","scope":4251,"src":"5259:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4204,"name":"uint8","nodeType":"ElementaryTypeName","src":"5259:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4207,"initialValue":{"argumentTypes":null,"hexValue":"31","id":4206,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5269:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"5259:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4213,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"5292:3:18","subExpression":{"argumentTypes":null,"id":4212,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5292:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4214,"nodeType":"ExpressionStatement","src":"5292:3:18"},"nodeType":"ForStatement","src":"5254:246:18"},{"expression":{"argumentTypes":null,"id":4240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4238,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5509:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4239,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5530:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5509:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4241,"nodeType":"ExpressionStatement","src":"5509:33:18"},{"expression":{"argumentTypes":null,"id":4244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4242,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5552:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4243,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"5560:4:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"5552:12:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4245,"nodeType":"ExpressionStatement","src":"5552:12:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4247,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5597:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4246,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3895,"src":"5579:17:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4248,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5579:37:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4249,"nodeType":"EmitStatement","src":"5574:42:18"}]},"documentation":"@dev Allows to set the oracle outcome based on the market with largest long position","id":4251,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4175,"nodeType":"ParameterList","parameters":[],"src":"4925:2:18"},"payable":false,"returnParameters":{"id":4176,"nodeType":"ParameterList","parameters":[],"src":"4947:0:18"},"scope":4270,"src":"4906:717:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4258,"nodeType":"Block","src":"5787:29:18","statements":[{"expression":{"argumentTypes":null,"id":4256,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5804:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4255,"id":4257,"nodeType":"Return","src":"5797:12:18"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4259,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4252,"nodeType":"ParameterList","parameters":[],"src":"5729:2:18"},"payable":false,"returnParameters":{"id":4255,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4254,"name":"","nodeType":"VariableDeclaration","scope":4259,"src":"5777:4:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4253,"name":"bool","nodeType":"ElementaryTypeName","src":"5777:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5776:6:18"},"scope":4270,"src":"5708:108:18","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4268,"nodeType":"Block","src":"5959:47:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4265,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5980:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4264,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5976:3:18","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":4266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5976:23:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4263,"id":4267,"nodeType":"Return","src":"5969:30:18"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4269,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4260,"nodeType":"ParameterList","parameters":[],"src":"5902:2:18"},"payable":false,"returnParameters":{"id":4263,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4262,"name":"","nodeType":"VariableDeclaration","scope":4269,"src":"5950:3:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4261,"name":"int","nodeType":"ElementaryTypeName","src":"5950:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"5949:5:18"},"scope":4270,"src":"5883:123:18","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4271,"src":"2998:3010:18"}],"src":"0:6009:18"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0x9ecf85309edaedf74d722120b33a9ea9fa1a6a52","transactionHash":"0x52087715112039c4c2a27692d742b0d7674f57c017a627a2fb58369683fc0a68"},"4":{"address":"0x8195accf76288a0f3a067dcf034094452261b231","transactionHash":"0x86ec1b7206c04ae1c65ea1e7e3225ab9fba3dc951753b52b4913aa61890986d4"},"42":{"address":"0x6f54658e5c43f7d00a94b60cb3f666a480c46283","transactionHash":"0x28bd51951c3ea694d87b176d95e067d2759f23ae3b27a5ba8352a3c7c32264a4"},"437894314312":{"address":"0xd833215cbcc3f914bd1c9ece3ee7bf8b14f841bb","transactionHash":"0xc70c607c64d6a5403a6244cb7a8a173e7d496811ee35a20a4aca1527bc97e507"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:49.444Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracleData.json": +/*!**************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracleData.json ***! + \**************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"FutarchyOracle","abi":[{"constant":false,"inputs":[],"name":"setOutcome","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"winningMarketIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"markets","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"categoricalEvent","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"funding","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tradingPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"_creator","type":"address"},{"name":"eventFactory","type":"address"},{"name":"collateralToken","type":"address"},{"name":"oracle","type":"address"},{"name":"outcomeCount","type":"uint8"},{"name":"lowerBound","type":"int256"},{"name":"upperBound","type":"int256"},{"name":"marketFactory","type":"address"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"},{"name":"_tradingPeriod","type":"uint256"},{"name":"startDate","type":"uint256"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"FutarchyFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"FutarchyClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winningMarketIndex","type":"uint256"}],"name":"OutcomeAssignment","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263312}; +module.exports = {"contractName":"FutarchyOracleData","abi":[{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"winningMarketIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"markets","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"categoricalEvent","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradingPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"FutarchyFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"FutarchyClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winningMarketIndex","type":"uint256"}],"name":"OutcomeAssignment","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b506102ab806100206000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063561cce0a1461007d57806356cfb75f146100ae578063b1283e77146100d9578063c3730d0314610146578063c65fb3801461019d578063f86e3153146101cc575b600080fd5b34801561008957600080fd5b506100926101f7565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100ba57600080fd5b506100c36101fc565b6040518082815260200191505060405180910390f35b3480156100e557600080fd5b5061010460048036038101908080359060200190929190505050610202565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015257600080fd5b5061015b610240565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a957600080fd5b506101b2610266565b604051808215151515815260200191505060405180910390f35b3480156101d857600080fd5b506101e1610279565b6040518082815260200191505060405180910390f35b600181565b60045481565b60018181548110151561021157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900460ff1681565b600354815600a165627a7a723058204a6de98e4ffabcbc5f15a16eba4ab1a8bedc24ac6aadf614d2d6e364de3ff0930029","deployedBytecode":"0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063561cce0a1461007d57806356cfb75f146100ae578063b1283e77146100d9578063c3730d0314610146578063c65fb3801461019d578063f86e3153146101cc575b600080fd5b34801561008957600080fd5b506100926101f7565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100ba57600080fd5b506100c36101fc565b6040518082815260200191505060405180910390f35b3480156100e557600080fd5b5061010460048036038101908080359060200190929190505050610202565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015257600080fd5b5061015b610240565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a957600080fd5b506101b2610266565b604051808215151515815260200191505060405180910390f35b3480156101d857600080fd5b506101e1610279565b6040518082815260200191505060405180910390f35b600181565b60045481565b60018181548110151561021157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900460ff1681565b600354815600a165627a7a723058204a6de98e4ffabcbc5f15a16eba4ab1a8bedc24ac6aadf614d2d6e364de3ff0930029","sourceMap":"214:661:18:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;214:661:18;;;;;;;","deployedSourceMap":"214:661:18:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;437:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;437:30:18;;;;;;;;;;;;;;;;;;;;;;;;;;;655;;8:9:-1;5:2;;;30:1;27;20:12;5:2;655:30:18;;;;;;;;;;;;;;;;;;;;;;;526:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;526:46:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;578:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;578:40:18;;;;;;;;;;;;;;;;;;;;;;;;;;;691:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;691:17:18;;;;;;;;;;;;;;;;;;;;;;;;;;;624:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;624:25:18;;;;;;;;;;;;;;;;;;;;;;;437:30;466:1;437:30;:::o;655:::-;;;;:::o;526:46::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;578:40::-;;;;;;;;;;;;;:::o;691:17::-;;;;;;;;;;;;;:::o;624:25::-;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"../Events/EventFactory.sol\";\nimport \"../Markets/StandardMarketWithPriceLoggerFactory.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract FutarchyOracleData {\n\n /*\n * Events\n */\n event FutarchyFunding(uint funding);\n event FutarchyClosing();\n event OutcomeAssignment(uint winningMarketIndex);\n\n /*\n * Constants\n */\n uint8 public constant LONG = 1;\n\n /*\n * Storage\n */\n address creator;\n StandardMarketWithPriceLogger[] public markets;\n CategoricalEvent public categoricalEvent;\n uint public tradingPeriod;\n uint public winningMarketIndex;\n bool public isSet;\n\n /*\n * Modifiers\n */\n modifier isCreator() {\n // Only creator is allowed to proceed\n require(msg.sender == creator);\n _;\n }\n}\n\ncontract FutarchyOracleProxy is Proxy, FutarchyOracleData {\n\n /// @dev Constructor creates events and markets for futarchy oracle\n /// @param _creator Oracle creator\n /// @param eventFactory Event factory contract\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 /// @param lowerBound Lower bound for event outcome\n /// @param upperBound Lower bound for event outcome\n /// @param marketFactory Market factory contract\n /// @param marketMaker Market maker contract\n /// @param fee Market fee\n /// @param _tradingPeriod Trading period before decision can be determined\n /// @param startDate Start date for price logging\n constructor(\n address proxied,\n address _creator,\n EventFactory eventFactory,\n ERC20 collateralToken,\n Oracle oracle,\n uint8 outcomeCount,\n int lowerBound,\n int upperBound,\n StandardMarketWithPriceLoggerFactory marketFactory,\n MarketMaker marketMaker,\n uint24 fee,\n uint _tradingPeriod,\n uint startDate\n )\n Proxy(proxied)\n public\n {\n // trading period is at least a second\n require(_tradingPeriod > 0);\n // Create decision event\n categoricalEvent = eventFactory.createCategoricalEvent(collateralToken, Oracle(this), outcomeCount);\n // Create outcome events\n for (uint8 i = 0; i < categoricalEvent.getOutcomeCount(); i++) {\n ScalarEvent scalarEvent = eventFactory.createScalarEvent(\n categoricalEvent.outcomeTokens(i),\n oracle,\n lowerBound,\n upperBound\n );\n markets.push(marketFactory.createMarket(scalarEvent, marketMaker, fee, startDate));\n }\n creator = _creator;\n tradingPeriod = _tradingPeriod;\n }\n}\n\n/// @title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n/// @author Stefan George - \ncontract FutarchyOracle is Proxied, Oracle, FutarchyOracleData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Funds all markets with equal amount of funding\n /// @param funding Amount of funding\n function fund(uint funding)\n public\n isCreator\n {\n // Buy all outcomes\n require( categoricalEvent.collateralToken().transferFrom(creator, this, funding)\n && categoricalEvent.collateralToken().approve(categoricalEvent, funding));\n categoricalEvent.buyAllOutcomes(funding);\n // Fund each market with outcome tokens from categorical event\n for (uint8 i = 0; i < markets.length; i++) {\n Market market = markets[i];\n // Approve funding for market\n require(market.eventContract().collateralToken().approve(market, funding));\n market.fund(funding);\n }\n emit FutarchyFunding(funding);\n }\n\n /// @dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator\n function close()\n public\n isCreator\n {\n // Winning outcome has to be set\n Market market = markets[uint(getOutcome())];\n require(categoricalEvent.isOutcomeSet() && market.eventContract().isOutcomeSet());\n // Close market and transfer all outcome tokens from winning outcome to this contract\n market.close();\n market.eventContract().redeemWinnings();\n market.withdrawFees();\n // Redeem collateral token for winning outcome tokens and transfer collateral tokens to creator\n categoricalEvent.redeemWinnings();\n require(categoricalEvent.collateralToken().transfer(creator, categoricalEvent.collateralToken().balanceOf(this)));\n emit FutarchyClosing();\n }\n\n /// @dev Allows to set the oracle outcome based on the market with largest long position\n function setOutcome()\n public\n {\n // Outcome is not set yet and trading period is over\n require(!isSet && markets[0].startDate() + tradingPeriod < now);\n // Find market with highest marginal price for long outcome tokens\n uint highestAvgPrice = markets[0].getAvgPrice();\n uint highestIndex = 0;\n for (uint8 i = 1; i < markets.length; i++) {\n uint avgPrice = markets[i].getAvgPrice();\n if (avgPrice > highestAvgPrice) {\n highestAvgPrice = avgPrice;\n highestIndex = i;\n }\n }\n winningMarketIndex = highestIndex;\n isSet = true;\n emit OutcomeAssignment(winningMarketIndex);\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return int(winningMarketIndex);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","exportedSymbols":{"FutarchyOracle":[4270],"FutarchyOracleData":[3923],"FutarchyOracleProxy":[4025]},"id":4271,"nodeType":"SourceUnit","nodes":[{"id":3881,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:18"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3882,"nodeType":"ImportDirective","scope":4271,"sourceUnit":4718,"src":"25:31:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","file":"../Events/EventFactory.sol","id":3883,"nodeType":"ImportDirective","scope":4271,"sourceUnit":579,"src":"57:36:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","file":"../Markets/StandardMarketWithPriceLoggerFactory.sol","id":3884,"nodeType":"ImportDirective","scope":4271,"sourceUnit":3528,"src":"94:61:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3885,"nodeType":"ImportDirective","scope":4271,"sourceUnit":6702,"src":"156:55:18","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3923,"linearizedBaseContracts":[3923],"name":"FutarchyOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3889,"name":"FutarchyFunding","nodeType":"EventDefinition","parameters":{"id":3888,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3887,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":3889,"src":"301:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3886,"name":"uint","nodeType":"ElementaryTypeName","src":"301:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"300:14:18"},"src":"279:36:18"},{"anonymous":false,"documentation":null,"id":3891,"name":"FutarchyClosing","nodeType":"EventDefinition","parameters":{"id":3890,"nodeType":"ParameterList","parameters":[],"src":"341:2:18"},"src":"320:24:18"},{"anonymous":false,"documentation":null,"id":3895,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3894,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3893,"indexed":false,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3895,"src":"373:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3892,"name":"uint","nodeType":"ElementaryTypeName","src":"373:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"372:25:18"},"src":"349:49:18"},{"constant":true,"id":3898,"name":"LONG","nodeType":"VariableDeclaration","scope":3923,"src":"437:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3896,"name":"uint8","nodeType":"ElementaryTypeName","src":"437:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3897,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"466:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3900,"name":"creator","nodeType":"VariableDeclaration","scope":3923,"src":"505:15:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3899,"name":"address","nodeType":"ElementaryTypeName","src":"505:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3903,"name":"markets","nodeType":"VariableDeclaration","scope":3923,"src":"526:46:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[]"},"typeName":{"baseType":{"contractScope":null,"id":3901,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"526:29:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3902,"length":null,"nodeType":"ArrayTypeName","src":"526:31:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage_ptr","typeString":"contract StandardMarketWithPriceLogger[]"}},"value":null,"visibility":"public"},{"constant":false,"id":3905,"name":"categoricalEvent","nodeType":"VariableDeclaration","scope":3923,"src":"578:40:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":3904,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"578:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":3907,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":3923,"src":"624:25:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3906,"name":"uint","nodeType":"ElementaryTypeName","src":"624:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3909,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3923,"src":"655:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3908,"name":"uint","nodeType":"ElementaryTypeName","src":"655:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3911,"name":"isSet","nodeType":"VariableDeclaration","scope":3923,"src":"691:17:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3910,"name":"bool","nodeType":"ElementaryTypeName","src":"691:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"body":{"id":3921,"nodeType":"Block","src":"769:104:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3914,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"833:3:18","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"833:10:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3916,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"847:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"833:21:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3913,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"825:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3918,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"825:30:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3919,"nodeType":"ExpressionStatement","src":"825:30:18"},{"id":3920,"nodeType":"PlaceholderStatement","src":"865:1:18"}]},"documentation":null,"id":3922,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":3912,"nodeType":"ParameterList","parameters":[],"src":"766:2:18"},"src":"748:125:18","visibility":"internal"}],"scope":4271,"src":"214:661:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3924,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"909:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3925,"nodeType":"InheritanceSpecifier","src":"909:5:18"},{"arguments":null,"baseName":{"contractScope":null,"id":3926,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"916:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":3927,"nodeType":"InheritanceSpecifier","src":"916:18:18"}],"contractDependencies":[3923,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4025,"linearizedBaseContracts":[4025,3923,6701,6673],"name":"FutarchyOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4023,"nodeType":"Block","src":"2128:728:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3962,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3960,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2193:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2210:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2193:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3959,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2185:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3963,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2185:27:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3964,"nodeType":"ExpressionStatement","src":"2185:27:18"},{"expression":{"argumentTypes":null,"id":3974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3965,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2255:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3968,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3935,"src":"2310:15:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3970,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7723,"src":"2334:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}],"id":3969,"name":"Oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4717,"src":"2327:6:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Oracle_$4717_$","typeString":"type(contract Oracle)"}},"id":3971,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2327:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3972,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3939,"src":"2341:12:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3966,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2274:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3967,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createCategoricalEvent","nodeType":"MemberAccess","referencedDeclaration":511,"src":"2274:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$_t_contract$_CategoricalEvent_$152_$","typeString":"function (contract ERC20,contract Oracle,uint8) external returns (contract CategoricalEvent)"}},"id":3973,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2274:80:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2255:99:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3975,"nodeType":"ExpressionStatement","src":"2255:99:18"},{"body":{"id":4013,"nodeType":"Block","src":"2460:322:18","statements":[{"assignments":[3989],"declarations":[{"constant":false,"id":3989,"name":"scalarEvent","nodeType":"VariableDeclaration","scope":4024,"src":"2474:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":3988,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"2474:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"}],"id":4000,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3994,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2579:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3992,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2548:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3993,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2548:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2548:33:18","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":3996,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3937,"src":"2599:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3997,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3941,"src":"2623:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":3998,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3943,"src":"2651:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3990,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2500:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3991,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createScalarEvent","nodeType":"MemberAccess","referencedDeclaration":577,"src":"2500:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$_t_contract$_ScalarEvent_$840_$","typeString":"function (contract ERC20,contract Oracle,int256,int256) external returns (contract ScalarEvent)"}},"id":3999,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2500:175:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"VariableDeclarationStatement","src":"2474:201:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4006,"name":"scalarEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3989,"src":"2729:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":4007,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3947,"src":"2742:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4008,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3949,"src":"2755:3:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4009,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3953,"src":"2760:9:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4004,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3945,"src":"2702:13:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"id":4005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3526,"src":"2702:26:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$_t_contract$_StandardMarketWithPriceLogger_$3458_$","typeString":"function (contract Event,contract MarketMaker,uint24,uint256) external returns (contract StandardMarketWithPriceLogger)"}},"id":4010,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2702:68:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}],"expression":{"argumentTypes":null,"id":4001,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"2689:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2689:12:18","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_StandardMarketWithPriceLogger_$3458_$returns$_t_uint256_$","typeString":"function (contract StandardMarketWithPriceLogger) returns (uint256)"}},"id":4011,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2689:82:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4012,"nodeType":"ExpressionStatement","src":"2689:82:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3980,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2415:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3981,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2419:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2419:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3983,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2419:34:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2415:38:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4014,"initializationExpression":{"assignments":[3977],"declarations":[{"constant":false,"id":3977,"name":"i","nodeType":"VariableDeclaration","scope":4024,"src":"2402:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3976,"name":"uint8","nodeType":"ElementaryTypeName","src":"2402:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":3979,"initialValue":{"argumentTypes":null,"hexValue":"30","id":3978,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2412:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2402:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":3986,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2455:3:18","subExpression":{"argumentTypes":null,"id":3985,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2455:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":3987,"nodeType":"ExpressionStatement","src":"2455:3:18"},"nodeType":"ForStatement","src":"2397:385:18"},{"expression":{"argumentTypes":null,"id":4017,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4015,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"2791:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4016,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3931,"src":"2801:8:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2791:18:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4018,"nodeType":"ExpressionStatement","src":"2791:18:18"},{"expression":{"argumentTypes":null,"id":4021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4019,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"2819:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4020,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2835:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2819:30:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4022,"nodeType":"ExpressionStatement","src":"2819:30:18"}]},"documentation":"@dev Constructor creates events and markets for futarchy oracle\n @param _creator Oracle creator\n @param eventFactory Event factory contract\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 @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @param marketFactory Market factory contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param _tradingPeriod Trading period before decision can be determined\n @param startDate Start date for price logging","id":4024,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3956,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3929,"src":"2100:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3957,"modifierName":{"argumentTypes":null,"id":3955,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2094:5:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2094:14:18"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3954,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3929,"name":"proxied","nodeType":"VariableDeclaration","scope":4024,"src":"1707:15:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3928,"name":"address","nodeType":"ElementaryTypeName","src":"1707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3931,"name":"_creator","nodeType":"VariableDeclaration","scope":4024,"src":"1732:16:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3930,"name":"address","nodeType":"ElementaryTypeName","src":"1732:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3933,"name":"eventFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1758:25:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":3932,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"1758:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3935,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4024,"src":"1793:21:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":3934,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1793:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":3937,"name":"oracle","nodeType":"VariableDeclaration","scope":4024,"src":"1824:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":3936,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1824:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3939,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4024,"src":"1847:18:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3938,"name":"uint8","nodeType":"ElementaryTypeName","src":"1847:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3941,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4024,"src":"1875:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3940,"name":"int","nodeType":"ElementaryTypeName","src":"1875:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3943,"name":"upperBound","nodeType":"VariableDeclaration","scope":4024,"src":"1899:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3942,"name":"int","nodeType":"ElementaryTypeName","src":"1899:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3945,"name":"marketFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1923:50:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":3944,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"1923:36:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3947,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4024,"src":"1983:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3946,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1983:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3949,"name":"fee","nodeType":"VariableDeclaration","scope":4024,"src":"2016:10:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3948,"name":"uint24","nodeType":"ElementaryTypeName","src":"2016:6:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3951,"name":"_tradingPeriod","nodeType":"VariableDeclaration","scope":4024,"src":"2036:19:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3950,"name":"uint","nodeType":"ElementaryTypeName","src":"2036:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3953,"name":"startDate","nodeType":"VariableDeclaration","scope":4024,"src":"2065:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3952,"name":"uint","nodeType":"ElementaryTypeName","src":"2065:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1697:388:18"},"payable":false,"returnParameters":{"id":3958,"nodeType":"ParameterList","parameters":[],"src":"2128:0:18"},"scope":4025,"src":"1686:1170:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4271,"src":"877:1981:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4026,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"3025:7:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4027,"nodeType":"InheritanceSpecifier","src":"3025:7:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4028,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"3034:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4029,"nodeType":"InheritanceSpecifier","src":"3034:6:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4030,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"3042:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":4031,"nodeType":"InheritanceSpecifier","src":"3042:18:18"}],"contractDependencies":[3923,4717,6673],"contractKind":"contract","documentation":"@title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n @author Stefan George - ","fullyImplemented":true,"id":4270,"linearizedBaseContracts":[4270,3923,4717,6673],"name":"FutarchyOracle","nodeType":"ContractDefinition","nodes":[{"id":4033,"libraryName":{"contractScope":null,"id":4032,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"3073:8:18","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"3067:21:18","typeName":null},{"body":{"id":4106,"nodeType":"Block","src":"3300:644:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4056,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4045,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"3397:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4046,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"3406:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"id":4047,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3412:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4041,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3349:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3349:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4043,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4044,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3349:47:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":4048,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:71:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4053,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3483:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":4054,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3501:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4049,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3440:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4050,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3440:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4051,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3440:42:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4055,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:69:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3349:160:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4040,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3338:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3338:172:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4058,"nodeType":"ExpressionStatement","src":"3338:172:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4062,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3552:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4059,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3520:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4061,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"3520:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3520:40:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4064,"nodeType":"ExpressionStatement","src":"3520:40:18"},{"body":{"id":4100,"nodeType":"Block","src":"3684:215:18","statements":[{"assignments":[4077],"declarations":[{"constant":false,"id":4077,"name":"market","nodeType":"VariableDeclaration","scope":4107,"src":"3698:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4076,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"3698:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4081,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4078,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3714:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4080,"indexExpression":{"argumentTypes":null,"id":4079,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3722:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3714:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"3698:26:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4089,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3837:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":4090,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3845:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4083,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3788:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3788:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4085,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3788:38:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4087,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:40:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4088,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3788:48:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4091,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:65:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4082,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3780:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4092,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3780:74:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4093,"nodeType":"ExpressionStatement","src":"3780:74:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4097,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3880:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4094,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3868:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"3868:11:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4098,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3868:20:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4099,"nodeType":"ExpressionStatement","src":"3868:20:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4072,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4069,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3659:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4070,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3663:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4071,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3663:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3659:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4101,"initializationExpression":{"assignments":[4066],"declarations":[{"constant":false,"id":4066,"name":"i","nodeType":"VariableDeclaration","scope":4107,"src":"3646:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4065,"name":"uint8","nodeType":"ElementaryTypeName","src":"3646:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4068,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4067,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3656:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3646:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3679:3:18","subExpression":{"argumentTypes":null,"id":4073,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3679:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4075,"nodeType":"ExpressionStatement","src":"3679:3:18"},"nodeType":"ForStatement","src":"3641:258:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4103,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3929:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4102,"name":"FutarchyFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3889,"src":"3913:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4104,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:24:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4105,"nodeType":"EmitStatement","src":"3908:29:18"}]},"documentation":"@dev Funds all markets with equal amount of funding\n @param funding Amount of funding","id":4107,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4038,"modifierName":{"argumentTypes":null,"id":4037,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"3286:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3286:9:18"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":4036,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4035,"name":"funding","nodeType":"VariableDeclaration","scope":4107,"src":"3249:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4034,"name":"uint","nodeType":"ElementaryTypeName","src":"3249:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3248:14:18"},"payable":false,"returnParameters":{"id":4039,"nodeType":"ParameterList","parameters":[],"src":"3300:0:18"},"scope":4270,"src":"3235:709:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4173,"nodeType":"Block","src":"4115:692:18","statements":[{"assignments":[4113],"declarations":[{"constant":false,"id":4113,"name":"market","nodeType":"VariableDeclaration","scope":4174,"src":"4166:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4112,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4166:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4120,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4114,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"4182:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4119,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4116,"name":"getOutcome","nodeType":"Identifier","overloadedDeclarations":[4269],"referencedDeclaration":4269,"src":"4195:10:18","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_int256_$","typeString":"function () view returns (int256)"}},"id":4117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4195:12:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4115,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4190:4:18","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":4118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4190:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4182:27:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"4166:43:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4122,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4227:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4227:29:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4124,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:31:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4125,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4262:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4262:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4127,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4128,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4262:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:37:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4227:72:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4121,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4219:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4131,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4219:81:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4132,"nodeType":"ExpressionStatement","src":"4219:81:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4133,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4404:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4135,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4404:12:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":4136,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4404:14:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4137,"nodeType":"ExpressionStatement","src":"4404:14:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4138,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4428:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4140,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4428:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4141,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4428:37:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4143,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:39:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4144,"nodeType":"ExpressionStatement","src":"4428:39:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4145,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4477:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4477:19:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4477:21:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4149,"nodeType":"ExpressionStatement","src":"4477:21:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4150,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4612:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":135,"src":"4612:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4612:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4154,"nodeType":"ExpressionStatement","src":"4612:33:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4160,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"4707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4165,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"4761:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4161,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4716:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4716:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4716:44:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":4166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:50:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4156,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4663:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4663:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4158,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4159,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"4663:43:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4167,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:104:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4155,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4655:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4168,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4655:113:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4169,"nodeType":"ExpressionStatement","src":"4655:113:18"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4170,"name":"FutarchyClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3891,"src":"4783:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":4171,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4783:17:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4172,"nodeType":"EmitStatement","src":"4778:22:18"}]},"documentation":"@dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator","id":4174,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4110,"modifierName":{"argumentTypes":null,"id":4109,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"4101:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4101:9:18"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":4108,"nodeType":"ParameterList","parameters":[],"src":"4075:2:18"},"payable":false,"returnParameters":{"id":4111,"nodeType":"ParameterList","parameters":[],"src":"4115:0:18"},"scope":4270,"src":"4061:746:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4250,"nodeType":"Block","src":"4947:676:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"5026:6:18","subExpression":{"argumentTypes":null,"id":4178,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5027:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4180,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5036:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4182,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4181,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5044:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5036:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4183,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"startDate","nodeType":"MemberAccess","referencedDeclaration":3186,"src":"5036:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4184,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5036:22:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":4185,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"5061:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:38:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":4187,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5077:3:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:44:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5026:54:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4177,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5018:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4190,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5018:63:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4191,"nodeType":"ExpressionStatement","src":"5018:63:18"},{"assignments":[4193],"declarations":[{"constant":false,"id":4193,"name":"highestAvgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5166:20:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4192,"name":"uint","nodeType":"ElementaryTypeName","src":"5166:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4199,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4194,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5189:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4196,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5197:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5189:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4197,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5189:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5189:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5166:47:18"},{"assignments":[4201],"declarations":[{"constant":false,"id":4201,"name":"highestIndex","nodeType":"VariableDeclaration","scope":4251,"src":"5223:17:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4200,"name":"uint","nodeType":"ElementaryTypeName","src":"5223:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4203,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4202,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5243:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"5223:21:18"},{"body":{"id":4236,"nodeType":"Block","src":"5297:203:18","statements":[{"assignments":[4216],"declarations":[{"constant":false,"id":4216,"name":"avgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5311:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4215,"name":"uint","nodeType":"ElementaryTypeName","src":"5311:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4222,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4217,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5327:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4219,"indexExpression":{"argumentTypes":null,"id":4218,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5335:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5327:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5327:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4221,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5327:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5311:40:18"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4225,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4223,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5369:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4224,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5380:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5369:26:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4235,"nodeType":"IfStatement","src":"5365:125:18","trueBody":{"id":4234,"nodeType":"Block","src":"5397:93:18","statements":[{"expression":{"argumentTypes":null,"id":4228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4226,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5415:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4227,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5433:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5415:26:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4229,"nodeType":"ExpressionStatement","src":"5415:26:18"},{"expression":{"argumentTypes":null,"id":4232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4230,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5459:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4231,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5474:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"5459:16:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4233,"nodeType":"ExpressionStatement","src":"5459:16:18"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4211,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4208,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5272:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4209,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5276:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4210,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5276:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5272:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4237,"initializationExpression":{"assignments":[4205],"declarations":[{"constant":false,"id":4205,"name":"i","nodeType":"VariableDeclaration","scope":4251,"src":"5259:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4204,"name":"uint8","nodeType":"ElementaryTypeName","src":"5259:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4207,"initialValue":{"argumentTypes":null,"hexValue":"31","id":4206,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5269:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"5259:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4213,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"5292:3:18","subExpression":{"argumentTypes":null,"id":4212,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5292:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4214,"nodeType":"ExpressionStatement","src":"5292:3:18"},"nodeType":"ForStatement","src":"5254:246:18"},{"expression":{"argumentTypes":null,"id":4240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4238,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5509:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4239,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5530:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5509:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4241,"nodeType":"ExpressionStatement","src":"5509:33:18"},{"expression":{"argumentTypes":null,"id":4244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4242,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5552:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4243,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"5560:4:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"5552:12:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4245,"nodeType":"ExpressionStatement","src":"5552:12:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4247,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5597:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4246,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3895,"src":"5579:17:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4248,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5579:37:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4249,"nodeType":"EmitStatement","src":"5574:42:18"}]},"documentation":"@dev Allows to set the oracle outcome based on the market with largest long position","id":4251,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4175,"nodeType":"ParameterList","parameters":[],"src":"4925:2:18"},"payable":false,"returnParameters":{"id":4176,"nodeType":"ParameterList","parameters":[],"src":"4947:0:18"},"scope":4270,"src":"4906:717:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4258,"nodeType":"Block","src":"5787:29:18","statements":[{"expression":{"argumentTypes":null,"id":4256,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5804:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4255,"id":4257,"nodeType":"Return","src":"5797:12:18"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4259,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4252,"nodeType":"ParameterList","parameters":[],"src":"5729:2:18"},"payable":false,"returnParameters":{"id":4255,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4254,"name":"","nodeType":"VariableDeclaration","scope":4259,"src":"5777:4:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4253,"name":"bool","nodeType":"ElementaryTypeName","src":"5777:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5776:6:18"},"scope":4270,"src":"5708:108:18","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4268,"nodeType":"Block","src":"5959:47:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4265,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5980:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4264,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5976:3:18","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":4266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5976:23:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4263,"id":4267,"nodeType":"Return","src":"5969:30:18"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4269,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4260,"nodeType":"ParameterList","parameters":[],"src":"5902:2:18"},"payable":false,"returnParameters":{"id":4263,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4262,"name":"","nodeType":"VariableDeclaration","scope":4269,"src":"5950:3:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4261,"name":"int","nodeType":"ElementaryTypeName","src":"5950:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"5949:5:18"},"scope":4270,"src":"5883:123:18","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4271,"src":"2998:3010:18"}],"src":"0:6009:18"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","exportedSymbols":{"FutarchyOracle":[4270],"FutarchyOracleData":[3923],"FutarchyOracleProxy":[4025]},"id":4271,"nodeType":"SourceUnit","nodes":[{"id":3881,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:18"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3882,"nodeType":"ImportDirective","scope":4271,"sourceUnit":4718,"src":"25:31:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","file":"../Events/EventFactory.sol","id":3883,"nodeType":"ImportDirective","scope":4271,"sourceUnit":579,"src":"57:36:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","file":"../Markets/StandardMarketWithPriceLoggerFactory.sol","id":3884,"nodeType":"ImportDirective","scope":4271,"sourceUnit":3528,"src":"94:61:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3885,"nodeType":"ImportDirective","scope":4271,"sourceUnit":6702,"src":"156:55:18","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3923,"linearizedBaseContracts":[3923],"name":"FutarchyOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3889,"name":"FutarchyFunding","nodeType":"EventDefinition","parameters":{"id":3888,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3887,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":3889,"src":"301:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3886,"name":"uint","nodeType":"ElementaryTypeName","src":"301:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"300:14:18"},"src":"279:36:18"},{"anonymous":false,"documentation":null,"id":3891,"name":"FutarchyClosing","nodeType":"EventDefinition","parameters":{"id":3890,"nodeType":"ParameterList","parameters":[],"src":"341:2:18"},"src":"320:24:18"},{"anonymous":false,"documentation":null,"id":3895,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3894,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3893,"indexed":false,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3895,"src":"373:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3892,"name":"uint","nodeType":"ElementaryTypeName","src":"373:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"372:25:18"},"src":"349:49:18"},{"constant":true,"id":3898,"name":"LONG","nodeType":"VariableDeclaration","scope":3923,"src":"437:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3896,"name":"uint8","nodeType":"ElementaryTypeName","src":"437:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3897,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"466:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3900,"name":"creator","nodeType":"VariableDeclaration","scope":3923,"src":"505:15:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3899,"name":"address","nodeType":"ElementaryTypeName","src":"505:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3903,"name":"markets","nodeType":"VariableDeclaration","scope":3923,"src":"526:46:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[]"},"typeName":{"baseType":{"contractScope":null,"id":3901,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"526:29:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3902,"length":null,"nodeType":"ArrayTypeName","src":"526:31:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage_ptr","typeString":"contract StandardMarketWithPriceLogger[]"}},"value":null,"visibility":"public"},{"constant":false,"id":3905,"name":"categoricalEvent","nodeType":"VariableDeclaration","scope":3923,"src":"578:40:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":3904,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"578:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":3907,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":3923,"src":"624:25:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3906,"name":"uint","nodeType":"ElementaryTypeName","src":"624:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3909,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3923,"src":"655:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3908,"name":"uint","nodeType":"ElementaryTypeName","src":"655:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3911,"name":"isSet","nodeType":"VariableDeclaration","scope":3923,"src":"691:17:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3910,"name":"bool","nodeType":"ElementaryTypeName","src":"691:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"body":{"id":3921,"nodeType":"Block","src":"769:104:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3914,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"833:3:18","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"833:10:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3916,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"847:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"833:21:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3913,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"825:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3918,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"825:30:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3919,"nodeType":"ExpressionStatement","src":"825:30:18"},{"id":3920,"nodeType":"PlaceholderStatement","src":"865:1:18"}]},"documentation":null,"id":3922,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":3912,"nodeType":"ParameterList","parameters":[],"src":"766:2:18"},"src":"748:125:18","visibility":"internal"}],"scope":4271,"src":"214:661:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3924,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"909:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3925,"nodeType":"InheritanceSpecifier","src":"909:5:18"},{"arguments":null,"baseName":{"contractScope":null,"id":3926,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"916:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":3927,"nodeType":"InheritanceSpecifier","src":"916:18:18"}],"contractDependencies":[3923,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4025,"linearizedBaseContracts":[4025,3923,6701,6673],"name":"FutarchyOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4023,"nodeType":"Block","src":"2128:728:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3962,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3960,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2193:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2210:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2193:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3959,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2185:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3963,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2185:27:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3964,"nodeType":"ExpressionStatement","src":"2185:27:18"},{"expression":{"argumentTypes":null,"id":3974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3965,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2255:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3968,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3935,"src":"2310:15:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3970,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7723,"src":"2334:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}],"id":3969,"name":"Oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4717,"src":"2327:6:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Oracle_$4717_$","typeString":"type(contract Oracle)"}},"id":3971,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2327:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3972,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3939,"src":"2341:12:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3966,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2274:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3967,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createCategoricalEvent","nodeType":"MemberAccess","referencedDeclaration":511,"src":"2274:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$_t_contract$_CategoricalEvent_$152_$","typeString":"function (contract ERC20,contract Oracle,uint8) external returns (contract CategoricalEvent)"}},"id":3973,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2274:80:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2255:99:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3975,"nodeType":"ExpressionStatement","src":"2255:99:18"},{"body":{"id":4013,"nodeType":"Block","src":"2460:322:18","statements":[{"assignments":[3989],"declarations":[{"constant":false,"id":3989,"name":"scalarEvent","nodeType":"VariableDeclaration","scope":4024,"src":"2474:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":3988,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"2474:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"}],"id":4000,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3994,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2579:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3992,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2548:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3993,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2548:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2548:33:18","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":3996,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3937,"src":"2599:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3997,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3941,"src":"2623:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":3998,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3943,"src":"2651:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3990,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2500:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3991,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createScalarEvent","nodeType":"MemberAccess","referencedDeclaration":577,"src":"2500:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$_t_contract$_ScalarEvent_$840_$","typeString":"function (contract ERC20,contract Oracle,int256,int256) external returns (contract ScalarEvent)"}},"id":3999,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2500:175:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"VariableDeclarationStatement","src":"2474:201:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4006,"name":"scalarEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3989,"src":"2729:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":4007,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3947,"src":"2742:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4008,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3949,"src":"2755:3:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4009,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3953,"src":"2760:9:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4004,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3945,"src":"2702:13:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"id":4005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3526,"src":"2702:26:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$_t_contract$_StandardMarketWithPriceLogger_$3458_$","typeString":"function (contract Event,contract MarketMaker,uint24,uint256) external returns (contract StandardMarketWithPriceLogger)"}},"id":4010,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2702:68:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}],"expression":{"argumentTypes":null,"id":4001,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"2689:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2689:12:18","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_StandardMarketWithPriceLogger_$3458_$returns$_t_uint256_$","typeString":"function (contract StandardMarketWithPriceLogger) returns (uint256)"}},"id":4011,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2689:82:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4012,"nodeType":"ExpressionStatement","src":"2689:82:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3980,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2415:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3981,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2419:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2419:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3983,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2419:34:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2415:38:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4014,"initializationExpression":{"assignments":[3977],"declarations":[{"constant":false,"id":3977,"name":"i","nodeType":"VariableDeclaration","scope":4024,"src":"2402:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3976,"name":"uint8","nodeType":"ElementaryTypeName","src":"2402:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":3979,"initialValue":{"argumentTypes":null,"hexValue":"30","id":3978,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2412:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2402:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":3986,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2455:3:18","subExpression":{"argumentTypes":null,"id":3985,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2455:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":3987,"nodeType":"ExpressionStatement","src":"2455:3:18"},"nodeType":"ForStatement","src":"2397:385:18"},{"expression":{"argumentTypes":null,"id":4017,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4015,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"2791:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4016,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3931,"src":"2801:8:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2791:18:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4018,"nodeType":"ExpressionStatement","src":"2791:18:18"},{"expression":{"argumentTypes":null,"id":4021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4019,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"2819:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4020,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2835:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2819:30:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4022,"nodeType":"ExpressionStatement","src":"2819:30:18"}]},"documentation":"@dev Constructor creates events and markets for futarchy oracle\n @param _creator Oracle creator\n @param eventFactory Event factory contract\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 @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @param marketFactory Market factory contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param _tradingPeriod Trading period before decision can be determined\n @param startDate Start date for price logging","id":4024,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3956,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3929,"src":"2100:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3957,"modifierName":{"argumentTypes":null,"id":3955,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2094:5:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2094:14:18"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3954,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3929,"name":"proxied","nodeType":"VariableDeclaration","scope":4024,"src":"1707:15:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3928,"name":"address","nodeType":"ElementaryTypeName","src":"1707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3931,"name":"_creator","nodeType":"VariableDeclaration","scope":4024,"src":"1732:16:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3930,"name":"address","nodeType":"ElementaryTypeName","src":"1732:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3933,"name":"eventFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1758:25:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":3932,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"1758:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3935,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4024,"src":"1793:21:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":3934,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1793:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":3937,"name":"oracle","nodeType":"VariableDeclaration","scope":4024,"src":"1824:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":3936,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1824:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3939,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4024,"src":"1847:18:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3938,"name":"uint8","nodeType":"ElementaryTypeName","src":"1847:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3941,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4024,"src":"1875:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3940,"name":"int","nodeType":"ElementaryTypeName","src":"1875:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3943,"name":"upperBound","nodeType":"VariableDeclaration","scope":4024,"src":"1899:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3942,"name":"int","nodeType":"ElementaryTypeName","src":"1899:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3945,"name":"marketFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1923:50:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":3944,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"1923:36:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3947,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4024,"src":"1983:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3946,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1983:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3949,"name":"fee","nodeType":"VariableDeclaration","scope":4024,"src":"2016:10:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3948,"name":"uint24","nodeType":"ElementaryTypeName","src":"2016:6:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3951,"name":"_tradingPeriod","nodeType":"VariableDeclaration","scope":4024,"src":"2036:19:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3950,"name":"uint","nodeType":"ElementaryTypeName","src":"2036:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3953,"name":"startDate","nodeType":"VariableDeclaration","scope":4024,"src":"2065:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3952,"name":"uint","nodeType":"ElementaryTypeName","src":"2065:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1697:388:18"},"payable":false,"returnParameters":{"id":3958,"nodeType":"ParameterList","parameters":[],"src":"2128:0:18"},"scope":4025,"src":"1686:1170:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4271,"src":"877:1981:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4026,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"3025:7:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4027,"nodeType":"InheritanceSpecifier","src":"3025:7:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4028,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"3034:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4029,"nodeType":"InheritanceSpecifier","src":"3034:6:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4030,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"3042:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":4031,"nodeType":"InheritanceSpecifier","src":"3042:18:18"}],"contractDependencies":[3923,4717,6673],"contractKind":"contract","documentation":"@title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n @author Stefan George - ","fullyImplemented":true,"id":4270,"linearizedBaseContracts":[4270,3923,4717,6673],"name":"FutarchyOracle","nodeType":"ContractDefinition","nodes":[{"id":4033,"libraryName":{"contractScope":null,"id":4032,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"3073:8:18","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"3067:21:18","typeName":null},{"body":{"id":4106,"nodeType":"Block","src":"3300:644:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4056,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4045,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"3397:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4046,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"3406:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"id":4047,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3412:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4041,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3349:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3349:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4043,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4044,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3349:47:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":4048,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:71:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4053,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3483:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":4054,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3501:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4049,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3440:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4050,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3440:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4051,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3440:42:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4055,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:69:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3349:160:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4040,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3338:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3338:172:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4058,"nodeType":"ExpressionStatement","src":"3338:172:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4062,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3552:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4059,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3520:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4061,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"3520:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3520:40:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4064,"nodeType":"ExpressionStatement","src":"3520:40:18"},{"body":{"id":4100,"nodeType":"Block","src":"3684:215:18","statements":[{"assignments":[4077],"declarations":[{"constant":false,"id":4077,"name":"market","nodeType":"VariableDeclaration","scope":4107,"src":"3698:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4076,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"3698:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4081,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4078,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3714:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4080,"indexExpression":{"argumentTypes":null,"id":4079,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3722:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3714:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"3698:26:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4089,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3837:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":4090,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3845:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4083,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3788:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3788:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4085,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3788:38:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4087,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:40:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4088,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3788:48:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4091,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:65:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4082,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3780:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4092,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3780:74:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4093,"nodeType":"ExpressionStatement","src":"3780:74:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4097,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3880:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4094,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3868:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"3868:11:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4098,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3868:20:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4099,"nodeType":"ExpressionStatement","src":"3868:20:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4072,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4069,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3659:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4070,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3663:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4071,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3663:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3659:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4101,"initializationExpression":{"assignments":[4066],"declarations":[{"constant":false,"id":4066,"name":"i","nodeType":"VariableDeclaration","scope":4107,"src":"3646:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4065,"name":"uint8","nodeType":"ElementaryTypeName","src":"3646:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4068,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4067,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3656:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3646:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3679:3:18","subExpression":{"argumentTypes":null,"id":4073,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3679:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4075,"nodeType":"ExpressionStatement","src":"3679:3:18"},"nodeType":"ForStatement","src":"3641:258:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4103,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3929:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4102,"name":"FutarchyFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3889,"src":"3913:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4104,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:24:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4105,"nodeType":"EmitStatement","src":"3908:29:18"}]},"documentation":"@dev Funds all markets with equal amount of funding\n @param funding Amount of funding","id":4107,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4038,"modifierName":{"argumentTypes":null,"id":4037,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"3286:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3286:9:18"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":4036,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4035,"name":"funding","nodeType":"VariableDeclaration","scope":4107,"src":"3249:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4034,"name":"uint","nodeType":"ElementaryTypeName","src":"3249:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3248:14:18"},"payable":false,"returnParameters":{"id":4039,"nodeType":"ParameterList","parameters":[],"src":"3300:0:18"},"scope":4270,"src":"3235:709:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4173,"nodeType":"Block","src":"4115:692:18","statements":[{"assignments":[4113],"declarations":[{"constant":false,"id":4113,"name":"market","nodeType":"VariableDeclaration","scope":4174,"src":"4166:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4112,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4166:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4120,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4114,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"4182:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4119,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4116,"name":"getOutcome","nodeType":"Identifier","overloadedDeclarations":[4269],"referencedDeclaration":4269,"src":"4195:10:18","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_int256_$","typeString":"function () view returns (int256)"}},"id":4117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4195:12:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4115,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4190:4:18","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":4118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4190:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4182:27:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"4166:43:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4122,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4227:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4227:29:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4124,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:31:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4125,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4262:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4262:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4127,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4128,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4262:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:37:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4227:72:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4121,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4219:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4131,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4219:81:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4132,"nodeType":"ExpressionStatement","src":"4219:81:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4133,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4404:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4135,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4404:12:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":4136,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4404:14:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4137,"nodeType":"ExpressionStatement","src":"4404:14:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4138,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4428:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4140,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4428:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4141,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4428:37:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4143,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:39:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4144,"nodeType":"ExpressionStatement","src":"4428:39:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4145,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4477:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4477:19:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4477:21:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4149,"nodeType":"ExpressionStatement","src":"4477:21:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4150,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4612:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":135,"src":"4612:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4612:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4154,"nodeType":"ExpressionStatement","src":"4612:33:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4160,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"4707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4165,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"4761:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4161,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4716:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4716:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4716:44:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":4166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:50:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4156,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4663:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4663:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4158,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4159,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"4663:43:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4167,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:104:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4155,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4655:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4168,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4655:113:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4169,"nodeType":"ExpressionStatement","src":"4655:113:18"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4170,"name":"FutarchyClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3891,"src":"4783:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":4171,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4783:17:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4172,"nodeType":"EmitStatement","src":"4778:22:18"}]},"documentation":"@dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator","id":4174,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4110,"modifierName":{"argumentTypes":null,"id":4109,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"4101:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4101:9:18"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":4108,"nodeType":"ParameterList","parameters":[],"src":"4075:2:18"},"payable":false,"returnParameters":{"id":4111,"nodeType":"ParameterList","parameters":[],"src":"4115:0:18"},"scope":4270,"src":"4061:746:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4250,"nodeType":"Block","src":"4947:676:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"5026:6:18","subExpression":{"argumentTypes":null,"id":4178,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5027:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4180,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5036:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4182,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4181,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5044:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5036:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4183,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"startDate","nodeType":"MemberAccess","referencedDeclaration":3186,"src":"5036:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4184,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5036:22:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":4185,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"5061:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:38:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":4187,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5077:3:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:44:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5026:54:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4177,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5018:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4190,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5018:63:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4191,"nodeType":"ExpressionStatement","src":"5018:63:18"},{"assignments":[4193],"declarations":[{"constant":false,"id":4193,"name":"highestAvgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5166:20:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4192,"name":"uint","nodeType":"ElementaryTypeName","src":"5166:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4199,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4194,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5189:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4196,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5197:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5189:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4197,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5189:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5189:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5166:47:18"},{"assignments":[4201],"declarations":[{"constant":false,"id":4201,"name":"highestIndex","nodeType":"VariableDeclaration","scope":4251,"src":"5223:17:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4200,"name":"uint","nodeType":"ElementaryTypeName","src":"5223:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4203,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4202,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5243:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"5223:21:18"},{"body":{"id":4236,"nodeType":"Block","src":"5297:203:18","statements":[{"assignments":[4216],"declarations":[{"constant":false,"id":4216,"name":"avgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5311:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4215,"name":"uint","nodeType":"ElementaryTypeName","src":"5311:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4222,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4217,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5327:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4219,"indexExpression":{"argumentTypes":null,"id":4218,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5335:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5327:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5327:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4221,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5327:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5311:40:18"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4225,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4223,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5369:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4224,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5380:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5369:26:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4235,"nodeType":"IfStatement","src":"5365:125:18","trueBody":{"id":4234,"nodeType":"Block","src":"5397:93:18","statements":[{"expression":{"argumentTypes":null,"id":4228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4226,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5415:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4227,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5433:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5415:26:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4229,"nodeType":"ExpressionStatement","src":"5415:26:18"},{"expression":{"argumentTypes":null,"id":4232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4230,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5459:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4231,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5474:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"5459:16:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4233,"nodeType":"ExpressionStatement","src":"5459:16:18"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4211,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4208,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5272:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4209,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5276:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4210,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5276:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5272:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4237,"initializationExpression":{"assignments":[4205],"declarations":[{"constant":false,"id":4205,"name":"i","nodeType":"VariableDeclaration","scope":4251,"src":"5259:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4204,"name":"uint8","nodeType":"ElementaryTypeName","src":"5259:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4207,"initialValue":{"argumentTypes":null,"hexValue":"31","id":4206,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5269:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"5259:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4213,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"5292:3:18","subExpression":{"argumentTypes":null,"id":4212,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5292:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4214,"nodeType":"ExpressionStatement","src":"5292:3:18"},"nodeType":"ForStatement","src":"5254:246:18"},{"expression":{"argumentTypes":null,"id":4240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4238,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5509:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4239,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5530:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5509:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4241,"nodeType":"ExpressionStatement","src":"5509:33:18"},{"expression":{"argumentTypes":null,"id":4244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4242,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5552:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4243,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"5560:4:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"5552:12:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4245,"nodeType":"ExpressionStatement","src":"5552:12:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4247,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5597:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4246,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3895,"src":"5579:17:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4248,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5579:37:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4249,"nodeType":"EmitStatement","src":"5574:42:18"}]},"documentation":"@dev Allows to set the oracle outcome based on the market with largest long position","id":4251,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4175,"nodeType":"ParameterList","parameters":[],"src":"4925:2:18"},"payable":false,"returnParameters":{"id":4176,"nodeType":"ParameterList","parameters":[],"src":"4947:0:18"},"scope":4270,"src":"4906:717:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4258,"nodeType":"Block","src":"5787:29:18","statements":[{"expression":{"argumentTypes":null,"id":4256,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5804:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4255,"id":4257,"nodeType":"Return","src":"5797:12:18"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4259,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4252,"nodeType":"ParameterList","parameters":[],"src":"5729:2:18"},"payable":false,"returnParameters":{"id":4255,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4254,"name":"","nodeType":"VariableDeclaration","scope":4259,"src":"5777:4:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4253,"name":"bool","nodeType":"ElementaryTypeName","src":"5777:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5776:6:18"},"scope":4270,"src":"5708:108:18","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4268,"nodeType":"Block","src":"5959:47:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4265,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5980:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4264,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5976:3:18","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":4266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5976:23:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4263,"id":4267,"nodeType":"Return","src":"5969:30:18"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4269,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4260,"nodeType":"ParameterList","parameters":[],"src":"5902:2:18"},"payable":false,"returnParameters":{"id":4263,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4262,"name":"","nodeType":"VariableDeclaration","scope":4269,"src":"5950:3:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4261,"name":"int","nodeType":"ElementaryTypeName","src":"5950:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"5949:5:18"},"scope":4270,"src":"5883:123:18","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4271,"src":"2998:3010:18"}],"src":"0:6009:18"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.021Z"}; /***/ }), @@ -264,10 +439,21 @@ module.exports = {"contract_name":"FutarchyOracle","abi":[{"constant":false,"inp /*!*****************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracleFactory.json ***! \*****************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"FutarchyOracleFactory","abi":[{"constant":true,"inputs":[],"name":"futarchyOracleMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_futarchyOracleMasterCopy","type":"address"},{"name":"_eventFactory","type":"address"},{"name":"_marketFactory","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"futarchyOracle","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"oracle","type":"address"},{"indexed":false,"name":"outcomeCount","type":"uint8"},{"indexed":false,"name":"lowerBound","type":"int256"},{"indexed":false,"name":"upperBound","type":"int256"},{"indexed":false,"name":"marketMaker","type":"address"},{"indexed":false,"name":"fee","type":"uint24"},{"indexed":false,"name":"tradingPeriod","type":"uint256"},{"indexed":false,"name":"startDate","type":"uint256"}],"name":"FutarchyOracleCreation","type":"event"},{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"oracle","type":"address"},{"name":"outcomeCount","type":"uint8"},{"name":"lowerBound","type":"int256"},{"name":"upperBound","type":"int256"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"},{"name":"tradingPeriod","type":"uint256"},{"name":"startDate","type":"uint256"}],"name":"createFutarchyOracle","outputs":[{"name":"futarchyOracle","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506040516060806111c783398101806040528101908080519060200190929190805190602001909291908051906020019092919050505060008273ffffffffffffffffffffffffffffffffffffffff1614158015610085575060008173ffffffffffffffffffffffffffffffffffffffff1614155b151561009057600080fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050611063806101646000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631ad42df714610051578063bb6de2bc146100a8575b600080fd5b34801561005d57600080fd5b506100666101af565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b5061016d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff1690602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919080359060200190929190803590602001909291905050506101d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168d8d8d8d610251610575565b808e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018960ff1660ff1681526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1662ffffff1681526020018381526020018281526020019d5050505050505050505050505050604051809103906000f08015801561040f573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f31b2f2efb8e38b0139781fb93941176394ceb31c7433234a12da403999ca8766828c8c8c8c8c8c8c8c8c604051808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018860ff1660ff1681526020018781526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1662ffffff1681526020018381526020018281526020019a505050505050505050505060405180910390a29998505050505050505050565b604051610ab280610586833901905600608060405234801561001057600080fd5b506040516101a080610ab2833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808e60008173ffffffffffffffffffffffffffffffffffffffff16141515156100d657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008411151561012657600080fd5b8c73ffffffffffffffffffffffffffffffffffffffff16639df0c1768d308d6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019350505050602060405180830381600087803b15801561020357600080fd5b505af1158015610217573d6000803e3d6000fd5b505050506040513d602081101561022d57600080fd5b8101908080519060200190929190505050600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561030957600080fd5b505af115801561031d573d6000803e3d6000fd5b505050506040513d602081101561033357600080fd5b810190808051906020019092919050505060ff168260ff1610156106d1578c73ffffffffffffffffffffffffffffffffffffffff16635ea194a3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea856040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561040157600080fd5b505af1158015610415573d6000803e3d6000fd5b505050506040513d602081101561042b57600080fd5b81019080805190602001909291905050508d8c8c6040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001945050505050602060405180830381600087803b1580156104fe57600080fd5b505af1158015610512573d6000803e3d6000fd5b505050506040513d602081101561052857600080fd5b8101908080519060200190929190505050905060028773ffffffffffffffffffffffffffffffffffffffff16638e44df53838989886040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff168152602001828152602001945050505050602060405180830381600087803b15801561062657600080fd5b505af115801561063a573d6000803e3d6000fd5b505050506040513d602081101561065057600080fd5b810190808051906020019092919050505090806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508180600101925050610283565b8d600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360048190555050505050505050505050505050505061037b806107376000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063561cce0a146100d157806356cfb75f14610102578063a619486e1461012d578063b1283e7714610184578063c3730d03146101f1578063c65fb38014610248578063f86e315314610277575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100cc573d6000f35b3d6000fd5b3480156100dd57600080fd5b506100e66102a2565b604051808260ff1660ff16815260200191505060405180910390f35b34801561010e57600080fd5b506101176102a7565b6040518082815260200191505060405180910390f35b34801561013957600080fd5b506101426102ad565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019057600080fd5b506101af600480360381019080803590602001909291905050506102d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101fd57600080fd5b50610206610310565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025457600080fd5b5061025d610336565b604051808215151515815260200191505060405180910390f35b34801561028357600080fd5b5061028c610349565b6040518082815260200191505060405180910390f35b600181565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002818154811015156102e157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900460ff1681565b600454815600a165627a7a72305820ee89de0d726465d1c36d37827b51a6fa16089b7d9ba661a2673d1c6f50b714f00029a165627a7a7230582062703699001ee36f54676534b120a301e76f92d7c1c4d7670b026bef08b60c9a0029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631ad42df714610051578063bb6de2bc146100a8575b600080fd5b34801561005d57600080fd5b506100666101af565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b5061016d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff1690602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919080359060200190929190803590602001909291905050506101d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168d8d8d8d610251610575565b808e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018960ff1660ff1681526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1662ffffff1681526020018381526020018281526020019d5050505050505050505050505050604051809103906000f08015801561040f573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f31b2f2efb8e38b0139781fb93941176394ceb31c7433234a12da403999ca8766828c8c8c8c8c8c8c8c8c604051808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018860ff1660ff1681526020018781526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1662ffffff1681526020018381526020018281526020019a505050505050505050505060405180910390a29998505050505050505050565b604051610ab280610586833901905600608060405234801561001057600080fd5b506040516101a080610ab2833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808e60008173ffffffffffffffffffffffffffffffffffffffff16141515156100d657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008411151561012657600080fd5b8c73ffffffffffffffffffffffffffffffffffffffff16639df0c1768d308d6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019350505050602060405180830381600087803b15801561020357600080fd5b505af1158015610217573d6000803e3d6000fd5b505050506040513d602081101561022d57600080fd5b8101908080519060200190929190505050600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561030957600080fd5b505af115801561031d573d6000803e3d6000fd5b505050506040513d602081101561033357600080fd5b810190808051906020019092919050505060ff168260ff1610156106d1578c73ffffffffffffffffffffffffffffffffffffffff16635ea194a3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea856040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561040157600080fd5b505af1158015610415573d6000803e3d6000fd5b505050506040513d602081101561042b57600080fd5b81019080805190602001909291905050508d8c8c6040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001945050505050602060405180830381600087803b1580156104fe57600080fd5b505af1158015610512573d6000803e3d6000fd5b505050506040513d602081101561052857600080fd5b8101908080519060200190929190505050905060028773ffffffffffffffffffffffffffffffffffffffff16638e44df53838989886040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff168152602001828152602001945050505050602060405180830381600087803b15801561062657600080fd5b505af115801561063a573d6000803e3d6000fd5b505050506040513d602081101561065057600080fd5b810190808051906020019092919050505090806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508180600101925050610283565b8d600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360048190555050505050505050505050505050505061037b806107376000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063561cce0a146100d157806356cfb75f14610102578063a619486e1461012d578063b1283e7714610184578063c3730d03146101f1578063c65fb38014610248578063f86e315314610277575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100cc573d6000f35b3d6000fd5b3480156100dd57600080fd5b506100e66102a2565b604051808260ff1660ff16815260200191505060405180910390f35b34801561010e57600080fd5b506101176102a7565b6040518082815260200191505060405180910390f35b34801561013957600080fd5b506101426102ad565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019057600080fd5b506101af600480360381019080803590602001909291905050506102d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101fd57600080fd5b50610206610310565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025457600080fd5b5061025d610336565b604051808215151515815260200191505060405180910390f35b34801561028357600080fd5b5061028c610349565b6040518082815260200191505060405180910390f35b600181565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002818154811015156102e157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900460ff1681565b600454815600a165627a7a72305820ee89de0d726465d1c36d37827b51a6fa16089b7d9ba661a2673d1c6f50b714f00029a165627a7a7230582062703699001ee36f54676534b120a301e76f92d7c1c4d7670b026bef08b60c9a0029","sourceMap":"203:2850:19:-;;;989:379;8:9:-1;5:2;;;30:1;27;20:12;5:2;989:379:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1187:1;1169:13;1161:27;;;;:59;;;;;1219:1;1200:14;1192:28;;;;1161:59;1153:68;;;;;;;;1258:25;1231:24;;:52;;;;;;;;;;;;;;;;;;1308:13;1293:12;;:28;;;;;;;;;;;;;;;;;;1347:14;1331:13;;:30;;;;;;;;;;;;;;;;;;989:379;;;203:2850;;;;;;","deployedSourceMap":"203:2850:19:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;737:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;737:46:19;;;;;;;;;;;;;;;;;;;;;;;;;;;1986:1065;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1986:1065:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;737:46;;;;;;;;;;;;;:::o;1986:1065::-;2289:29;2403:24;;;;;;;;;;;2441:10;2465:12;;;;;;;;;;;2491:15;2520:6;2540:12;2566:10;2590;2614:13;;;;;;;;;;;2641:11;2666:3;2683:13;2710:9;2366:363;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2366:363:19;2334:396;;2781:10;2745:299;;;2805:14;2833:15;2862:6;2882:12;2908:10;2932;2956:11;2981:3;2998:13;3025:9;2745:299;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1986:1065;;;;;;;;;;;:::o;203:2850::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/FutarchyOracle.sol\";\n\n\n/// @title Futarchy oracle factory contract - Allows to create Futarchy oracle contracts\n/// @author Stefan George - \ncontract FutarchyOracleFactory {\n\n /*\n * Events\n */\n event FutarchyOracleCreation(\n address indexed creator,\n FutarchyOracle futarchyOracle,\n ERC20 collateralToken,\n Oracle oracle,\n uint8 outcomeCount,\n int lowerBound,\n int upperBound,\n MarketMaker marketMaker,\n uint24 fee,\n uint tradingPeriod,\n uint startDate\n );\n\n /*\n * Storage\n */\n EventFactory eventFactory;\n StandardMarketWithPriceLoggerFactory marketFactory;\n FutarchyOracle public futarchyOracleMasterCopy;\n\n /*\n * Public functions\n */\n /// @dev Constructor sets event factory contract\n /// @param _eventFactory Event factory contract\n /// @param _marketFactory Market factory contract\n constructor(FutarchyOracle _futarchyOracleMasterCopy, EventFactory _eventFactory, StandardMarketWithPriceLoggerFactory _marketFactory)\n public\n {\n require(address(_eventFactory) != 0 && address(_marketFactory) != 0);\n futarchyOracleMasterCopy = _futarchyOracleMasterCopy;\n eventFactory = _eventFactory;\n marketFactory = _marketFactory;\n }\n\n /// @dev Creates a new Futarchy oracle contract\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 /// @param lowerBound Lower bound for event outcome\n /// @param upperBound Lower bound for event outcome\n /// @param marketMaker Market maker contract\n /// @param fee Market fee\n /// @param tradingPeriod Trading period before decision can be determined\n /// @param startDate Start date for price logging\n /// @return Oracle contract\n function createFutarchyOracle(\n ERC20 collateralToken,\n Oracle oracle,\n uint8 outcomeCount,\n int lowerBound,\n int upperBound,\n MarketMaker marketMaker,\n uint24 fee,\n uint tradingPeriod,\n uint startDate\n )\n public\n returns (FutarchyOracle futarchyOracle)\n {\n futarchyOracle = FutarchyOracle(new FutarchyOracleProxy(\n futarchyOracleMasterCopy,\n msg.sender,\n eventFactory,\n collateralToken,\n oracle,\n outcomeCount,\n lowerBound,\n upperBound,\n marketFactory,\n marketMaker,\n fee,\n tradingPeriod,\n startDate\n ));\n emit FutarchyOracleCreation(\n msg.sender,\n futarchyOracle,\n collateralToken,\n oracle,\n outcomeCount,\n lowerBound,\n upperBound,\n marketMaker,\n fee,\n tradingPeriod,\n startDate\n );\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracleFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracleFactory.sol","exportedSymbols":{"FutarchyOracleFactory":[4401]},"id":4402,"nodeType":"SourceUnit","nodes":[{"id":4272,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:19"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","file":"../Oracles/FutarchyOracle.sol","id":4273,"nodeType":"ImportDirective","scope":4402,"sourceUnit":4271,"src":"25:39:19","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[4025],"contractKind":"contract","documentation":"@title Futarchy oracle factory contract - Allows to create Futarchy oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":4401,"linearizedBaseContracts":[4401],"name":"FutarchyOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4297,"name":"FutarchyOracleCreation","nodeType":"EventDefinition","parameters":{"id":4296,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4275,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":4297,"src":"309:23:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4274,"name":"address","nodeType":"ElementaryTypeName","src":"309:7:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4277,"indexed":false,"name":"futarchyOracle","nodeType":"VariableDeclaration","scope":4297,"src":"342:29:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},"typeName":{"contractScope":null,"id":4276,"name":"FutarchyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4270,"src":"342:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4279,"indexed":false,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4297,"src":"381:21:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":4278,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"381:5:19","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":4281,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":4297,"src":"412:13:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":4280,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"412:6:19","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4283,"indexed":false,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4297,"src":"435:18:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4282,"name":"uint8","nodeType":"ElementaryTypeName","src":"435:5:19","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4285,"indexed":false,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4297,"src":"463:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4284,"name":"int","nodeType":"ElementaryTypeName","src":"463:3:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4287,"indexed":false,"name":"upperBound","nodeType":"VariableDeclaration","scope":4297,"src":"487:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4286,"name":"int","nodeType":"ElementaryTypeName","src":"487:3:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4289,"indexed":false,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4297,"src":"511:23:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":4288,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"511:11:19","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":4291,"indexed":false,"name":"fee","nodeType":"VariableDeclaration","scope":4297,"src":"544:10:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":4290,"name":"uint24","nodeType":"ElementaryTypeName","src":"544:6:19","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":4293,"indexed":false,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":4297,"src":"564:18:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4292,"name":"uint","nodeType":"ElementaryTypeName","src":"564:4:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4295,"indexed":false,"name":"startDate","nodeType":"VariableDeclaration","scope":4297,"src":"592:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4294,"name":"uint","nodeType":"ElementaryTypeName","src":"592:4:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:313:19"},"src":"271:342:19"},{"constant":false,"id":4299,"name":"eventFactory","nodeType":"VariableDeclaration","scope":4401,"src":"650:25:19","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":4298,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"650:12:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":4301,"name":"marketFactory","nodeType":"VariableDeclaration","scope":4401,"src":"681:50:19","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":4300,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"681:36:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":4303,"name":"futarchyOracleMasterCopy","nodeType":"VariableDeclaration","scope":4401,"src":"737:46:19","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},"typeName":{"contractScope":null,"id":4302,"name":"FutarchyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4270,"src":"737:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"value":null,"visibility":"public"},{"body":{"id":4338,"nodeType":"Block","src":"1143:225:19","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4323,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4314,"name":"_eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4307,"src":"1169:13:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}],"id":4313,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1161:7:19","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1161:22:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4316,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1187:1:19","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1161:27:19","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4322,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4319,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4309,"src":"1200:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}],"id":4318,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1192:7:19","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4320,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1192:23:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4321,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1219:1:19","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1192:28:19","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1161:59:19","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4312,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1153:7:19","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4324,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1153:68:19","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4325,"nodeType":"ExpressionStatement","src":"1153:68:19"},{"expression":{"argumentTypes":null,"id":4328,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4326,"name":"futarchyOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4303,"src":"1231:24:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4327,"name":"_futarchyOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4305,"src":"1258:25:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"src":"1231:52:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"id":4329,"nodeType":"ExpressionStatement","src":"1231:52:19"},{"expression":{"argumentTypes":null,"id":4332,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4330,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4299,"src":"1293:12:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4331,"name":"_eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4307,"src":"1308:13:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"src":"1293:28:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":4333,"nodeType":"ExpressionStatement","src":"1293:28:19"},{"expression":{"argumentTypes":null,"id":4336,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4334,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4301,"src":"1331:13:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4335,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4309,"src":"1347:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"src":"1331:30:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"id":4337,"nodeType":"ExpressionStatement","src":"1331:30:19"}]},"documentation":"@dev Constructor sets event factory contract\n @param _eventFactory Event factory contract\n @param _marketFactory Market factory contract","id":4339,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4310,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4305,"name":"_futarchyOracleMasterCopy","nodeType":"VariableDeclaration","scope":4339,"src":"1001:40:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},"typeName":{"contractScope":null,"id":4304,"name":"FutarchyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4270,"src":"1001:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4307,"name":"_eventFactory","nodeType":"VariableDeclaration","scope":4339,"src":"1043:26:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":4306,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"1043:12:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":4309,"name":"_marketFactory","nodeType":"VariableDeclaration","scope":4339,"src":"1071:51:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":4308,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"1071:36:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"}],"src":"1000:123:19"},"payable":false,"returnParameters":{"id":4311,"nodeType":"ParameterList","parameters":[],"src":"1143:0:19"},"scope":4401,"src":"989:379:19","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4399,"nodeType":"Block","src":"2324:727:19","statements":[{"expression":{"argumentTypes":null,"id":4382,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4362,"name":"futarchyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4360,"src":"2334:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4366,"name":"futarchyOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4303,"src":"2403:24:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4367,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2441:3:19","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4368,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2441:10:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4369,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4299,"src":"2465:12:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},{"argumentTypes":null,"id":4370,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4341,"src":"2491:15:19","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":4371,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4343,"src":"2520:6:19","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":4372,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4345,"src":"2540:12:19","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4373,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4347,"src":"2566:10:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":4374,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4349,"src":"2590:10:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":4375,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4301,"src":"2614:13:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},{"argumentTypes":null,"id":4376,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4351,"src":"2641:11:19","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4377,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4353,"src":"2666:3:19","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4378,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4355,"src":"2683:13:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":4379,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4357,"src":"2710:9:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"2366:23:19","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_EventFactory_$578_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$_t_int256_$_t_int256_$_t_contract$_StandardMarketWithPriceLoggerFactory_$3527_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$_t_uint256_$returns$_t_contract$_FutarchyOracleProxy_$4025_$","typeString":"function (address,address,contract EventFactory,contract ERC20,contract Oracle,uint8,int256,int256,contract StandardMarketWithPriceLoggerFactory,contract MarketMaker,uint24,uint256,uint256) returns (contract FutarchyOracleProxy)"},"typeName":{"contractScope":null,"id":4364,"name":"FutarchyOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":4025,"src":"2370:19:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}},"id":4380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2366:363:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}],"id":4363,"name":"FutarchyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4270,"src":"2351:14:19","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_FutarchyOracle_$4270_$","typeString":"type(contract FutarchyOracle)"}},"id":4381,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2351:379:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"src":"2334:396:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"id":4383,"nodeType":"ExpressionStatement","src":"2334:396:19"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4385,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2781:3:19","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4386,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2781:10:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4387,"name":"futarchyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4360,"src":"2805:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"id":4388,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4341,"src":"2833:15:19","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":4389,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4343,"src":"2862:6:19","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":4390,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4345,"src":"2882:12:19","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4391,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4347,"src":"2908:10:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":4392,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4349,"src":"2932:10:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":4393,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4351,"src":"2956:11:19","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4394,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4353,"src":"2981:3:19","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4395,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4355,"src":"2998:13:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":4396,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4357,"src":"3025:9:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4384,"name":"FutarchyOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4297,"src":"2745:22:19","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_FutarchyOracle_$4270_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$_t_int256_$_t_int256_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,contract FutarchyOracle,contract ERC20,contract Oracle,uint8,int256,int256,contract MarketMaker,uint24,uint256,uint256)"}},"id":4397,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2745:299:19","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4398,"nodeType":"EmitStatement","src":"2740:304:19"}]},"documentation":"@dev Creates a new Futarchy oracle contract\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 @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @param marketMaker Market maker contract\n @param fee Market fee\n @param tradingPeriod Trading period before decision can be determined\n @param startDate Start date for price logging\n @return Oracle contract","id":4400,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createFutarchyOracle","nodeType":"FunctionDefinition","parameters":{"id":4358,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4341,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4400,"src":"2025:21:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":4340,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"2025:5:19","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":4343,"name":"oracle","nodeType":"VariableDeclaration","scope":4400,"src":"2056:13:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":4342,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2056:6:19","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4345,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4400,"src":"2079:18:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4344,"name":"uint8","nodeType":"ElementaryTypeName","src":"2079:5:19","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4347,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4400,"src":"2107:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4346,"name":"int","nodeType":"ElementaryTypeName","src":"2107:3:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4349,"name":"upperBound","nodeType":"VariableDeclaration","scope":4400,"src":"2131:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4348,"name":"int","nodeType":"ElementaryTypeName","src":"2131:3:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4351,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4400,"src":"2155:23:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":4350,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"2155:11:19","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":4353,"name":"fee","nodeType":"VariableDeclaration","scope":4400,"src":"2188:10:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":4352,"name":"uint24","nodeType":"ElementaryTypeName","src":"2188:6:19","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":4355,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":4400,"src":"2208:18:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4354,"name":"uint","nodeType":"ElementaryTypeName","src":"2208:4:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4357,"name":"startDate","nodeType":"VariableDeclaration","scope":4400,"src":"2236:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4356,"name":"uint","nodeType":"ElementaryTypeName","src":"2236:4:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2015:241:19"},"payable":false,"returnParameters":{"id":4361,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4360,"name":"futarchyOracle","nodeType":"VariableDeclaration","scope":4400,"src":"2289:29:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},"typeName":{"contractScope":null,"id":4359,"name":"FutarchyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4270,"src":"2289:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"value":null,"visibility":"internal"}],"src":"2288:31:19"},"scope":4401,"src":"1986:1065:19","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4402,"src":"203:2850:19"}],"src":"0:3054:19"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracleFactory.sol","exportedSymbols":{"FutarchyOracleFactory":[4401]},"id":4402,"nodeType":"SourceUnit","nodes":[{"id":4272,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:19"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","file":"../Oracles/FutarchyOracle.sol","id":4273,"nodeType":"ImportDirective","scope":4402,"sourceUnit":4271,"src":"25:39:19","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[4025],"contractKind":"contract","documentation":"@title Futarchy oracle factory contract - Allows to create Futarchy oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":4401,"linearizedBaseContracts":[4401],"name":"FutarchyOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4297,"name":"FutarchyOracleCreation","nodeType":"EventDefinition","parameters":{"id":4296,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4275,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":4297,"src":"309:23:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4274,"name":"address","nodeType":"ElementaryTypeName","src":"309:7:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4277,"indexed":false,"name":"futarchyOracle","nodeType":"VariableDeclaration","scope":4297,"src":"342:29:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},"typeName":{"contractScope":null,"id":4276,"name":"FutarchyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4270,"src":"342:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4279,"indexed":false,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4297,"src":"381:21:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":4278,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"381:5:19","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":4281,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":4297,"src":"412:13:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":4280,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"412:6:19","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4283,"indexed":false,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4297,"src":"435:18:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4282,"name":"uint8","nodeType":"ElementaryTypeName","src":"435:5:19","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4285,"indexed":false,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4297,"src":"463:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4284,"name":"int","nodeType":"ElementaryTypeName","src":"463:3:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4287,"indexed":false,"name":"upperBound","nodeType":"VariableDeclaration","scope":4297,"src":"487:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4286,"name":"int","nodeType":"ElementaryTypeName","src":"487:3:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4289,"indexed":false,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4297,"src":"511:23:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":4288,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"511:11:19","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":4291,"indexed":false,"name":"fee","nodeType":"VariableDeclaration","scope":4297,"src":"544:10:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":4290,"name":"uint24","nodeType":"ElementaryTypeName","src":"544:6:19","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":4293,"indexed":false,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":4297,"src":"564:18:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4292,"name":"uint","nodeType":"ElementaryTypeName","src":"564:4:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4295,"indexed":false,"name":"startDate","nodeType":"VariableDeclaration","scope":4297,"src":"592:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4294,"name":"uint","nodeType":"ElementaryTypeName","src":"592:4:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:313:19"},"src":"271:342:19"},{"constant":false,"id":4299,"name":"eventFactory","nodeType":"VariableDeclaration","scope":4401,"src":"650:25:19","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":4298,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"650:12:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":4301,"name":"marketFactory","nodeType":"VariableDeclaration","scope":4401,"src":"681:50:19","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":4300,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"681:36:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":4303,"name":"futarchyOracleMasterCopy","nodeType":"VariableDeclaration","scope":4401,"src":"737:46:19","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},"typeName":{"contractScope":null,"id":4302,"name":"FutarchyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4270,"src":"737:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"value":null,"visibility":"public"},{"body":{"id":4338,"nodeType":"Block","src":"1143:225:19","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4323,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4314,"name":"_eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4307,"src":"1169:13:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}],"id":4313,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1161:7:19","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1161:22:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4316,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1187:1:19","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1161:27:19","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4322,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4319,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4309,"src":"1200:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}],"id":4318,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1192:7:19","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4320,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1192:23:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4321,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1219:1:19","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1192:28:19","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1161:59:19","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4312,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1153:7:19","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4324,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1153:68:19","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4325,"nodeType":"ExpressionStatement","src":"1153:68:19"},{"expression":{"argumentTypes":null,"id":4328,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4326,"name":"futarchyOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4303,"src":"1231:24:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4327,"name":"_futarchyOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4305,"src":"1258:25:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"src":"1231:52:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"id":4329,"nodeType":"ExpressionStatement","src":"1231:52:19"},{"expression":{"argumentTypes":null,"id":4332,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4330,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4299,"src":"1293:12:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4331,"name":"_eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4307,"src":"1308:13:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"src":"1293:28:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":4333,"nodeType":"ExpressionStatement","src":"1293:28:19"},{"expression":{"argumentTypes":null,"id":4336,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4334,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4301,"src":"1331:13:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4335,"name":"_marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4309,"src":"1347:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"src":"1331:30:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"id":4337,"nodeType":"ExpressionStatement","src":"1331:30:19"}]},"documentation":"@dev Constructor sets event factory contract\n @param _eventFactory Event factory contract\n @param _marketFactory Market factory contract","id":4339,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4310,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4305,"name":"_futarchyOracleMasterCopy","nodeType":"VariableDeclaration","scope":4339,"src":"1001:40:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},"typeName":{"contractScope":null,"id":4304,"name":"FutarchyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4270,"src":"1001:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4307,"name":"_eventFactory","nodeType":"VariableDeclaration","scope":4339,"src":"1043:26:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":4306,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"1043:12:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":4309,"name":"_marketFactory","nodeType":"VariableDeclaration","scope":4339,"src":"1071:51:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":4308,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"1071:36:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"}],"src":"1000:123:19"},"payable":false,"returnParameters":{"id":4311,"nodeType":"ParameterList","parameters":[],"src":"1143:0:19"},"scope":4401,"src":"989:379:19","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4399,"nodeType":"Block","src":"2324:727:19","statements":[{"expression":{"argumentTypes":null,"id":4382,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4362,"name":"futarchyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4360,"src":"2334:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4366,"name":"futarchyOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4303,"src":"2403:24:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4367,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2441:3:19","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4368,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2441:10:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4369,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4299,"src":"2465:12:19","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},{"argumentTypes":null,"id":4370,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4341,"src":"2491:15:19","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":4371,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4343,"src":"2520:6:19","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":4372,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4345,"src":"2540:12:19","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4373,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4347,"src":"2566:10:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":4374,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4349,"src":"2590:10:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":4375,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4301,"src":"2614:13:19","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},{"argumentTypes":null,"id":4376,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4351,"src":"2641:11:19","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4377,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4353,"src":"2666:3:19","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4378,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4355,"src":"2683:13:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":4379,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4357,"src":"2710:9:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"2366:23:19","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_EventFactory_$578_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$_t_int256_$_t_int256_$_t_contract$_StandardMarketWithPriceLoggerFactory_$3527_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$_t_uint256_$returns$_t_contract$_FutarchyOracleProxy_$4025_$","typeString":"function (address,address,contract EventFactory,contract ERC20,contract Oracle,uint8,int256,int256,contract StandardMarketWithPriceLoggerFactory,contract MarketMaker,uint24,uint256,uint256) returns (contract FutarchyOracleProxy)"},"typeName":{"contractScope":null,"id":4364,"name":"FutarchyOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":4025,"src":"2370:19:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}},"id":4380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2366:363:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}],"id":4363,"name":"FutarchyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4270,"src":"2351:14:19","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_FutarchyOracle_$4270_$","typeString":"type(contract FutarchyOracle)"}},"id":4381,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2351:379:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"src":"2334:396:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"id":4383,"nodeType":"ExpressionStatement","src":"2334:396:19"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4385,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2781:3:19","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4386,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2781:10:19","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4387,"name":"futarchyOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4360,"src":"2805:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"id":4388,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4341,"src":"2833:15:19","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":4389,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4343,"src":"2862:6:19","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":4390,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4345,"src":"2882:12:19","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4391,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4347,"src":"2908:10:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":4392,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4349,"src":"2932:10:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":4393,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4351,"src":"2956:11:19","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4394,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4353,"src":"2981:3:19","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4395,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4355,"src":"2998:13:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":4396,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4357,"src":"3025:9:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4384,"name":"FutarchyOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4297,"src":"2745:22:19","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_FutarchyOracle_$4270_$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$_t_int256_$_t_int256_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,contract FutarchyOracle,contract ERC20,contract Oracle,uint8,int256,int256,contract MarketMaker,uint24,uint256,uint256)"}},"id":4397,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2745:299:19","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4398,"nodeType":"EmitStatement","src":"2740:304:19"}]},"documentation":"@dev Creates a new Futarchy oracle contract\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 @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @param marketMaker Market maker contract\n @param fee Market fee\n @param tradingPeriod Trading period before decision can be determined\n @param startDate Start date for price logging\n @return Oracle contract","id":4400,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createFutarchyOracle","nodeType":"FunctionDefinition","parameters":{"id":4358,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4341,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4400,"src":"2025:21:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":4340,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"2025:5:19","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":4343,"name":"oracle","nodeType":"VariableDeclaration","scope":4400,"src":"2056:13:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":4342,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2056:6:19","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4345,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4400,"src":"2079:18:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4344,"name":"uint8","nodeType":"ElementaryTypeName","src":"2079:5:19","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4347,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4400,"src":"2107:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4346,"name":"int","nodeType":"ElementaryTypeName","src":"2107:3:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4349,"name":"upperBound","nodeType":"VariableDeclaration","scope":4400,"src":"2131:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4348,"name":"int","nodeType":"ElementaryTypeName","src":"2131:3:19","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4351,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4400,"src":"2155:23:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":4350,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"2155:11:19","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":4353,"name":"fee","nodeType":"VariableDeclaration","scope":4400,"src":"2188:10:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":4352,"name":"uint24","nodeType":"ElementaryTypeName","src":"2188:6:19","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":4355,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":4400,"src":"2208:18:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4354,"name":"uint","nodeType":"ElementaryTypeName","src":"2208:4:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4357,"name":"startDate","nodeType":"VariableDeclaration","scope":4400,"src":"2236:14:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4356,"name":"uint","nodeType":"ElementaryTypeName","src":"2236:4:19","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2015:241:19"},"payable":false,"returnParameters":{"id":4361,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4360,"name":"futarchyOracle","nodeType":"VariableDeclaration","scope":4400,"src":"2289:29:19","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},"typeName":{"contractScope":null,"id":4359,"name":"FutarchyOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4270,"src":"2289:14:19","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},"value":null,"visibility":"internal"}],"src":"2288:31:19"},"scope":4401,"src":"1986:1065:19","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4402,"src":"203:2850:19"}],"src":"0:3054:19"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0x79dca28f03b585568d60a7fb216af8bff6dac4ac","transactionHash":"0x601867ad3b49f369db7c6b4c4ddf30fdd7aff2c10a689b5e7d7a53da90ad0434"},"4":{"address":"0x5378645d1141241a6ce9b35fa9a161b6e912dc49","transactionHash":"0x0a83278ff6b2c57def6060a2535bdc9f3a91d99c018c51ffccaaeb6ece09b707"},"437894314312":{"address":"0xd86c8f0327494034f60e25074420bccf560d5610","transactionHash":"0x512b9393c3d284be1c2e4055983539942f1700d1d4f9bfa05af22f752e9ec489"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:49.435Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracleProxy.json": +/*!***************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/FutarchyOracleProxy.json ***! + \***************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"FutarchyOracleFactory","abi":[{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"oracle","type":"address"},{"name":"outcomeCount","type":"uint8"},{"name":"lowerBound","type":"int256"},{"name":"upperBound","type":"int256"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"},{"name":"tradingPeriod","type":"uint256"},{"name":"startDate","type":"uint256"}],"name":"createFutarchyOracle","outputs":[{"name":"futarchyOracle","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_eventFactory","type":"address"},{"name":"_marketFactory","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"futarchyOracle","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"oracle","type":"address"},{"indexed":false,"name":"outcomeCount","type":"uint8"},{"indexed":false,"name":"lowerBound","type":"int256"},{"indexed":false,"name":"upperBound","type":"int256"},{"indexed":false,"name":"marketMaker","type":"address"},{"indexed":false,"name":"fee","type":"uint24"},{"indexed":false,"name":"tradingPeriod","type":"uint256"},{"indexed":false,"name":"startDate","type":"uint256"}],"name":"FutarchyOracleCreation","type":"event"}],"networks":{"3":{"address":"0x0f60faf69f3ac146e1e557247583bc0c84f9f086","updated_at":1503605014191},"4":{"address":"0xd93d5174b346d5037486e40e335fd2edc353bfcc","updated_at":1503603856237},"42":{"address":"0xc55c643d9084df9372c43fc2f4f6cd3f7446d00d","updated_at":1503602339890},"437894314312":{"address":"0x2612af3a521c2df9eaf28422ca335b04adf3ac66","updated_at":1507361155409}},"schema_version":"0.0.5","updated_at":1543915159052}; +module.exports = {"contractName":"FutarchyOracleProxy","abi":[{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"winningMarketIndex","outputs":[{"name":"","type":"uint256"}],"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":"","type":"uint256"}],"name":"markets","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"categoricalEvent","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradingPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"proxied","type":"address"},{"name":"_creator","type":"address"},{"name":"eventFactory","type":"address"},{"name":"collateralToken","type":"address"},{"name":"oracle","type":"address"},{"name":"outcomeCount","type":"uint8"},{"name":"lowerBound","type":"int256"},{"name":"upperBound","type":"int256"},{"name":"marketFactory","type":"address"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"},{"name":"_tradingPeriod","type":"uint256"},{"name":"startDate","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"FutarchyFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"FutarchyClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winningMarketIndex","type":"uint256"}],"name":"OutcomeAssignment","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b506040516101a080610ab2833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808e60008173ffffffffffffffffffffffffffffffffffffffff16141515156100d657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008411151561012657600080fd5b8c73ffffffffffffffffffffffffffffffffffffffff16639df0c1768d308d6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019350505050602060405180830381600087803b15801561020357600080fd5b505af1158015610217573d6000803e3d6000fd5b505050506040513d602081101561022d57600080fd5b8101908080519060200190929190505050600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561030957600080fd5b505af115801561031d573d6000803e3d6000fd5b505050506040513d602081101561033357600080fd5b810190808051906020019092919050505060ff168260ff1610156106d1578c73ffffffffffffffffffffffffffffffffffffffff16635ea194a3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea856040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561040157600080fd5b505af1158015610415573d6000803e3d6000fd5b505050506040513d602081101561042b57600080fd5b81019080805190602001909291905050508d8c8c6040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001945050505050602060405180830381600087803b1580156104fe57600080fd5b505af1158015610512573d6000803e3d6000fd5b505050506040513d602081101561052857600080fd5b8101908080519060200190929190505050905060028773ffffffffffffffffffffffffffffffffffffffff16638e44df53838989886040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff168152602001828152602001945050505050602060405180830381600087803b15801561062657600080fd5b505af115801561063a573d6000803e3d6000fd5b505050506040513d602081101561065057600080fd5b810190808051906020019092919050505090806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508180600101925050610283565b8d600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360048190555050505050505050505050505050505061037b806107376000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063561cce0a146100d157806356cfb75f14610102578063a619486e1461012d578063b1283e7714610184578063c3730d03146101f1578063c65fb38014610248578063f86e315314610277575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100cc573d6000f35b3d6000fd5b3480156100dd57600080fd5b506100e66102a2565b604051808260ff1660ff16815260200191505060405180910390f35b34801561010e57600080fd5b506101176102a7565b6040518082815260200191505060405180910390f35b34801561013957600080fd5b506101426102ad565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019057600080fd5b506101af600480360381019080803590602001909291905050506102d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101fd57600080fd5b50610206610310565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025457600080fd5b5061025d610336565b604051808215151515815260200191505060405180910390f35b34801561028357600080fd5b5061028c610349565b6040518082815260200191505060405180910390f35b600181565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002818154811015156102e157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900460ff1681565b600454815600a165627a7a72305820ee89de0d726465d1c36d37827b51a6fa16089b7d9ba661a2673d1c6f50b714f00029","deployedBytecode":"0x608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063561cce0a146100d157806356cfb75f14610102578063a619486e1461012d578063b1283e7714610184578063c3730d03146101f1578063c65fb38014610248578063f86e315314610277575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100cc573d6000f35b3d6000fd5b3480156100dd57600080fd5b506100e66102a2565b604051808260ff1660ff16815260200191505060405180910390f35b34801561010e57600080fd5b506101176102a7565b6040518082815260200191505060405180910390f35b34801561013957600080fd5b506101426102ad565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019057600080fd5b506101af600480360381019080803590602001909291905050506102d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101fd57600080fd5b50610206610310565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025457600080fd5b5061025d610336565b604051808215151515815260200191505060405180910390f35b34801561028357600080fd5b5061028c610349565b6040518082815260200191505060405180910390f35b600181565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002818154811015156102e157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900460ff1681565b600454815600a165627a7a72305820ee89de0d726465d1c36d37827b51a6fa16089b7d9ba661a2673d1c6f50b714f00029","sourceMap":"877:1981:18:-;;;1686:1170;8:9:-1;5:2;;;30:1;27;20:12;5:2;1686:1170:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2402:7;2474:23;2100:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;2210:1:18;2193:14;:18;2185:27;;;;;;;;2274:12;:35;;;2310:15;2334:4;2341:12;2274:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2274:80:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2274:80:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2274:80:18;;;;;;;;;;;;;;;;2255:16;;:99;;;;;;;;;;;;;;;;;;2412:1;2402:11;;2397:385;2419:16;;;;;;;;;;;:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2419:34:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2419:34:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2419:34:18;;;;;;;;;;;;;;;;2415:38;;:1;:38;;;2397:385;;;2500:12;:30;;;2548:16;;;;;;;;;;;:30;;;2579:1;2548:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2548:33:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2548:33:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2548:33:18;;;;;;;;;;;;;;;;2599:6;2623:10;2651;2500:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2500:175:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2500:175:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2500:175:18;;;;;;;;;;;;;;;;2474:201;;2689:7;2702:13;:26;;;2729:11;2742;2755:3;2760:9;2702:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2702:68:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2702:68:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2702:68:18;;;;;;;;;;;;;;;;2689:82;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;2689:82:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2455:3;;;;;;;2397:385;;;2801:8;2791:7;;:18;;;;;;;;;;;;;;;;;;2835:14;2819:13;:30;;;;1686:1170;;;;;;;;;;;;;;;877:1981;;;;;;","deployedSourceMap":"877:1981:18:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;437:30:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;437:30:18;;;;;;;;;;;;;;;;;;;;;;;;;;;655;;8:9:-1;5:2;;;30:1;27;20:12;5:2;655:30:18;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;526:46:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;526:46:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;578:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;578:40:18;;;;;;;;;;;;;;;;;;;;;;;;;;;691:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;691:17:18;;;;;;;;;;;;;;;;;;;;;;;;;;;624:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;624:25:18;;;;;;;;;;;;;;;;;;;;;;;437:30;466:1;437:30;:::o;655:::-;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;526:46:18:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;578:40::-;;;;;;;;;;;;;:::o;691:17::-;;;;;;;;;;;;;:::o;624:25::-;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"../Events/EventFactory.sol\";\nimport \"../Markets/StandardMarketWithPriceLoggerFactory.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract FutarchyOracleData {\n\n /*\n * Events\n */\n event FutarchyFunding(uint funding);\n event FutarchyClosing();\n event OutcomeAssignment(uint winningMarketIndex);\n\n /*\n * Constants\n */\n uint8 public constant LONG = 1;\n\n /*\n * Storage\n */\n address creator;\n StandardMarketWithPriceLogger[] public markets;\n CategoricalEvent public categoricalEvent;\n uint public tradingPeriod;\n uint public winningMarketIndex;\n bool public isSet;\n\n /*\n * Modifiers\n */\n modifier isCreator() {\n // Only creator is allowed to proceed\n require(msg.sender == creator);\n _;\n }\n}\n\ncontract FutarchyOracleProxy is Proxy, FutarchyOracleData {\n\n /// @dev Constructor creates events and markets for futarchy oracle\n /// @param _creator Oracle creator\n /// @param eventFactory Event factory contract\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 /// @param lowerBound Lower bound for event outcome\n /// @param upperBound Lower bound for event outcome\n /// @param marketFactory Market factory contract\n /// @param marketMaker Market maker contract\n /// @param fee Market fee\n /// @param _tradingPeriod Trading period before decision can be determined\n /// @param startDate Start date for price logging\n constructor(\n address proxied,\n address _creator,\n EventFactory eventFactory,\n ERC20 collateralToken,\n Oracle oracle,\n uint8 outcomeCount,\n int lowerBound,\n int upperBound,\n StandardMarketWithPriceLoggerFactory marketFactory,\n MarketMaker marketMaker,\n uint24 fee,\n uint _tradingPeriod,\n uint startDate\n )\n Proxy(proxied)\n public\n {\n // trading period is at least a second\n require(_tradingPeriod > 0);\n // Create decision event\n categoricalEvent = eventFactory.createCategoricalEvent(collateralToken, Oracle(this), outcomeCount);\n // Create outcome events\n for (uint8 i = 0; i < categoricalEvent.getOutcomeCount(); i++) {\n ScalarEvent scalarEvent = eventFactory.createScalarEvent(\n categoricalEvent.outcomeTokens(i),\n oracle,\n lowerBound,\n upperBound\n );\n markets.push(marketFactory.createMarket(scalarEvent, marketMaker, fee, startDate));\n }\n creator = _creator;\n tradingPeriod = _tradingPeriod;\n }\n}\n\n/// @title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n/// @author Stefan George - \ncontract FutarchyOracle is Proxied, Oracle, FutarchyOracleData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Funds all markets with equal amount of funding\n /// @param funding Amount of funding\n function fund(uint funding)\n public\n isCreator\n {\n // Buy all outcomes\n require( categoricalEvent.collateralToken().transferFrom(creator, this, funding)\n && categoricalEvent.collateralToken().approve(categoricalEvent, funding));\n categoricalEvent.buyAllOutcomes(funding);\n // Fund each market with outcome tokens from categorical event\n for (uint8 i = 0; i < markets.length; i++) {\n Market market = markets[i];\n // Approve funding for market\n require(market.eventContract().collateralToken().approve(market, funding));\n market.fund(funding);\n }\n emit FutarchyFunding(funding);\n }\n\n /// @dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator\n function close()\n public\n isCreator\n {\n // Winning outcome has to be set\n Market market = markets[uint(getOutcome())];\n require(categoricalEvent.isOutcomeSet() && market.eventContract().isOutcomeSet());\n // Close market and transfer all outcome tokens from winning outcome to this contract\n market.close();\n market.eventContract().redeemWinnings();\n market.withdrawFees();\n // Redeem collateral token for winning outcome tokens and transfer collateral tokens to creator\n categoricalEvent.redeemWinnings();\n require(categoricalEvent.collateralToken().transfer(creator, categoricalEvent.collateralToken().balanceOf(this)));\n emit FutarchyClosing();\n }\n\n /// @dev Allows to set the oracle outcome based on the market with largest long position\n function setOutcome()\n public\n {\n // Outcome is not set yet and trading period is over\n require(!isSet && markets[0].startDate() + tradingPeriod < now);\n // Find market with highest marginal price for long outcome tokens\n uint highestAvgPrice = markets[0].getAvgPrice();\n uint highestIndex = 0;\n for (uint8 i = 1; i < markets.length; i++) {\n uint avgPrice = markets[i].getAvgPrice();\n if (avgPrice > highestAvgPrice) {\n highestAvgPrice = avgPrice;\n highestIndex = i;\n }\n }\n winningMarketIndex = highestIndex;\n isSet = true;\n emit OutcomeAssignment(winningMarketIndex);\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return int(winningMarketIndex);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","exportedSymbols":{"FutarchyOracle":[4270],"FutarchyOracleData":[3923],"FutarchyOracleProxy":[4025]},"id":4271,"nodeType":"SourceUnit","nodes":[{"id":3881,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:18"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3882,"nodeType":"ImportDirective","scope":4271,"sourceUnit":4718,"src":"25:31:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","file":"../Events/EventFactory.sol","id":3883,"nodeType":"ImportDirective","scope":4271,"sourceUnit":579,"src":"57:36:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","file":"../Markets/StandardMarketWithPriceLoggerFactory.sol","id":3884,"nodeType":"ImportDirective","scope":4271,"sourceUnit":3528,"src":"94:61:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3885,"nodeType":"ImportDirective","scope":4271,"sourceUnit":6702,"src":"156:55:18","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3923,"linearizedBaseContracts":[3923],"name":"FutarchyOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3889,"name":"FutarchyFunding","nodeType":"EventDefinition","parameters":{"id":3888,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3887,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":3889,"src":"301:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3886,"name":"uint","nodeType":"ElementaryTypeName","src":"301:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"300:14:18"},"src":"279:36:18"},{"anonymous":false,"documentation":null,"id":3891,"name":"FutarchyClosing","nodeType":"EventDefinition","parameters":{"id":3890,"nodeType":"ParameterList","parameters":[],"src":"341:2:18"},"src":"320:24:18"},{"anonymous":false,"documentation":null,"id":3895,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3894,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3893,"indexed":false,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3895,"src":"373:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3892,"name":"uint","nodeType":"ElementaryTypeName","src":"373:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"372:25:18"},"src":"349:49:18"},{"constant":true,"id":3898,"name":"LONG","nodeType":"VariableDeclaration","scope":3923,"src":"437:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3896,"name":"uint8","nodeType":"ElementaryTypeName","src":"437:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3897,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"466:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3900,"name":"creator","nodeType":"VariableDeclaration","scope":3923,"src":"505:15:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3899,"name":"address","nodeType":"ElementaryTypeName","src":"505:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3903,"name":"markets","nodeType":"VariableDeclaration","scope":3923,"src":"526:46:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[]"},"typeName":{"baseType":{"contractScope":null,"id":3901,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"526:29:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3902,"length":null,"nodeType":"ArrayTypeName","src":"526:31:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage_ptr","typeString":"contract StandardMarketWithPriceLogger[]"}},"value":null,"visibility":"public"},{"constant":false,"id":3905,"name":"categoricalEvent","nodeType":"VariableDeclaration","scope":3923,"src":"578:40:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":3904,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"578:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":3907,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":3923,"src":"624:25:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3906,"name":"uint","nodeType":"ElementaryTypeName","src":"624:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3909,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3923,"src":"655:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3908,"name":"uint","nodeType":"ElementaryTypeName","src":"655:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3911,"name":"isSet","nodeType":"VariableDeclaration","scope":3923,"src":"691:17:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3910,"name":"bool","nodeType":"ElementaryTypeName","src":"691:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"body":{"id":3921,"nodeType":"Block","src":"769:104:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3914,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"833:3:18","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"833:10:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3916,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"847:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"833:21:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3913,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"825:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3918,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"825:30:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3919,"nodeType":"ExpressionStatement","src":"825:30:18"},{"id":3920,"nodeType":"PlaceholderStatement","src":"865:1:18"}]},"documentation":null,"id":3922,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":3912,"nodeType":"ParameterList","parameters":[],"src":"766:2:18"},"src":"748:125:18","visibility":"internal"}],"scope":4271,"src":"214:661:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3924,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"909:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3925,"nodeType":"InheritanceSpecifier","src":"909:5:18"},{"arguments":null,"baseName":{"contractScope":null,"id":3926,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"916:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":3927,"nodeType":"InheritanceSpecifier","src":"916:18:18"}],"contractDependencies":[3923,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4025,"linearizedBaseContracts":[4025,3923,6701,6673],"name":"FutarchyOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4023,"nodeType":"Block","src":"2128:728:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3962,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3960,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2193:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2210:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2193:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3959,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2185:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3963,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2185:27:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3964,"nodeType":"ExpressionStatement","src":"2185:27:18"},{"expression":{"argumentTypes":null,"id":3974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3965,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2255:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3968,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3935,"src":"2310:15:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3970,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7723,"src":"2334:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}],"id":3969,"name":"Oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4717,"src":"2327:6:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Oracle_$4717_$","typeString":"type(contract Oracle)"}},"id":3971,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2327:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3972,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3939,"src":"2341:12:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3966,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2274:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3967,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createCategoricalEvent","nodeType":"MemberAccess","referencedDeclaration":511,"src":"2274:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$_t_contract$_CategoricalEvent_$152_$","typeString":"function (contract ERC20,contract Oracle,uint8) external returns (contract CategoricalEvent)"}},"id":3973,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2274:80:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2255:99:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3975,"nodeType":"ExpressionStatement","src":"2255:99:18"},{"body":{"id":4013,"nodeType":"Block","src":"2460:322:18","statements":[{"assignments":[3989],"declarations":[{"constant":false,"id":3989,"name":"scalarEvent","nodeType":"VariableDeclaration","scope":4024,"src":"2474:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":3988,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"2474:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"}],"id":4000,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3994,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2579:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3992,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2548:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3993,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2548:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2548:33:18","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":3996,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3937,"src":"2599:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3997,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3941,"src":"2623:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":3998,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3943,"src":"2651:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3990,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2500:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3991,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createScalarEvent","nodeType":"MemberAccess","referencedDeclaration":577,"src":"2500:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$_t_contract$_ScalarEvent_$840_$","typeString":"function (contract ERC20,contract Oracle,int256,int256) external returns (contract ScalarEvent)"}},"id":3999,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2500:175:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"VariableDeclarationStatement","src":"2474:201:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4006,"name":"scalarEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3989,"src":"2729:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":4007,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3947,"src":"2742:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4008,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3949,"src":"2755:3:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4009,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3953,"src":"2760:9:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4004,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3945,"src":"2702:13:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"id":4005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3526,"src":"2702:26:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$_t_contract$_StandardMarketWithPriceLogger_$3458_$","typeString":"function (contract Event,contract MarketMaker,uint24,uint256) external returns (contract StandardMarketWithPriceLogger)"}},"id":4010,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2702:68:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}],"expression":{"argumentTypes":null,"id":4001,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"2689:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2689:12:18","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_StandardMarketWithPriceLogger_$3458_$returns$_t_uint256_$","typeString":"function (contract StandardMarketWithPriceLogger) returns (uint256)"}},"id":4011,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2689:82:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4012,"nodeType":"ExpressionStatement","src":"2689:82:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3980,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2415:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3981,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2419:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2419:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3983,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2419:34:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2415:38:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4014,"initializationExpression":{"assignments":[3977],"declarations":[{"constant":false,"id":3977,"name":"i","nodeType":"VariableDeclaration","scope":4024,"src":"2402:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3976,"name":"uint8","nodeType":"ElementaryTypeName","src":"2402:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":3979,"initialValue":{"argumentTypes":null,"hexValue":"30","id":3978,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2412:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2402:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":3986,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2455:3:18","subExpression":{"argumentTypes":null,"id":3985,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2455:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":3987,"nodeType":"ExpressionStatement","src":"2455:3:18"},"nodeType":"ForStatement","src":"2397:385:18"},{"expression":{"argumentTypes":null,"id":4017,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4015,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"2791:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4016,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3931,"src":"2801:8:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2791:18:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4018,"nodeType":"ExpressionStatement","src":"2791:18:18"},{"expression":{"argumentTypes":null,"id":4021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4019,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"2819:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4020,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2835:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2819:30:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4022,"nodeType":"ExpressionStatement","src":"2819:30:18"}]},"documentation":"@dev Constructor creates events and markets for futarchy oracle\n @param _creator Oracle creator\n @param eventFactory Event factory contract\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 @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @param marketFactory Market factory contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param _tradingPeriod Trading period before decision can be determined\n @param startDate Start date for price logging","id":4024,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3956,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3929,"src":"2100:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3957,"modifierName":{"argumentTypes":null,"id":3955,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2094:5:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2094:14:18"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3954,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3929,"name":"proxied","nodeType":"VariableDeclaration","scope":4024,"src":"1707:15:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3928,"name":"address","nodeType":"ElementaryTypeName","src":"1707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3931,"name":"_creator","nodeType":"VariableDeclaration","scope":4024,"src":"1732:16:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3930,"name":"address","nodeType":"ElementaryTypeName","src":"1732:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3933,"name":"eventFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1758:25:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":3932,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"1758:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3935,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4024,"src":"1793:21:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":3934,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1793:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":3937,"name":"oracle","nodeType":"VariableDeclaration","scope":4024,"src":"1824:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":3936,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1824:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3939,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4024,"src":"1847:18:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3938,"name":"uint8","nodeType":"ElementaryTypeName","src":"1847:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3941,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4024,"src":"1875:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3940,"name":"int","nodeType":"ElementaryTypeName","src":"1875:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3943,"name":"upperBound","nodeType":"VariableDeclaration","scope":4024,"src":"1899:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3942,"name":"int","nodeType":"ElementaryTypeName","src":"1899:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3945,"name":"marketFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1923:50:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":3944,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"1923:36:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3947,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4024,"src":"1983:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3946,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1983:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3949,"name":"fee","nodeType":"VariableDeclaration","scope":4024,"src":"2016:10:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3948,"name":"uint24","nodeType":"ElementaryTypeName","src":"2016:6:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3951,"name":"_tradingPeriod","nodeType":"VariableDeclaration","scope":4024,"src":"2036:19:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3950,"name":"uint","nodeType":"ElementaryTypeName","src":"2036:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3953,"name":"startDate","nodeType":"VariableDeclaration","scope":4024,"src":"2065:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3952,"name":"uint","nodeType":"ElementaryTypeName","src":"2065:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1697:388:18"},"payable":false,"returnParameters":{"id":3958,"nodeType":"ParameterList","parameters":[],"src":"2128:0:18"},"scope":4025,"src":"1686:1170:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4271,"src":"877:1981:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4026,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"3025:7:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4027,"nodeType":"InheritanceSpecifier","src":"3025:7:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4028,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"3034:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4029,"nodeType":"InheritanceSpecifier","src":"3034:6:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4030,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"3042:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":4031,"nodeType":"InheritanceSpecifier","src":"3042:18:18"}],"contractDependencies":[3923,4717,6673],"contractKind":"contract","documentation":"@title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n @author Stefan George - ","fullyImplemented":true,"id":4270,"linearizedBaseContracts":[4270,3923,4717,6673],"name":"FutarchyOracle","nodeType":"ContractDefinition","nodes":[{"id":4033,"libraryName":{"contractScope":null,"id":4032,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"3073:8:18","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"3067:21:18","typeName":null},{"body":{"id":4106,"nodeType":"Block","src":"3300:644:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4056,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4045,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"3397:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4046,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"3406:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"id":4047,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3412:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4041,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3349:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3349:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4043,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4044,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3349:47:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":4048,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:71:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4053,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3483:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":4054,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3501:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4049,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3440:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4050,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3440:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4051,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3440:42:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4055,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:69:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3349:160:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4040,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3338:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3338:172:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4058,"nodeType":"ExpressionStatement","src":"3338:172:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4062,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3552:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4059,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3520:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4061,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"3520:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3520:40:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4064,"nodeType":"ExpressionStatement","src":"3520:40:18"},{"body":{"id":4100,"nodeType":"Block","src":"3684:215:18","statements":[{"assignments":[4077],"declarations":[{"constant":false,"id":4077,"name":"market","nodeType":"VariableDeclaration","scope":4107,"src":"3698:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4076,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"3698:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4081,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4078,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3714:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4080,"indexExpression":{"argumentTypes":null,"id":4079,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3722:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3714:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"3698:26:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4089,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3837:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":4090,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3845:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4083,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3788:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3788:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4085,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3788:38:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4087,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:40:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4088,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3788:48:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4091,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:65:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4082,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3780:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4092,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3780:74:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4093,"nodeType":"ExpressionStatement","src":"3780:74:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4097,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3880:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4094,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3868:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"3868:11:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4098,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3868:20:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4099,"nodeType":"ExpressionStatement","src":"3868:20:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4072,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4069,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3659:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4070,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3663:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4071,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3663:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3659:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4101,"initializationExpression":{"assignments":[4066],"declarations":[{"constant":false,"id":4066,"name":"i","nodeType":"VariableDeclaration","scope":4107,"src":"3646:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4065,"name":"uint8","nodeType":"ElementaryTypeName","src":"3646:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4068,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4067,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3656:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3646:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3679:3:18","subExpression":{"argumentTypes":null,"id":4073,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3679:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4075,"nodeType":"ExpressionStatement","src":"3679:3:18"},"nodeType":"ForStatement","src":"3641:258:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4103,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3929:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4102,"name":"FutarchyFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3889,"src":"3913:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4104,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:24:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4105,"nodeType":"EmitStatement","src":"3908:29:18"}]},"documentation":"@dev Funds all markets with equal amount of funding\n @param funding Amount of funding","id":4107,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4038,"modifierName":{"argumentTypes":null,"id":4037,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"3286:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3286:9:18"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":4036,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4035,"name":"funding","nodeType":"VariableDeclaration","scope":4107,"src":"3249:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4034,"name":"uint","nodeType":"ElementaryTypeName","src":"3249:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3248:14:18"},"payable":false,"returnParameters":{"id":4039,"nodeType":"ParameterList","parameters":[],"src":"3300:0:18"},"scope":4270,"src":"3235:709:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4173,"nodeType":"Block","src":"4115:692:18","statements":[{"assignments":[4113],"declarations":[{"constant":false,"id":4113,"name":"market","nodeType":"VariableDeclaration","scope":4174,"src":"4166:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4112,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4166:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4120,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4114,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"4182:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4119,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4116,"name":"getOutcome","nodeType":"Identifier","overloadedDeclarations":[4269],"referencedDeclaration":4269,"src":"4195:10:18","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_int256_$","typeString":"function () view returns (int256)"}},"id":4117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4195:12:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4115,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4190:4:18","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":4118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4190:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4182:27:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"4166:43:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4122,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4227:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4227:29:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4124,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:31:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4125,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4262:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4262:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4127,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4128,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4262:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:37:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4227:72:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4121,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4219:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4131,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4219:81:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4132,"nodeType":"ExpressionStatement","src":"4219:81:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4133,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4404:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4135,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4404:12:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":4136,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4404:14:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4137,"nodeType":"ExpressionStatement","src":"4404:14:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4138,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4428:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4140,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4428:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4141,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4428:37:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4143,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:39:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4144,"nodeType":"ExpressionStatement","src":"4428:39:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4145,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4477:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4477:19:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4477:21:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4149,"nodeType":"ExpressionStatement","src":"4477:21:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4150,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4612:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":135,"src":"4612:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4612:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4154,"nodeType":"ExpressionStatement","src":"4612:33:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4160,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"4707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4165,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"4761:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4161,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4716:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4716:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4716:44:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":4166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:50:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4156,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4663:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4663:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4158,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4159,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"4663:43:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4167,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:104:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4155,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4655:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4168,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4655:113:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4169,"nodeType":"ExpressionStatement","src":"4655:113:18"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4170,"name":"FutarchyClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3891,"src":"4783:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":4171,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4783:17:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4172,"nodeType":"EmitStatement","src":"4778:22:18"}]},"documentation":"@dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator","id":4174,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4110,"modifierName":{"argumentTypes":null,"id":4109,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"4101:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4101:9:18"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":4108,"nodeType":"ParameterList","parameters":[],"src":"4075:2:18"},"payable":false,"returnParameters":{"id":4111,"nodeType":"ParameterList","parameters":[],"src":"4115:0:18"},"scope":4270,"src":"4061:746:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4250,"nodeType":"Block","src":"4947:676:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"5026:6:18","subExpression":{"argumentTypes":null,"id":4178,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5027:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4180,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5036:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4182,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4181,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5044:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5036:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4183,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"startDate","nodeType":"MemberAccess","referencedDeclaration":3186,"src":"5036:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4184,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5036:22:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":4185,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"5061:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:38:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":4187,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5077:3:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:44:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5026:54:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4177,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5018:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4190,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5018:63:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4191,"nodeType":"ExpressionStatement","src":"5018:63:18"},{"assignments":[4193],"declarations":[{"constant":false,"id":4193,"name":"highestAvgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5166:20:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4192,"name":"uint","nodeType":"ElementaryTypeName","src":"5166:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4199,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4194,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5189:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4196,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5197:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5189:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4197,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5189:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5189:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5166:47:18"},{"assignments":[4201],"declarations":[{"constant":false,"id":4201,"name":"highestIndex","nodeType":"VariableDeclaration","scope":4251,"src":"5223:17:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4200,"name":"uint","nodeType":"ElementaryTypeName","src":"5223:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4203,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4202,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5243:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"5223:21:18"},{"body":{"id":4236,"nodeType":"Block","src":"5297:203:18","statements":[{"assignments":[4216],"declarations":[{"constant":false,"id":4216,"name":"avgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5311:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4215,"name":"uint","nodeType":"ElementaryTypeName","src":"5311:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4222,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4217,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5327:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4219,"indexExpression":{"argumentTypes":null,"id":4218,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5335:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5327:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5327:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4221,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5327:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5311:40:18"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4225,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4223,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5369:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4224,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5380:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5369:26:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4235,"nodeType":"IfStatement","src":"5365:125:18","trueBody":{"id":4234,"nodeType":"Block","src":"5397:93:18","statements":[{"expression":{"argumentTypes":null,"id":4228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4226,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5415:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4227,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5433:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5415:26:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4229,"nodeType":"ExpressionStatement","src":"5415:26:18"},{"expression":{"argumentTypes":null,"id":4232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4230,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5459:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4231,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5474:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"5459:16:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4233,"nodeType":"ExpressionStatement","src":"5459:16:18"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4211,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4208,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5272:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4209,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5276:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4210,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5276:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5272:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4237,"initializationExpression":{"assignments":[4205],"declarations":[{"constant":false,"id":4205,"name":"i","nodeType":"VariableDeclaration","scope":4251,"src":"5259:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4204,"name":"uint8","nodeType":"ElementaryTypeName","src":"5259:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4207,"initialValue":{"argumentTypes":null,"hexValue":"31","id":4206,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5269:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"5259:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4213,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"5292:3:18","subExpression":{"argumentTypes":null,"id":4212,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5292:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4214,"nodeType":"ExpressionStatement","src":"5292:3:18"},"nodeType":"ForStatement","src":"5254:246:18"},{"expression":{"argumentTypes":null,"id":4240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4238,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5509:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4239,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5530:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5509:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4241,"nodeType":"ExpressionStatement","src":"5509:33:18"},{"expression":{"argumentTypes":null,"id":4244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4242,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5552:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4243,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"5560:4:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"5552:12:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4245,"nodeType":"ExpressionStatement","src":"5552:12:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4247,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5597:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4246,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3895,"src":"5579:17:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4248,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5579:37:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4249,"nodeType":"EmitStatement","src":"5574:42:18"}]},"documentation":"@dev Allows to set the oracle outcome based on the market with largest long position","id":4251,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4175,"nodeType":"ParameterList","parameters":[],"src":"4925:2:18"},"payable":false,"returnParameters":{"id":4176,"nodeType":"ParameterList","parameters":[],"src":"4947:0:18"},"scope":4270,"src":"4906:717:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4258,"nodeType":"Block","src":"5787:29:18","statements":[{"expression":{"argumentTypes":null,"id":4256,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5804:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4255,"id":4257,"nodeType":"Return","src":"5797:12:18"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4259,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4252,"nodeType":"ParameterList","parameters":[],"src":"5729:2:18"},"payable":false,"returnParameters":{"id":4255,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4254,"name":"","nodeType":"VariableDeclaration","scope":4259,"src":"5777:4:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4253,"name":"bool","nodeType":"ElementaryTypeName","src":"5777:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5776:6:18"},"scope":4270,"src":"5708:108:18","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4268,"nodeType":"Block","src":"5959:47:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4265,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5980:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4264,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5976:3:18","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":4266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5976:23:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4263,"id":4267,"nodeType":"Return","src":"5969:30:18"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4269,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4260,"nodeType":"ParameterList","parameters":[],"src":"5902:2:18"},"payable":false,"returnParameters":{"id":4263,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4262,"name":"","nodeType":"VariableDeclaration","scope":4269,"src":"5950:3:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4261,"name":"int","nodeType":"ElementaryTypeName","src":"5950:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"5949:5:18"},"scope":4270,"src":"5883:123:18","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4271,"src":"2998:3010:18"}],"src":"0:6009:18"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/FutarchyOracle.sol","exportedSymbols":{"FutarchyOracle":[4270],"FutarchyOracleData":[3923],"FutarchyOracleProxy":[4025]},"id":4271,"nodeType":"SourceUnit","nodes":[{"id":3881,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:18"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":3882,"nodeType":"ImportDirective","scope":4271,"sourceUnit":4718,"src":"25:31:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/EventFactory.sol","file":"../Events/EventFactory.sol","id":3883,"nodeType":"ImportDirective","scope":4271,"sourceUnit":579,"src":"57:36:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","file":"../Markets/StandardMarketWithPriceLoggerFactory.sol","id":3884,"nodeType":"ImportDirective","scope":4271,"sourceUnit":3528,"src":"94:61:18","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":3885,"nodeType":"ImportDirective","scope":4271,"sourceUnit":6702,"src":"156:55:18","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3923,"linearizedBaseContracts":[3923],"name":"FutarchyOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3889,"name":"FutarchyFunding","nodeType":"EventDefinition","parameters":{"id":3888,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3887,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":3889,"src":"301:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3886,"name":"uint","nodeType":"ElementaryTypeName","src":"301:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"300:14:18"},"src":"279:36:18"},{"anonymous":false,"documentation":null,"id":3891,"name":"FutarchyClosing","nodeType":"EventDefinition","parameters":{"id":3890,"nodeType":"ParameterList","parameters":[],"src":"341:2:18"},"src":"320:24:18"},{"anonymous":false,"documentation":null,"id":3895,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":3894,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3893,"indexed":false,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3895,"src":"373:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3892,"name":"uint","nodeType":"ElementaryTypeName","src":"373:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"372:25:18"},"src":"349:49:18"},{"constant":true,"id":3898,"name":"LONG","nodeType":"VariableDeclaration","scope":3923,"src":"437:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3896,"name":"uint8","nodeType":"ElementaryTypeName","src":"437:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3897,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"466:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3900,"name":"creator","nodeType":"VariableDeclaration","scope":3923,"src":"505:15:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3899,"name":"address","nodeType":"ElementaryTypeName","src":"505:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3903,"name":"markets","nodeType":"VariableDeclaration","scope":3923,"src":"526:46:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[]"},"typeName":{"baseType":{"contractScope":null,"id":3901,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"526:29:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3902,"length":null,"nodeType":"ArrayTypeName","src":"526:31:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage_ptr","typeString":"contract StandardMarketWithPriceLogger[]"}},"value":null,"visibility":"public"},{"constant":false,"id":3905,"name":"categoricalEvent","nodeType":"VariableDeclaration","scope":3923,"src":"578:40:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},"typeName":{"contractScope":null,"id":3904,"name":"CategoricalEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"578:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"value":null,"visibility":"public"},{"constant":false,"id":3907,"name":"tradingPeriod","nodeType":"VariableDeclaration","scope":3923,"src":"624:25:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3906,"name":"uint","nodeType":"ElementaryTypeName","src":"624:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3909,"name":"winningMarketIndex","nodeType":"VariableDeclaration","scope":3923,"src":"655:30:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3908,"name":"uint","nodeType":"ElementaryTypeName","src":"655:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3911,"name":"isSet","nodeType":"VariableDeclaration","scope":3923,"src":"691:17:18","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3910,"name":"bool","nodeType":"ElementaryTypeName","src":"691:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"body":{"id":3921,"nodeType":"Block","src":"769:104:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":3917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3914,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"833:3:18","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"833:10:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":3916,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"847:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"833:21:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3913,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"825:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3918,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"825:30:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3919,"nodeType":"ExpressionStatement","src":"825:30:18"},{"id":3920,"nodeType":"PlaceholderStatement","src":"865:1:18"}]},"documentation":null,"id":3922,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":3912,"nodeType":"ParameterList","parameters":[],"src":"766:2:18"},"src":"748:125:18","visibility":"internal"}],"scope":4271,"src":"214:661:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3924,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"909:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":3925,"nodeType":"InheritanceSpecifier","src":"909:5:18"},{"arguments":null,"baseName":{"contractScope":null,"id":3926,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"916:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":3927,"nodeType":"InheritanceSpecifier","src":"916:18:18"}],"contractDependencies":[3923,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4025,"linearizedBaseContracts":[4025,3923,6701,6673],"name":"FutarchyOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4023,"nodeType":"Block","src":"2128:728:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3962,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3960,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2193:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2210:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2193:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3959,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2185:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3963,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2185:27:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3964,"nodeType":"ExpressionStatement","src":"2185:27:18"},{"expression":{"argumentTypes":null,"id":3974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3965,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2255:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3968,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3935,"src":"2310:15:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3970,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7723,"src":"2334:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracleProxy_$4025","typeString":"contract FutarchyOracleProxy"}],"id":3969,"name":"Oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4717,"src":"2327:6:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Oracle_$4717_$","typeString":"type(contract Oracle)"}},"id":3971,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2327:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3972,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3939,"src":"2341:12:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3966,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2274:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3967,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createCategoricalEvent","nodeType":"MemberAccess","referencedDeclaration":511,"src":"2274:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_uint8_$returns$_t_contract$_CategoricalEvent_$152_$","typeString":"function (contract ERC20,contract Oracle,uint8) external returns (contract CategoricalEvent)"}},"id":3973,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2274:80:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"src":"2255:99:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3975,"nodeType":"ExpressionStatement","src":"2255:99:18"},{"body":{"id":4013,"nodeType":"Block","src":"2460:322:18","statements":[{"assignments":[3989],"declarations":[{"constant":false,"id":3989,"name":"scalarEvent","nodeType":"VariableDeclaration","scope":4024,"src":"2474:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},"typeName":{"contractScope":null,"id":3988,"name":"ScalarEvent","nodeType":"UserDefinedTypeName","referencedDeclaration":840,"src":"2474:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"value":null,"visibility":"internal"}],"id":4000,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3994,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2579:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3992,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2548:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3993,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2548:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3995,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2548:33:18","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":3996,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3937,"src":"2599:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":3997,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3941,"src":"2623:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":3998,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3943,"src":"2651:10:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3990,"name":"eventFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3933,"src":"2500:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"id":3991,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createScalarEvent","nodeType":"MemberAccess","referencedDeclaration":577,"src":"2500:30:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_ERC20_$7328_$_t_contract$_Oracle_$4717_$_t_int256_$_t_int256_$returns$_t_contract$_ScalarEvent_$840_$","typeString":"function (contract ERC20,contract Oracle,int256,int256) external returns (contract ScalarEvent)"}},"id":3999,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2500:175:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},"nodeType":"VariableDeclarationStatement","src":"2474:201:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4006,"name":"scalarEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3989,"src":"2729:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"}},{"argumentTypes":null,"id":4007,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3947,"src":"2742:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":4008,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3949,"src":"2755:3:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":4009,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3953,"src":"2760:9:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ScalarEvent_$840","typeString":"contract ScalarEvent"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4004,"name":"marketFactory","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3945,"src":"2702:13:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"id":4005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"createMarket","nodeType":"MemberAccess","referencedDeclaration":3526,"src":"2702:26:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$_t_contract$_StandardMarketWithPriceLogger_$3458_$","typeString":"function (contract Event,contract MarketMaker,uint24,uint256) external returns (contract StandardMarketWithPriceLogger)"}},"id":4010,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2702:68:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}],"expression":{"argumentTypes":null,"id":4001,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"2689:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2689:12:18","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_StandardMarketWithPriceLogger_$3458_$returns$_t_uint256_$","typeString":"function (contract StandardMarketWithPriceLogger) returns (uint256)"}},"id":4011,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2689:82:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4012,"nodeType":"ExpressionStatement","src":"2689:82:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3980,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2415:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3981,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"2419:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":3982,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2419:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3983,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2419:34:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2415:38:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4014,"initializationExpression":{"assignments":[3977],"declarations":[{"constant":false,"id":3977,"name":"i","nodeType":"VariableDeclaration","scope":4024,"src":"2402:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3976,"name":"uint8","nodeType":"ElementaryTypeName","src":"2402:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":3979,"initialValue":{"argumentTypes":null,"hexValue":"30","id":3978,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2412:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2402:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":3986,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2455:3:18","subExpression":{"argumentTypes":null,"id":3985,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3977,"src":"2455:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":3987,"nodeType":"ExpressionStatement","src":"2455:3:18"},"nodeType":"ForStatement","src":"2397:385:18"},{"expression":{"argumentTypes":null,"id":4017,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4015,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"2791:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4016,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3931,"src":"2801:8:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2791:18:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4018,"nodeType":"ExpressionStatement","src":"2791:18:18"},{"expression":{"argumentTypes":null,"id":4021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4019,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"2819:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4020,"name":"_tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3951,"src":"2835:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2819:30:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4022,"nodeType":"ExpressionStatement","src":"2819:30:18"}]},"documentation":"@dev Constructor creates events and markets for futarchy oracle\n @param _creator Oracle creator\n @param eventFactory Event factory contract\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 @param lowerBound Lower bound for event outcome\n @param upperBound Lower bound for event outcome\n @param marketFactory Market factory contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param _tradingPeriod Trading period before decision can be determined\n @param startDate Start date for price logging","id":4024,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3956,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3929,"src":"2100:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":3957,"modifierName":{"argumentTypes":null,"id":3955,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"2094:5:18","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"2094:14:18"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3954,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3929,"name":"proxied","nodeType":"VariableDeclaration","scope":4024,"src":"1707:15:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3928,"name":"address","nodeType":"ElementaryTypeName","src":"1707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3931,"name":"_creator","nodeType":"VariableDeclaration","scope":4024,"src":"1732:16:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3930,"name":"address","nodeType":"ElementaryTypeName","src":"1732:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3933,"name":"eventFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1758:25:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"},"typeName":{"contractScope":null,"id":3932,"name":"EventFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":578,"src":"1758:12:18","typeDescriptions":{"typeIdentifier":"t_contract$_EventFactory_$578","typeString":"contract EventFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3935,"name":"collateralToken","nodeType":"VariableDeclaration","scope":4024,"src":"1793:21:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":3934,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1793:5:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":3937,"name":"oracle","nodeType":"VariableDeclaration","scope":4024,"src":"1824:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":3936,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1824:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":3939,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":4024,"src":"1847:18:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3938,"name":"uint8","nodeType":"ElementaryTypeName","src":"1847:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3941,"name":"lowerBound","nodeType":"VariableDeclaration","scope":4024,"src":"1875:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3940,"name":"int","nodeType":"ElementaryTypeName","src":"1875:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3943,"name":"upperBound","nodeType":"VariableDeclaration","scope":4024,"src":"1899:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3942,"name":"int","nodeType":"ElementaryTypeName","src":"1899:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3945,"name":"marketFactory","nodeType":"VariableDeclaration","scope":4024,"src":"1923:50:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"},"typeName":{"contractScope":null,"id":3944,"name":"StandardMarketWithPriceLoggerFactory","nodeType":"UserDefinedTypeName","referencedDeclaration":3527,"src":"1923:36:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerFactory_$3527","typeString":"contract StandardMarketWithPriceLoggerFactory"}},"value":null,"visibility":"internal"},{"constant":false,"id":3947,"name":"marketMaker","nodeType":"VariableDeclaration","scope":4024,"src":"1983:23:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3946,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1983:11:18","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3949,"name":"fee","nodeType":"VariableDeclaration","scope":4024,"src":"2016:10:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3948,"name":"uint24","nodeType":"ElementaryTypeName","src":"2016:6:18","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3951,"name":"_tradingPeriod","nodeType":"VariableDeclaration","scope":4024,"src":"2036:19:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3950,"name":"uint","nodeType":"ElementaryTypeName","src":"2036:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3953,"name":"startDate","nodeType":"VariableDeclaration","scope":4024,"src":"2065:14:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3952,"name":"uint","nodeType":"ElementaryTypeName","src":"2065:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1697:388:18"},"payable":false,"returnParameters":{"id":3958,"nodeType":"ParameterList","parameters":[],"src":"2128:0:18"},"scope":4025,"src":"1686:1170:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4271,"src":"877:1981:18"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4026,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"3025:7:18","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4027,"nodeType":"InheritanceSpecifier","src":"3025:7:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4028,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"3034:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4029,"nodeType":"InheritanceSpecifier","src":"3034:6:18"},{"arguments":null,"baseName":{"contractScope":null,"id":4030,"name":"FutarchyOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":3923,"src":"3042:18:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracleData_$3923","typeString":"contract FutarchyOracleData"}},"id":4031,"nodeType":"InheritanceSpecifier","src":"3042:18:18"}],"contractDependencies":[3923,4717,6673],"contractKind":"contract","documentation":"@title Futarchy oracle contract - Allows to create an oracle based on market behaviour\n @author Stefan George - ","fullyImplemented":true,"id":4270,"linearizedBaseContracts":[4270,3923,4717,6673],"name":"FutarchyOracle","nodeType":"ContractDefinition","nodes":[{"id":4033,"libraryName":{"contractScope":null,"id":4032,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"3073:8:18","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"3067:21:18","typeName":null},{"body":{"id":4106,"nodeType":"Block","src":"3300:644:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4056,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4045,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"3397:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4046,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"3406:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}},{"argumentTypes":null,"id":4047,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3412:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4041,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3349:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3349:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4043,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4044,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3349:47:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":4048,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3349:71:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4053,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3483:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},{"argumentTypes":null,"id":4054,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3501:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4049,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3440:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4050,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3440:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4051,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3440:42:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4055,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3440:69:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3349:160:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4040,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3338:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3338:172:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4058,"nodeType":"ExpressionStatement","src":"3338:172:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4062,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3552:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4059,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"3520:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4061,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"3520:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3520:40:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4064,"nodeType":"ExpressionStatement","src":"3520:40:18"},{"body":{"id":4100,"nodeType":"Block","src":"3684:215:18","statements":[{"assignments":[4077],"declarations":[{"constant":false,"id":4077,"name":"market","nodeType":"VariableDeclaration","scope":4107,"src":"3698:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4076,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"3698:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4081,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4078,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3714:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4080,"indexExpression":{"argumentTypes":null,"id":4079,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3722:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3714:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"3698:26:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4089,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3837:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},{"argumentTypes":null,"id":4090,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3845:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4083,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3788:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3788:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4085,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3788:38:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4087,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:40:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4088,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"3788:48:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4091,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3788:65:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4082,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3780:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4092,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3780:74:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4093,"nodeType":"ExpressionStatement","src":"3780:74:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4097,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3880:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4094,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4077,"src":"3868:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"fund","nodeType":"MemberAccess","referencedDeclaration":2179,"src":"3868:11:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":4098,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3868:20:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4099,"nodeType":"ExpressionStatement","src":"3868:20:18"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4072,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4069,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3659:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4070,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"3663:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4071,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3663:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3659:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4101,"initializationExpression":{"assignments":[4066],"declarations":[{"constant":false,"id":4066,"name":"i","nodeType":"VariableDeclaration","scope":4107,"src":"3646:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4065,"name":"uint8","nodeType":"ElementaryTypeName","src":"3646:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4068,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4067,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3656:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"3646:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"3679:3:18","subExpression":{"argumentTypes":null,"id":4073,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4066,"src":"3679:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4075,"nodeType":"ExpressionStatement","src":"3679:3:18"},"nodeType":"ForStatement","src":"3641:258:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4103,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4035,"src":"3929:7:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4102,"name":"FutarchyFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3889,"src":"3913:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4104,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:24:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4105,"nodeType":"EmitStatement","src":"3908:29:18"}]},"documentation":"@dev Funds all markets with equal amount of funding\n @param funding Amount of funding","id":4107,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4038,"modifierName":{"argumentTypes":null,"id":4037,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"3286:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3286:9:18"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":4036,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4035,"name":"funding","nodeType":"VariableDeclaration","scope":4107,"src":"3249:12:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4034,"name":"uint","nodeType":"ElementaryTypeName","src":"3249:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3248:14:18"},"payable":false,"returnParameters":{"id":4039,"nodeType":"ParameterList","parameters":[],"src":"3300:0:18"},"scope":4270,"src":"3235:709:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4173,"nodeType":"Block","src":"4115:692:18","statements":[{"assignments":[4113],"declarations":[{"constant":false,"id":4113,"name":"market","nodeType":"VariableDeclaration","scope":4174,"src":"4166:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":4112,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4166:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"id":4120,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4114,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"4182:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4119,"indexExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4116,"name":"getOutcome","nodeType":"Identifier","overloadedDeclarations":[4269],"referencedDeclaration":4269,"src":"4195:10:18","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_int256_$","typeString":"function () view returns (int256)"}},"id":4117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4195:12:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4115,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4190:4:18","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":4118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4190:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4182:27:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"VariableDeclarationStatement","src":"4166:43:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4122,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4227:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4227:29:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4124,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:31:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4125,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4262:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4262:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4127,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4128,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":192,"src":"4262:35:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4262:37:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4227:72:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4121,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4219:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4131,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4219:81:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4132,"nodeType":"ExpressionStatement","src":"4219:81:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4133,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4404:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4135,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2182,"src":"4404:12:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":4136,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4404:14:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4137,"nodeType":"ExpressionStatement","src":"4404:14:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4138,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4428:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4140,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4428:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":4141,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:22:18","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":4142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":383,"src":"4428:37:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4143,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4428:39:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4144,"nodeType":"ExpressionStatement","src":"4428:39:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4145,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4113,"src":"4477:6:18","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":4147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"withdrawFees","nodeType":"MemberAccess","referencedDeclaration":2187,"src":"4477:19:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4148,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4477:21:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4149,"nodeType":"ExpressionStatement","src":"4477:21:18"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4150,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4612:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"redeemWinnings","nodeType":"MemberAccess","referencedDeclaration":135,"src":"4612:31:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$_t_uint256_$","typeString":"function () external returns (uint256)"}},"id":4153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4612:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4154,"nodeType":"ExpressionStatement","src":"4612:33:18"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4160,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3900,"src":"4707:7:18","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4165,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7725,"src":"4761:4:18","typeDescriptions":{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_FutarchyOracle_$4270","typeString":"contract FutarchyOracle"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4161,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4716:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4716:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"4716:44:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":4166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4716:50:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":4156,"name":"categoricalEvent","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3905,"src":"4663:16:18","typeDescriptions":{"typeIdentifier":"t_contract$_CategoricalEvent_$152","typeString":"contract CategoricalEvent"}},"id":4157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"4663:32:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":4158,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:34:18","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":4159,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"4663:43:18","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":4167,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4663:104:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4155,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4655:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4168,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4655:113:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4169,"nodeType":"ExpressionStatement","src":"4655:113:18"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4170,"name":"FutarchyClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3891,"src":"4783:15:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":4171,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4783:17:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4172,"nodeType":"EmitStatement","src":"4778:22:18"}]},"documentation":"@dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator","id":4174,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4110,"modifierName":{"argumentTypes":null,"id":4109,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3922,"src":"4101:9:18","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"4101:9:18"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":4108,"nodeType":"ParameterList","parameters":[],"src":"4075:2:18"},"payable":false,"returnParameters":{"id":4111,"nodeType":"ParameterList","parameters":[],"src":"4115:0:18"},"scope":4270,"src":"4061:746:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4250,"nodeType":"Block","src":"4947:676:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"5026:6:18","subExpression":{"argumentTypes":null,"id":4178,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5027:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4180,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5036:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4182,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4181,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5044:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5036:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4183,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"startDate","nodeType":"MemberAccess","referencedDeclaration":3186,"src":"5036:20:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4184,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5036:22:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":4185,"name":"tradingPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3907,"src":"5061:13:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:38:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":4187,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5077:3:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5036:44:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5026:54:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4177,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5018:7:18","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4190,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5018:63:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4191,"nodeType":"ExpressionStatement","src":"5018:63:18"},{"assignments":[4193],"declarations":[{"constant":false,"id":4193,"name":"highestAvgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5166:20:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4192,"name":"uint","nodeType":"ElementaryTypeName","src":"5166:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4199,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4194,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5189:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4196,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":4195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5197:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5189:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4197,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5189:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5189:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5166:47:18"},{"assignments":[4201],"declarations":[{"constant":false,"id":4201,"name":"highestIndex","nodeType":"VariableDeclaration","scope":4251,"src":"5223:17:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4200,"name":"uint","nodeType":"ElementaryTypeName","src":"5223:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4203,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4202,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5243:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"5223:21:18"},{"body":{"id":4236,"nodeType":"Block","src":"5297:203:18","statements":[{"assignments":[4216],"declarations":[{"constant":false,"id":4216,"name":"avgPrice","nodeType":"VariableDeclaration","scope":4251,"src":"5311:13:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4215,"name":"uint","nodeType":"ElementaryTypeName","src":"5311:4:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4222,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4217,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5327:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4219,"indexExpression":{"argumentTypes":null,"id":4218,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5335:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5327:10:18","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":4220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getAvgPrice","nodeType":"MemberAccess","referencedDeclaration":3423,"src":"5327:22:18","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":4221,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5327:24:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5311:40:18"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4225,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4223,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5369:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4224,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5380:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5369:26:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4235,"nodeType":"IfStatement","src":"5365:125:18","trueBody":{"id":4234,"nodeType":"Block","src":"5397:93:18","statements":[{"expression":{"argumentTypes":null,"id":4228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4226,"name":"highestAvgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4193,"src":"5415:15:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4227,"name":"avgPrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4216,"src":"5433:8:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5415:26:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4229,"nodeType":"ExpressionStatement","src":"5415:26:18"},{"expression":{"argumentTypes":null,"id":4232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4230,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5459:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4231,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5474:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"5459:16:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4233,"nodeType":"ExpressionStatement","src":"5459:16:18"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4211,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4208,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5272:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4209,"name":"markets","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3903,"src":"5276:7:18","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_StandardMarketWithPriceLogger_$3458_$dyn_storage","typeString":"contract StandardMarketWithPriceLogger[] storage ref"}},"id":4210,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5276:14:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5272:18:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4237,"initializationExpression":{"assignments":[4205],"declarations":[{"constant":false,"id":4205,"name":"i","nodeType":"VariableDeclaration","scope":4251,"src":"5259:7:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4204,"name":"uint8","nodeType":"ElementaryTypeName","src":"5259:5:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":4207,"initialValue":{"argumentTypes":null,"hexValue":"31","id":4206,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5269:1:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"5259:11:18"},"loopExpression":{"expression":{"argumentTypes":null,"id":4213,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"5292:3:18","subExpression":{"argumentTypes":null,"id":4212,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4205,"src":"5292:1:18","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":4214,"nodeType":"ExpressionStatement","src":"5292:3:18"},"nodeType":"ForStatement","src":"5254:246:18"},{"expression":{"argumentTypes":null,"id":4240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4238,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5509:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4239,"name":"highestIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4201,"src":"5530:12:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5509:33:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4241,"nodeType":"ExpressionStatement","src":"5509:33:18"},{"expression":{"argumentTypes":null,"id":4244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4242,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5552:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4243,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"5560:4:18","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"5552:12:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4245,"nodeType":"ExpressionStatement","src":"5552:12:18"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4247,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5597:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4246,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3895,"src":"5579:17:18","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":4248,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5579:37:18","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4249,"nodeType":"EmitStatement","src":"5574:42:18"}]},"documentation":"@dev Allows to set the oracle outcome based on the market with largest long position","id":4251,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4175,"nodeType":"ParameterList","parameters":[],"src":"4925:2:18"},"payable":false,"returnParameters":{"id":4176,"nodeType":"ParameterList","parameters":[],"src":"4947:0:18"},"scope":4270,"src":"4906:717:18","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4258,"nodeType":"Block","src":"5787:29:18","statements":[{"expression":{"argumentTypes":null,"id":4256,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3911,"src":"5804:5:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4255,"id":4257,"nodeType":"Return","src":"5797:12:18"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4259,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4252,"nodeType":"ParameterList","parameters":[],"src":"5729:2:18"},"payable":false,"returnParameters":{"id":4255,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4254,"name":"","nodeType":"VariableDeclaration","scope":4259,"src":"5777:4:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4253,"name":"bool","nodeType":"ElementaryTypeName","src":"5777:4:18","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5776:6:18"},"scope":4270,"src":"5708:108:18","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4268,"nodeType":"Block","src":"5959:47:18","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4265,"name":"winningMarketIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3909,"src":"5980:18:18","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4264,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5976:3:18","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":4266,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5976:23:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4263,"id":4267,"nodeType":"Return","src":"5969:30:18"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4269,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4260,"nodeType":"ParameterList","parameters":[],"src":"5902:2:18"},"payable":false,"returnParameters":{"id":4263,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4262,"name":"","nodeType":"VariableDeclaration","scope":4269,"src":"5950:3:18","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4261,"name":"int","nodeType":"ElementaryTypeName","src":"5950:3:18","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"5949:5:18"},"scope":4270,"src":"5883:123:18","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4271,"src":"2998:3010:18"}],"src":"0:6009:18"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.022Z"}; /***/ }), @@ -275,10 +461,10 @@ module.exports = {"contract_name":"FutarchyOracleFactory","abi":[{"constant":fal /*!**************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/HumanFriendlyToken.json ***! \**************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"HumanFriendlyToken","abi":[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"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,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"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"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263311}; +module.exports = {"contractName":"DetailedERC20","abi":[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","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":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","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"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","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"},{"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_decimals","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"},{"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"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\n\nimport \"./ERC20.sol\";\n\n\n/**\n * @title DetailedERC20 token\n * @dev The decimals are only for visualization purposes.\n * All the operations are done using the smallest and indivisible token unit,\n * just as on Ethereum all the operations are done in wei.\n */\ncontract DetailedERC20 is ERC20 {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n constructor(string _name, string _symbol, uint8 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n","sourcePath":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","ast":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","exportedSymbols":{"DetailedERC20":[338]},"id":339,"nodeType":"SourceUnit","nodes":[{"id":306,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:2"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"./ERC20.sol","id":307,"nodeType":"ImportDirective","scope":339,"sourceUnit":382,"src":"26:21:2","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":308,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":381,"src":"309:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$381","typeString":"contract ERC20"}},"id":309,"nodeType":"InheritanceSpecifier","src":"309:5:2"}],"contractDependencies":[381,413],"contractKind":"contract","documentation":"@title DetailedERC20 token\n@dev The decimals are only for visualization purposes.\nAll the operations are done using the smallest and indivisible token unit,\njust as on Ethereum all the operations are done in wei.","fullyImplemented":false,"id":338,"linearizedBaseContracts":[338,381,413],"name":"DetailedERC20","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":311,"name":"name","nodeType":"VariableDeclaration","scope":338,"src":"319:18:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":310,"name":"string","nodeType":"ElementaryTypeName","src":"319:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":313,"name":"symbol","nodeType":"VariableDeclaration","scope":338,"src":"341:20:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":312,"name":"string","nodeType":"ElementaryTypeName","src":"341:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":315,"name":"decimals","nodeType":"VariableDeclaration","scope":338,"src":"365:21:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":314,"name":"uint8","nodeType":"ElementaryTypeName","src":"365:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"body":{"id":336,"nodeType":"Block","src":"457:71:2","statements":[{"expression":{"argumentTypes":null,"id":326,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":324,"name":"name","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":311,"src":"463:4:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":325,"name":"_name","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":317,"src":"470:5:2","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"src":"463:12:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":327,"nodeType":"ExpressionStatement","src":"463:12:2"},{"expression":{"argumentTypes":null,"id":330,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":328,"name":"symbol","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":313,"src":"481:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":329,"name":"_symbol","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":319,"src":"490:7:2","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"src":"481:16:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":331,"nodeType":"ExpressionStatement","src":"481:16:2"},{"expression":{"argumentTypes":null,"id":334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":332,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":315,"src":"503:8:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":333,"name":"_decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":321,"src":"514:9:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"503:20:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":335,"nodeType":"ExpressionStatement","src":"503:20:2"}]},"documentation":null,"id":337,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":322,"nodeType":"ParameterList","parameters":[{"constant":false,"id":317,"name":"_name","nodeType":"VariableDeclaration","scope":337,"src":"403:12:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":316,"name":"string","nodeType":"ElementaryTypeName","src":"403:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":319,"name":"_symbol","nodeType":"VariableDeclaration","scope":337,"src":"417:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":318,"name":"string","nodeType":"ElementaryTypeName","src":"417:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":321,"name":"_decimals","nodeType":"VariableDeclaration","scope":337,"src":"433:15:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":320,"name":"uint8","nodeType":"ElementaryTypeName","src":"433:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"402:47:2"},"payable":false,"returnParameters":{"id":323,"nodeType":"ParameterList","parameters":[],"src":"457:0:2"},"scope":338,"src":"391:137:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":339,"src":"283:247:2"}],"src":"0:531:2"},"legacyAST":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","exportedSymbols":{"DetailedERC20":[338]},"id":339,"nodeType":"SourceUnit","nodes":[{"id":306,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:2"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"./ERC20.sol","id":307,"nodeType":"ImportDirective","scope":339,"sourceUnit":382,"src":"26:21:2","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":308,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":381,"src":"309:5:2","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$381","typeString":"contract ERC20"}},"id":309,"nodeType":"InheritanceSpecifier","src":"309:5:2"}],"contractDependencies":[381,413],"contractKind":"contract","documentation":"@title DetailedERC20 token\n@dev The decimals are only for visualization purposes.\nAll the operations are done using the smallest and indivisible token unit,\njust as on Ethereum all the operations are done in wei.","fullyImplemented":false,"id":338,"linearizedBaseContracts":[338,381,413],"name":"DetailedERC20","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":311,"name":"name","nodeType":"VariableDeclaration","scope":338,"src":"319:18:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":310,"name":"string","nodeType":"ElementaryTypeName","src":"319:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":313,"name":"symbol","nodeType":"VariableDeclaration","scope":338,"src":"341:20:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":312,"name":"string","nodeType":"ElementaryTypeName","src":"341:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":315,"name":"decimals","nodeType":"VariableDeclaration","scope":338,"src":"365:21:2","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":314,"name":"uint8","nodeType":"ElementaryTypeName","src":"365:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"body":{"id":336,"nodeType":"Block","src":"457:71:2","statements":[{"expression":{"argumentTypes":null,"id":326,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":324,"name":"name","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":311,"src":"463:4:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":325,"name":"_name","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":317,"src":"470:5:2","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"src":"463:12:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":327,"nodeType":"ExpressionStatement","src":"463:12:2"},{"expression":{"argumentTypes":null,"id":330,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":328,"name":"symbol","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":313,"src":"481:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":329,"name":"_symbol","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":319,"src":"490:7:2","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"src":"481:16:2","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":331,"nodeType":"ExpressionStatement","src":"481:16:2"},{"expression":{"argumentTypes":null,"id":334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":332,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":315,"src":"503:8:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":333,"name":"_decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":321,"src":"514:9:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"503:20:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":335,"nodeType":"ExpressionStatement","src":"503:20:2"}]},"documentation":null,"id":337,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":322,"nodeType":"ParameterList","parameters":[{"constant":false,"id":317,"name":"_name","nodeType":"VariableDeclaration","scope":337,"src":"403:12:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":316,"name":"string","nodeType":"ElementaryTypeName","src":"403:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":319,"name":"_symbol","nodeType":"VariableDeclaration","scope":337,"src":"417:14:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":318,"name":"string","nodeType":"ElementaryTypeName","src":"417:6:2","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":321,"name":"_decimals","nodeType":"VariableDeclaration","scope":337,"src":"433:15:2","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":320,"name":"uint8","nodeType":"ElementaryTypeName","src":"433:5:2","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"402:47:2"},"payable":false,"returnParameters":{"id":323,"nodeType":"ParameterList","parameters":[],"src":"457:0:2"},"scope":338,"src":"391:137:2","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":339,"src":"283:247:2"}],"src":"0:531:2"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-29T15:25:24.148Z"}; /***/ }), @@ -286,10 +472,10 @@ module.exports = {"contract_name":"HumanFriendlyToken","abi":[{"constant":true," /*!***********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/LMSRMarketMaker.json ***! \***********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"LMSRMarketMaker","abi":[{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"calcProfit","outputs":[{"name":"profit","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"calcCost","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"}],"name":"calcMarginalPrice","outputs":[{"name":"price","type":"uint256"}],"payable":false,"type":"function"}],"networks":{"1":{"address":"0x7ee6e9dc512b0fe5cb5e28697cfc34375a9adc4b","updated_at":1513984936000},"3":{"address":"0xe81424ffc847919efc5f0156e3799edc60ebf715","updated_at":1503605014192},"4":{"address":"0x11b5257396f156027b9232da7220bd7447282db6","updated_at":1503603856238},"42":{"address":"0xcc9a28a40a25be4d9b8c3134aa6fd8b38f817123","updated_at":1503602339890},"437894314312":{"address":"0x9561c133dd8580860b6b7e504bc5aa500f0f06a7","updated_at":1507361155410}},"schema_version":"0.0.5","updated_at":1543915159049}; +module.exports = {"contractName":"LMSRMarketMaker","abi":[{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenAmounts","type":"int256[]"}],"name":"calcNetCost","outputs":[{"name":"netCost","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"calcCost","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"calcProfit","outputs":[{"name":"profit","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"}],"name":"calcMarginalPrice","outputs":[{"name":"price","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50611804806100206000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806338bf0452146100675780634091c6a914610101578063bd8ff8171461016f578063d812d346146101dd575b600080fd5b34801561007357600080fd5b506100eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610241565b6040518082815260200191505060405180910390f35b34801561010d57600080fd5b50610159600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff16906020019092919080359060200190929190505050610646565b6040518082815260200191505060405180910390f35b34801561017b57600080fd5b506101c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190803590602001909291905050506109c1565b6040518082815260200191505060405180910390f35b3480156101e957600080fd5b5061022b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610d88565b6040518082815260200191505060405180910390f35b60006060600080600080600060018973ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156102b357600080fd5b505af11580156102c7573d6000803e3d6000fd5b505050506040513d60208110156102dd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561035157600080fd5b505af1158015610365573d6000803e3d6000fd5b505050506040513d602081101561037b57600080fd5b810190808051906020019092919050505060ff1611151561039b57600080fd5b6103a489611097565b955073__Fixed192x64Math_______________________63137bf7986801000000000000000088510260016040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600281111561041057fe5b60ff1681526020019250505060206040518083038186803b15801561043457600080fd5b505af4158015610448573d6000803e3d6000fd5b505050506040513d602081101561045e57600080fd5b810190808051906020019092919050505094508873ffffffffffffffffffffffffffffffffffffffff1663cb4c86b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156104d557600080fd5b505af11580156104e9573d6000803e3d6000fd5b505050506040513d60208110156104ff57600080fd5b8101908080519060200190929190505050935061051f85878660006112fc565b92508751865114151561053157600080fd5b600091505b85518260ff1610156105b557610589888360ff1681518110151561055657fe5b90602001906020020151878460ff1681518110151561057157fe5b9060200190602002015161142c90919063ffffffff16565b868360ff1681518110151561059a57fe5b90602001906020020181815250508180600101925050610536565b6105c285878660016112fc565b90506105d7838261146890919063ffffffff16565b96506000871315806105fe5750866801000000000000000080898115156105fa57fe5b0502145b1561061f57680100000000000000008781151561061757fe5b05965061063a565b6001680100000000000000008881151561063557fe5b050196505b50505050505092915050565b6000606060008060008060018973ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156106b657600080fd5b505af11580156106ca573d6000803e3d6000fd5b505050506040513d60208110156106e057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561075457600080fd5b505af1158015610768573d6000803e3d6000fd5b505050506040513d602081101561077e57600080fd5b810190808051906020019092919050505060ff1611151561079e57600080fd5b6107a789611097565b945073__Fixed192x64Math_______________________63137bf7986801000000000000000087510260016040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600281111561081357fe5b60ff1681526020019250505060206040518083038186803b15801561083757600080fd5b505af415801561084b573d6000803e3d6000fd5b505050506040513d602081101561086157600080fd5b810190808051906020019092919050505093508873ffffffffffffffffffffffffffffffffffffffff1663cb4c86b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156108d857600080fd5b505af11580156108ec573d6000803e3d6000fd5b505050506040513d602081101561090257600080fd5b8101908080519060200190929190505050925061092284868560006112fc565b91506000871215151561093457600080fd5b61096187868a60ff1681518110151561094957fe5b9060200190602002015161146890919063ffffffff16565b858960ff1681518110151561097257fe5b906020019060200201818152505061098d84868560016112fc565b9050808213151561099c578091505b680100000000000000008183038115156109b257fe5b04955050505050509392505050565b6000606060008060008060018973ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a3157600080fd5b505af1158015610a45573d6000803e3d6000fd5b505050506040513d6020811015610a5b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610acf57600080fd5b505af1158015610ae3573d6000803e3d6000fd5b505050506040513d6020811015610af957600080fd5b810190808051906020019092919050505060ff16111515610b1957600080fd5b610b2289611097565b945073__Fixed192x64Math_______________________63137bf7986801000000000000000087510260016040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826002811115610b8e57fe5b60ff1681526020019250505060206040518083038186803b158015610bb257600080fd5b505af4158015610bc6573d6000803e3d6000fd5b505050506040513d6020811015610bdc57600080fd5b810190808051906020019092919050505093508873ffffffffffffffffffffffffffffffffffffffff1663cb4c86b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b505050506040513d6020811015610c7d57600080fd5b81019080805190602001909291905050509250610c9d84868560006112fc565b915060008712151515610caf57600080fd5b610cdc87868a60ff16815181101515610cc457fe5b9060200190602002015161142c90919063ffffffff16565b858960ff16815181101515610ced57fe5b9060200190602002018181525050610d0884868560016112fc565b905081811215610d16578190505b818103955085680100000000000000008088811515610d3157fe5b04021415610d55576801000000000000000086811515610d4d57fe5b049550610d70565b60016801000000000000000087811515610d6b57fe5b040195505b86861115610d7c578695505b50505050509392505050565b6000606060008060008060018873ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610df857600080fd5b505af1158015610e0c573d6000803e3d6000fd5b505050506040513d6020811015610e2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610e9657600080fd5b505af1158015610eaa573d6000803e3d6000fd5b505050506040513d6020811015610ec057600080fd5b810190808051906020019092919050505060ff16111515610ee057600080fd5b610ee988611097565b945073__Fixed192x64Math_______________________63137bf7986801000000000000000087510260026040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826002811115610f5557fe5b60ff1681526020019250505060206040518083038186803b158015610f7957600080fd5b505af4158015610f8d573d6000803e3d6000fd5b505050506040513d6020811015610fa357600080fd5b810190808051906020019092919050505093508773ffffffffffffffffffffffffffffffffffffffff1663cb4c86b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561101a57600080fd5b505af115801561102e573d6000803e3d6000fd5b505050506040513d602081101561104457600080fd5b810190808051906020019092919050505092506110658486858a60026114a4565b9250509150680100000000000000008281151561107e57fe5b048181151561108957fe5b049550505050505092915050565b606060008273ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b505050506040513d602081101561112957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561119d57600080fd5b505af11580156111b1573d6000803e3d6000fd5b505050506040513d60208110156111c757600080fd5b810190808051906020019092919050505060ff166040519080825280602002602001820160405280156112095781602001602082028038833980820191505090505b509150600090505b81518160ff1610156112f6578273ffffffffffffffffffffffffffffffffffffffff1663a157979c826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561128f57600080fd5b505af11580156112a3573d6000803e3d6000fd5b505050506040513d60208110156112b957600080fd5b8101908080519060200190929190505050828260ff168151811015156112db57fe5b90602001906020020181815250508080600101915050611211565b50919050565b600080600061130f8787876000886114a4565b509150915073__Fixed192x64Math_______________________63137bf79883866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600281111561137157fe5b60ff1681526020019250505060206040518083038186803b15801561139557600080fd5b505af41580156113a9573d6000803e3d6000fd5b505050506040513d60208110156113bf57600080fd5b810190808051906020019092919050505092506113e5818461142c90919063ffffffff16565b92506114208588611408680100000000000000008761174890919063ffffffff16565b81151561141157fe5b0561174890919063ffffffff16565b92505050949350505050565b60008183019050600082121580156114445750828112155b8061145a575060008212801561145957508281125b5b151561146257fe5b92915050565b60008183039050600082121580156114805750828113155b80611496575060008212801561149557508281135b5b151561149e57fe5b92915050565b6000806000806000808a121580156114bd575060008812155b15156114c857600080fd5b73__Fixed192x64Math_______________________63ccc138148a6040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015611551578082015181840152602081019050611536565b505050509050019250505060206040518083038186803b15801561157457600080fd5b505af4158015611588573d6000803e3d6000fd5b505050506040513d602081101561159e57600080fd5b81019080805190602001909291905050509350876115c58b8661174890919063ffffffff16565b8115156115ce57fe5b0593506115ed68b800000000000000008561146890919063ffffffff16565b9350600090505b88518160ff16101561173b5773__Fixed192x64Math_______________________631d580123611664868b61164c8f8f8860ff1681518110151561163457fe5b9060200190602002015161174890919063ffffffff16565b81151561165557fe5b0561146890919063ffffffff16565b886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260028111156116a657fe5b60ff1681526020019250505060206040518083038186803b1580156116ca57600080fd5b505af41580156116de573d6000803e3d6000fd5b505050506040513d60208110156116f457600080fd5b810190808051906020019092919050505091508660ff168160ff161415611719578192505b61172c82866117bc90919063ffffffff16565b945080806001019150506115f4565b5050955095509592505050565b60008083141561175b57600090506117b6565b81830290507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141580611797575060ff60019060020a028214155b80156117ad57508183828115156117aa57fe5b05145b15156117b557fe5b5b92915050565b600081830190508281101515156117cf57fe5b809050929150505600a165627a7a723058205521dc6adb51ca623f401a25028efadbbda5cb3f9760a4a6ec21d75ed9b5b53b0029","deployedBytecode":"0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806338bf0452146100675780634091c6a914610101578063bd8ff8171461016f578063d812d346146101dd575b600080fd5b34801561007357600080fd5b506100eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610241565b6040518082815260200191505060405180910390f35b34801561010d57600080fd5b50610159600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff16906020019092919080359060200190929190505050610646565b6040518082815260200191505060405180910390f35b34801561017b57600080fd5b506101c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190803590602001909291905050506109c1565b6040518082815260200191505060405180910390f35b3480156101e957600080fd5b5061022b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610d88565b6040518082815260200191505060405180910390f35b60006060600080600080600060018973ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156102b357600080fd5b505af11580156102c7573d6000803e3d6000fd5b505050506040513d60208110156102dd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561035157600080fd5b505af1158015610365573d6000803e3d6000fd5b505050506040513d602081101561037b57600080fd5b810190808051906020019092919050505060ff1611151561039b57600080fd5b6103a489611097565b955073__Fixed192x64Math_______________________63137bf7986801000000000000000088510260016040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600281111561041057fe5b60ff1681526020019250505060206040518083038186803b15801561043457600080fd5b505af4158015610448573d6000803e3d6000fd5b505050506040513d602081101561045e57600080fd5b810190808051906020019092919050505094508873ffffffffffffffffffffffffffffffffffffffff1663cb4c86b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156104d557600080fd5b505af11580156104e9573d6000803e3d6000fd5b505050506040513d60208110156104ff57600080fd5b8101908080519060200190929190505050935061051f85878660006112fc565b92508751865114151561053157600080fd5b600091505b85518260ff1610156105b557610589888360ff1681518110151561055657fe5b90602001906020020151878460ff1681518110151561057157fe5b9060200190602002015161142c90919063ffffffff16565b868360ff1681518110151561059a57fe5b90602001906020020181815250508180600101925050610536565b6105c285878660016112fc565b90506105d7838261146890919063ffffffff16565b96506000871315806105fe5750866801000000000000000080898115156105fa57fe5b0502145b1561061f57680100000000000000008781151561061757fe5b05965061063a565b6001680100000000000000008881151561063557fe5b050196505b50505050505092915050565b6000606060008060008060018973ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156106b657600080fd5b505af11580156106ca573d6000803e3d6000fd5b505050506040513d60208110156106e057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561075457600080fd5b505af1158015610768573d6000803e3d6000fd5b505050506040513d602081101561077e57600080fd5b810190808051906020019092919050505060ff1611151561079e57600080fd5b6107a789611097565b945073__Fixed192x64Math_______________________63137bf7986801000000000000000087510260016040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600281111561081357fe5b60ff1681526020019250505060206040518083038186803b15801561083757600080fd5b505af415801561084b573d6000803e3d6000fd5b505050506040513d602081101561086157600080fd5b810190808051906020019092919050505093508873ffffffffffffffffffffffffffffffffffffffff1663cb4c86b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156108d857600080fd5b505af11580156108ec573d6000803e3d6000fd5b505050506040513d602081101561090257600080fd5b8101908080519060200190929190505050925061092284868560006112fc565b91506000871215151561093457600080fd5b61096187868a60ff1681518110151561094957fe5b9060200190602002015161146890919063ffffffff16565b858960ff1681518110151561097257fe5b906020019060200201818152505061098d84868560016112fc565b9050808213151561099c578091505b680100000000000000008183038115156109b257fe5b04955050505050509392505050565b6000606060008060008060018973ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a3157600080fd5b505af1158015610a45573d6000803e3d6000fd5b505050506040513d6020811015610a5b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610acf57600080fd5b505af1158015610ae3573d6000803e3d6000fd5b505050506040513d6020811015610af957600080fd5b810190808051906020019092919050505060ff16111515610b1957600080fd5b610b2289611097565b945073__Fixed192x64Math_______________________63137bf7986801000000000000000087510260016040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826002811115610b8e57fe5b60ff1681526020019250505060206040518083038186803b158015610bb257600080fd5b505af4158015610bc6573d6000803e3d6000fd5b505050506040513d6020811015610bdc57600080fd5b810190808051906020019092919050505093508873ffffffffffffffffffffffffffffffffffffffff1663cb4c86b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610c5357600080fd5b505af1158015610c67573d6000803e3d6000fd5b505050506040513d6020811015610c7d57600080fd5b81019080805190602001909291905050509250610c9d84868560006112fc565b915060008712151515610caf57600080fd5b610cdc87868a60ff16815181101515610cc457fe5b9060200190602002015161142c90919063ffffffff16565b858960ff16815181101515610ced57fe5b9060200190602002018181525050610d0884868560016112fc565b905081811215610d16578190505b818103955085680100000000000000008088811515610d3157fe5b04021415610d55576801000000000000000086811515610d4d57fe5b049550610d70565b60016801000000000000000087811515610d6b57fe5b040195505b86861115610d7c578695505b50505050509392505050565b6000606060008060008060018873ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610df857600080fd5b505af1158015610e0c573d6000803e3d6000fd5b505050506040513d6020811015610e2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610e9657600080fd5b505af1158015610eaa573d6000803e3d6000fd5b505050506040513d6020811015610ec057600080fd5b810190808051906020019092919050505060ff16111515610ee057600080fd5b610ee988611097565b945073__Fixed192x64Math_______________________63137bf7986801000000000000000087510260026040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826002811115610f5557fe5b60ff1681526020019250505060206040518083038186803b158015610f7957600080fd5b505af4158015610f8d573d6000803e3d6000fd5b505050506040513d6020811015610fa357600080fd5b810190808051906020019092919050505093508773ffffffffffffffffffffffffffffffffffffffff1663cb4c86b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561101a57600080fd5b505af115801561102e573d6000803e3d6000fd5b505050506040513d602081101561104457600080fd5b810190808051906020019092919050505092506110658486858a60026114a4565b9250509150680100000000000000008281151561107e57fe5b048181151561108957fe5b049550505050505092915050565b606060008273ffffffffffffffffffffffffffffffffffffffff1663e274fd246040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b505050506040513d602081101561112957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561119d57600080fd5b505af11580156111b1573d6000803e3d6000fd5b505050506040513d60208110156111c757600080fd5b810190808051906020019092919050505060ff166040519080825280602002602001820160405280156112095781602001602082028038833980820191505090505b509150600090505b81518160ff1610156112f6578273ffffffffffffffffffffffffffffffffffffffff1663a157979c826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561128f57600080fd5b505af11580156112a3573d6000803e3d6000fd5b505050506040513d60208110156112b957600080fd5b8101908080519060200190929190505050828260ff168151811015156112db57fe5b90602001906020020181815250508080600101915050611211565b50919050565b600080600061130f8787876000886114a4565b509150915073__Fixed192x64Math_______________________63137bf79883866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600281111561137157fe5b60ff1681526020019250505060206040518083038186803b15801561139557600080fd5b505af41580156113a9573d6000803e3d6000fd5b505050506040513d60208110156113bf57600080fd5b810190808051906020019092919050505092506113e5818461142c90919063ffffffff16565b92506114208588611408680100000000000000008761174890919063ffffffff16565b81151561141157fe5b0561174890919063ffffffff16565b92505050949350505050565b60008183019050600082121580156114445750828112155b8061145a575060008212801561145957508281125b5b151561146257fe5b92915050565b60008183039050600082121580156114805750828113155b80611496575060008212801561149557508281135b5b151561149e57fe5b92915050565b6000806000806000808a121580156114bd575060008812155b15156114c857600080fd5b73__Fixed192x64Math_______________________63ccc138148a6040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015611551578082015181840152602081019050611536565b505050509050019250505060206040518083038186803b15801561157457600080fd5b505af4158015611588573d6000803e3d6000fd5b505050506040513d602081101561159e57600080fd5b81019080805190602001909291905050509350876115c58b8661174890919063ffffffff16565b8115156115ce57fe5b0593506115ed68b800000000000000008561146890919063ffffffff16565b9350600090505b88518160ff16101561173b5773__Fixed192x64Math_______________________631d580123611664868b61164c8f8f8860ff1681518110151561163457fe5b9060200190602002015161174890919063ffffffff16565b81151561165557fe5b0561146890919063ffffffff16565b886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260028111156116a657fe5b60ff1681526020019250505060206040518083038186803b1580156116ca57600080fd5b505af41580156116de573d6000803e3d6000fd5b505050506040513d60208110156116f457600080fd5b810190808051906020019092919050505091508660ff168160ff161415611719578192505b61172c82866117bc90919063ffffffff16565b945080806001019150506115f4565b5050955095509592505050565b60008083141561175b57600090506117b6565b81830290507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141580611797575060ff60019060020a028214155b80156117ad57508183828115156117aa57fe5b05145b15156117b557fe5b5b92915050565b600081830190508281101515156117cf57fe5b809050929150505600a165627a7a723058205521dc6adb51ca623f401a25028efadbbda5cb3f9760a4a6ec21d75ed9b5b53b0029","sourceMap":"349:10881:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;349:10881:4;;;;;;;","deployedSourceMap":"349:10881:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1082:1567;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1082:1567:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4786:1310;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4786:1310:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2900:1624;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2900:1624:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6340:859;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6340:859:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1082:1567;1190:11;1280:33;1426:9;1551:12;1592:19;1865:7;2086:18;1268:1;1225:6;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1225:22:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1225:22:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1225:22:4;;;;;;;;;;;;;;;;:38;;;:40;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1225:40:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1225:40:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1225:40:4;;;;;;;;;;;;;;;;:44;;;1217:53;;;;;;;;1316:31;1340:6;1316:23;:31::i;:::-;1280:67;;1438:15;:25;475:19;1464:20;:27;:33;1499:41;1438:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1438:103:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1438:103:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1438:103:4;;;;;;;;;;;;;;;;1426:115;;1566:6;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1566:16:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1566:16:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1566:16:4;;;;;;;;;;;;;;;;1551:31;;1614:94;1628:5;1635:20;1657:7;1666:41;1614:13;:94::i;:::-;1592:116;;1823:19;:26;1792:20;:27;:57;1784:66;;;;;;;;1875:1;1865:11;;1860:158;1882:20;:27;1878:1;:31;;;1860:158;;;1956:51;1984:19;2004:1;1984:22;;;;;;;;;;;;;;;;;;;;1956:20;1977:1;1956:23;;;;;;;;;;;;;;;;;;;;:27;;:51;;;;:::i;:::-;1930:20;1951:1;1930:23;;;;;;;;;;;;;;;;;;;:77;;;;;1911:3;;;;;;;1860:158;;;2107:94;2121:5;2128:20;2150:7;2159:41;2107:13;:94::i;:::-;2086:115;;2294:35;2313:15;2294:14;:18;;:35;;;;:::i;:::-;2284:45;;2489:1;2478:7;:12;;:56;;;;2527:7;475:19;;2494:7;:18;;;;;;;;:29;:40;2478:56;2475:168;;;475:19;2550;;;;;;;;;;;2475:168;;;2631:1;475:19;2610:7;:18;;;;;;;;:22;2600:32;;2475:168;1082:1567;;;;;;;;;;:::o;4786:1310::-;4915:11;5005:33;5150:9;5275:12;5316:19;5740:18;4993:1;4950:6;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4950:22:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4950:22:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4950:22:4;;;;;;;;;;;;;;;;:38;;;:40;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4950:40:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4950:40:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4950:40:4;;;;;;;;;;;;;;;;:44;;;4942:53;;;;;;;;5041:31;5065:6;5041:23;:31::i;:::-;5005:67;;5162:15;:25;475:19;5188:20;:27;:33;5223:41;5162:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5162:103:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5162:103:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5162:103:4;;;;;;;;;;;;;;;;5150:115;;5290:6;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5290:16:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5290:16:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5290:16:4;;;;;;;;;;;;;;;;5275:31;;5338:94;5352:5;5359:20;5381:7;5390:41;5338:13;:94::i;:::-;5316:116;;5551:1;5529:17;5525:27;;5517:36;;;;;;;;5605:67;5653:17;5605:20;5626:17;5605:39;;;;;;;;;;;;;;;;;;;;:43;;:67;;;;:::i;:::-;5563:20;5584:17;5563:39;;;;;;;;;;;;;;;;;;;:109;;;;;5761:94;5775:5;5782:20;5804:7;5813:41;5761:13;:94::i;:::-;5740:115;;5940:14;5921:15;:33;;5918:82;;;5986:14;5968:32;;5918:82;475:19;6068:14;6050:15;:32;6045:44;;;;;;;;6036:53;;4786:1310;;;;;;;;;;:::o;2900:1624::-;3027:9;3115:33;3260:9;3385:12;3426:19;3839:18;3103:1;3060:6;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3060:22:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3060:22:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3060:22:4;;;;;;;;;;;;;;;;:38;;;:40;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3060:40:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3060:40:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3060:40:4;;;;;;;;;;;;;;;;:44;;;3052:53;;;;;;;;3151:31;3175:6;3151:23;:31::i;:::-;3115:67;;3272:15;:25;475:19;3298:20;:27;:33;3333:41;3272:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3272:103:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3272:103:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3272:103:4;;;;;;;;;;;;;;;;3260:115;;3400:6;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3400:16:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3400:16:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3400:16:4;;;;;;;;;;;;;;;;3385:31;;3448:94;3462:5;3469:20;3491:7;3500:41;3448:13;:94::i;:::-;3426:116;;3650:1;3628:17;3624:27;;3616:36;;;;;;;;3704:67;3752:17;3704:20;3725:17;3704:39;;;;;;;;;;;;;;;;;;;;:43;;:67;;;;:::i;:::-;3662:20;3683:17;3662:39;;;;;;;;;;;;;;;;;;;:109;;;;;3860:94;3874:5;3881:20;3903:7;3912:41;3860:13;:94::i;:::-;3839:115;;4035:15;4018:14;:32;4015:81;;;4081:15;4064:32;;4015:81;4135:15;4118:14;:32;4106:45;;4237:4;475:19;;4217:4;:10;;;;;;;;:16;:24;4213:171;;;475:19;4255:11;;;;;;;;;;;4213:171;;;4383:1;475:19;4370:4;:10;;;;;;;;:14;4363:21;;4213:171;4462:17;4455:4;:24;4451:66;;;4500:17;4493:24;;4451:66;2900:1624;;;;;;;;;;:::o;6340:859::-;6452:10;6541:33;6618:8;6740:12;7003:8;7015:19;6529:1;6486:6;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6486:22:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6486:22:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6486:22:4;;;;;;;;;;;;;;;;:38;;;:40;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6486:40:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6486:40:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6486:40:4;;;;;;;;;;;;;;;;:44;;;6478:53;;;;;;;;6577:31;6601:6;6577:23;:31::i;:::-;6541:67;;6629:15;:25;475:19;6655:20;:27;:33;6690:39;6629:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6629:101:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6629:101:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6629:101:4;;;;;;;;;;;;;;;;6618:112;;6755:6;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6755:16:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6755:16:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6755:16:4;;;;;;;;;;;;;;;;6740:31;;7038:109;7051:4;7057:20;7079:7;7088:17;7107:39;7038:12;:109::i;:::-;7002:145;;;;;475:19;7182:3;:9;;;;;;;;7164:14;:28;;;;;;;;7157:35;;6340:859;;;;;;;;;:::o;10917:311::-;11011:16;11122:7;11066:6;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11066:22:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11066:22:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;11066:22:4;;;;;;;;;;;;;;;;:38;;;:40;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11066:40:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11066:40:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;11066:40:4;;;;;;;;;;;;;;;;11056:51;;;;;;;;;;;;;;;;;;;;;;;;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;11056:51:4;;;;11043:64;;11132:1;11122:11;;11117:104;11139:10;:17;11135:1;:21;;;11117:104;;;11191:6;:27;;;11219:1;11191:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11191:30:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11191:30:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;11191:30:4;;;;;;;;;;;;;;;;11175:10;11186:1;11175:13;;;;;;;;;;;;;;;;;;;:46;;;;;11158:3;;;;;;;11117:104;;;10917:311;;;;:::o;7576:710::-;7743:13;8002:8;8012:10;8028:68;8041:4;8047:20;8069:7;8078:1;8081:14;8028:12;:68::i;:::-;8001:95;;;;;8118:15;:25;8144:3;8149:14;8118:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8118:46:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8118:46:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8118:46:4;;;;;;;;;;;;;;;;8106:58;;8186:21;8200:6;8186:9;:13;;:21;;;;:::i;:::-;8174:33;;8229:50;8270:7;8256:4;8230:23;475:19;8230:9;:13;;:23;;;;:::i;:::-;:30;;;;;;;;8229:36;;:50;;;;:::i;:::-;8217:62;;7576:710;;;;;;;;:::o;2556:138:31:-;2612:8;2636:1;2632;:5;2628:9;;2656:1;2651;:6;;:16;;;;;2666:1;2661;:6;;2651:16;2650:38;;;;2677:1;2673;:5;:14;;;;;2686:1;2682;:5;2673:14;2650:38;2643:46;;;;;;2556:138;;;;:::o;2153:::-;2209:8;2233:1;2229;:5;2225:9;;2253:1;2248;:6;;:16;;;;;2263:1;2258;:6;;2248:16;2247:38;;;;2274:1;2270;:5;:14;;;;;2283:1;2279;:5;2270:14;2247:38;2240:46;;;;;;2153:138;;;;:::o;8832:1605:4:-;9019:8;9029:10;9041:19;10117:9;10141:7;9934:1;9926:4;:9;;:30;;;;;9955:1;9943:7;9939:17;;9926:30;9918:39;;;;;;;;9976:15;:19;9996:20;9976:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;9976:41:4;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9976:41:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9976:41:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9976:41:4;;;;;;;;;;;;;;;;9967:50;;10059:7;10036:16;10047:4;10036:6;:10;;:16;;;;:::i;:::-;:31;;;;;;;;10027:40;;10086:21;525:22;10086:6;:10;;:21;;;;:::i;:::-;10077:30;;10151:1;10141:11;;10136:295;10158:20;:27;10154:1;:31;;;10136:295;;;10213:15;:20;10234:62;10289:6;10275:7;10235:33;10263:4;10235:20;10256:1;10235:23;;;;;;;;;;;;;;;;;;;;:27;;:33;;;;:::i;:::-;:48;;;;;;;;10234:54;;:62;;;;:::i;:::-;10298:14;10213:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10213:100:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10213:100:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10213:100:4;;;;;;;;;;;;;;;;10206:107;;10336:12;10331:17;;:1;:17;;;10327:60;;;10383:4;10366:21;;10327:60;10407:13;10415:4;10407:3;:7;;:13;;;;:::i;:::-;10401:19;;10187:3;;;;;;;10136:295;;;8832:1605;;;;;;;;;;;:::o;722:387:31:-;778:8;1008:1;1003;:6;999:35;;;1026:1;1019:8;;;;999:35;1047:1;1043;:5;1039:9;;1067:2;1062:1;:7;;:26;;;;189:3;183:1;175:17;;;;1073:1;:15;;1062:26;1061:42;;;;;1102:1;1097;1093;:5;;;;;;;;:10;1061:42;1054:50;;;;;;722:387;;;;;:::o;2363:123::-;2421:9;2446:1;2442;:5;2438:9;;2465:1;2460;:6;;2453:14;;;;;;2480:1;2473:8;;2363:123;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol\";\nimport \"../MarketMakers/MarketMaker.sol\";\n\n\n/// @title LMSR market maker contract - Calculates share prices based on share distribution and initial funding\n/// @author Alan Lu - \ncontract LMSRMarketMaker is MarketMaker {\n using SafeMath for *;\n\n /*\n * Constants\n */\n uint constant ONE = 0x10000000000000000;\n int constant EXP_LIMIT = 3394200909562557497344;\n\n /*\n * Public functions\n */\n /// @dev Calculates the net cost for executing a given trade.\n /// @param market Market contract\n /// @param outcomeTokenAmounts Amounts of outcome tokens to buy from the market. If an amount is negative, represents an amount to sell to the market.\n /// @return Net cost of trade. If positive, represents amount of collateral which would be paid to the market for the trade. If negative, represents amount of collateral which would be received from the market for the trade.\n function calcNetCost(Market market, int[] outcomeTokenAmounts)\n public\n view\n returns (int netCost)\n {\n require(market.eventContract().getOutcomeCount() > 1);\n int[] memory netOutcomeTokensSold = getNetOutcomeTokensSold(market);\n\n // Calculate cost level based on net outcome token balances\n int log2N = Fixed192x64Math.binaryLog(netOutcomeTokensSold.length * ONE, Fixed192x64Math.EstimationMode.UpperBound);\n uint funding = market.funding();\n int costLevelBefore = calcCostLevel(log2N, netOutcomeTokensSold, funding, Fixed192x64Math.EstimationMode.LowerBound);\n\n // Change amounts based on outcomeTokenAmounts passed in\n require(netOutcomeTokensSold.length == outcomeTokenAmounts.length);\n for (uint8 i = 0; i < netOutcomeTokensSold.length; i++) {\n netOutcomeTokensSold[i] = netOutcomeTokensSold[i].add(outcomeTokenAmounts[i]);\n }\n\n // Calculate cost level after balance was updated\n int costLevelAfter = calcCostLevel(log2N, netOutcomeTokensSold, funding, Fixed192x64Math.EstimationMode.UpperBound);\n\n // Calculate net cost as cost level difference and use the ceil\n netCost = costLevelAfter.sub(costLevelBefore);\n // Integer division for negative numbers already uses ceiling,\n // so only check boundary condition for positive numbers\n if(netCost <= 0 || netCost / int(ONE) * int(ONE) == netCost) {\n netCost /= int(ONE);\n } else {\n netCost = netCost / int(ONE) + 1;\n }\n }\n\n /// @dev Returns cost to buy given number of outcome tokens\n /// @param market Market contract\n /// @param outcomeTokenIndex Index of outcome to buy\n /// @param outcomeTokenCount Number of outcome tokens to buy\n /// @return Cost\n function calcCost(Market market, uint8 outcomeTokenIndex, uint outcomeTokenCount)\n public\n view\n returns (uint cost)\n {\n require(market.eventContract().getOutcomeCount() > 1);\n int[] memory netOutcomeTokensSold = getNetOutcomeTokensSold(market);\n // Calculate cost level based on net outcome token balances\n int log2N = Fixed192x64Math.binaryLog(netOutcomeTokensSold.length * ONE, Fixed192x64Math.EstimationMode.UpperBound);\n uint funding = market.funding();\n int costLevelBefore = calcCostLevel(log2N, netOutcomeTokensSold, funding, Fixed192x64Math.EstimationMode.LowerBound);\n // Add outcome token count to net outcome token balance\n require(int(outcomeTokenCount) >= 0);\n netOutcomeTokensSold[outcomeTokenIndex] = netOutcomeTokensSold[outcomeTokenIndex].add(int(outcomeTokenCount));\n // Calculate cost level after balance was updated\n int costLevelAfter = calcCostLevel(log2N, netOutcomeTokensSold, funding, Fixed192x64Math.EstimationMode.UpperBound);\n // Calculate cost as cost level difference\n if(costLevelAfter < costLevelBefore)\n costLevelAfter = costLevelBefore;\n cost = uint(costLevelAfter - costLevelBefore);\n // Take the ceiling to account for rounding\n if (cost / ONE * ONE == cost)\n cost /= ONE;\n else\n // Integer division by ONE ensures there is room to (+ 1)\n cost = cost / ONE + 1;\n // Make sure cost is not bigger than 1 per share\n if (cost > outcomeTokenCount)\n cost = outcomeTokenCount;\n }\n\n /// @dev Returns profit for selling given number of outcome tokens\n /// @param market Market contract\n /// @param outcomeTokenIndex Index of outcome to sell\n /// @param outcomeTokenCount Number of outcome tokens to sell\n /// @return Profit\n function calcProfit(Market market, uint8 outcomeTokenIndex, uint outcomeTokenCount)\n public\n view\n returns (uint profit)\n {\n require(market.eventContract().getOutcomeCount() > 1);\n int[] memory netOutcomeTokensSold = getNetOutcomeTokensSold(market);\n // Calculate cost level based on net outcome token balances\n int log2N = Fixed192x64Math.binaryLog(netOutcomeTokensSold.length * ONE, Fixed192x64Math.EstimationMode.UpperBound);\n uint funding = market.funding();\n int costLevelBefore = calcCostLevel(log2N, netOutcomeTokensSold, funding, Fixed192x64Math.EstimationMode.LowerBound);\n // Subtract outcome token count from the net outcome token balance\n require(int(outcomeTokenCount) >= 0);\n netOutcomeTokensSold[outcomeTokenIndex] = netOutcomeTokensSold[outcomeTokenIndex].sub(int(outcomeTokenCount));\n // Calculate cost level after balance was updated\n int costLevelAfter = calcCostLevel(log2N, netOutcomeTokensSold, funding, Fixed192x64Math.EstimationMode.UpperBound);\n // Calculate profit as cost level difference\n if(costLevelBefore <= costLevelAfter)\n costLevelBefore = costLevelAfter;\n // Take the floor\n profit = uint(costLevelBefore - costLevelAfter) / ONE;\n }\n\n /// @dev Returns marginal price of an outcome\n /// @param market Market contract\n /// @param outcomeTokenIndex Index of outcome to determine marginal price of\n /// @return Marginal price of an outcome as a fixed point number\n function calcMarginalPrice(Market market, uint8 outcomeTokenIndex)\n public\n view\n returns (uint price)\n {\n require(market.eventContract().getOutcomeCount() > 1);\n int[] memory netOutcomeTokensSold = getNetOutcomeTokensSold(market);\n int logN = Fixed192x64Math.binaryLog(netOutcomeTokensSold.length * ONE, Fixed192x64Math.EstimationMode.Midpoint);\n uint funding = market.funding();\n // The price function is exp(quantities[i]/b) / sum(exp(q/b) for q in quantities)\n // To avoid overflow, calculate with\n // exp(quantities[i]/b - offset) / sum(exp(q/b - offset) for q in quantities)\n (uint sum, , uint outcomeExpTerm) = sumExpOffset(logN, netOutcomeTokensSold, funding, outcomeTokenIndex, Fixed192x64Math.EstimationMode.Midpoint);\n return outcomeExpTerm / (sum / ONE);\n }\n\n /*\n * Private functions\n */\n /// @dev Calculates the result of the LMSR cost function which is used to\n /// derive prices from the market state\n /// @param logN Logarithm of the number of outcomes\n /// @param netOutcomeTokensSold Net outcome tokens sold by market\n /// @param funding Initial funding for market\n /// @return Cost level\n function calcCostLevel(int logN, int[] netOutcomeTokensSold, uint funding, Fixed192x64Math.EstimationMode estimationMode)\n private\n pure\n returns(int costLevel)\n {\n // The cost function is C = b * log(sum(exp(q/b) for q in quantities)).\n // To avoid overflow, we need to calc with an exponent offset:\n // C = b * (offset + log(sum(exp(q/b - offset) for q in quantities)))\n (uint sum, int offset, ) = sumExpOffset(logN, netOutcomeTokensSold, funding, 0, estimationMode);\n costLevel = Fixed192x64Math.binaryLog(sum, estimationMode);\n costLevel = costLevel.add(offset);\n costLevel = (costLevel.mul(int(ONE)) / logN).mul(int(funding));\n }\n\n /// @dev Calculates sum(exp(q/b - offset) for q in quantities), where offset is set\n /// so that the sum fits in 248-256 bits\n /// @param logN Logarithm of the number of outcomes\n /// @param netOutcomeTokensSold Net outcome tokens sold by market\n /// @param funding Initial funding for market\n /// @param outcomeIndex Index of exponential term to extract (for use by marginal price function)\n /// @return A result structure composed of the sum, the offset used, and the summand associated with the supplied index\n function sumExpOffset(int logN, int[] netOutcomeTokensSold, uint funding, uint8 outcomeIndex, Fixed192x64Math.EstimationMode estimationMode)\n private\n pure\n returns (uint sum, int offset, uint outcomeExpTerm)\n {\n // Naive calculation of this causes an overflow\n // since anything above a bit over 133*ONE supplied to exp will explode\n // as exp(133) just about fits into 192 bits of whole number data.\n\n // The choice of this offset is subject to another limit:\n // computing the inner sum successfully.\n // Since the index is 8 bits, there has to be 8 bits of headroom for\n // each summand, meaning q/b - offset <= exponential_limit,\n // where that limit can be found with `mp.floor(mp.log((2**248 - 1) / ONE) * ONE)`\n // That is what EXP_LIMIT is set to: it is about 127.5\n\n // finally, if the distribution looks like [BIG, tiny, tiny...], using a\n // BIG offset will cause the tiny quantities to go really negative\n // causing the associated exponentials to vanish.\n\n require(logN >= 0 && int(funding) >= 0);\n offset = Fixed192x64Math.max(netOutcomeTokensSold);\n offset = offset.mul(logN) / int(funding);\n offset = offset.sub(EXP_LIMIT);\n uint term;\n for (uint8 i = 0; i < netOutcomeTokensSold.length; i++) {\n term = Fixed192x64Math.pow2((netOutcomeTokensSold[i].mul(logN) / int(funding)).sub(offset), estimationMode);\n if (i == outcomeIndex)\n outcomeExpTerm = term;\n sum = sum.add(term);\n }\n }\n\n /// @dev Gets net outcome tokens sold by market. Since all sets of outcome tokens are backed by\n /// corresponding collateral tokens, the net quantity of a token sold by the market is the\n /// number of collateral tokens (which is the same as the number of outcome tokens the\n /// market created) subtracted by the quantity of that token held by the market.\n /// @param market Market contract\n /// @return Net outcome tokens sold by market\n function getNetOutcomeTokensSold(Market market)\n private\n view\n returns (int[] quantities)\n {\n quantities = new int[](market.eventContract().getOutcomeCount());\n for (uint8 i = 0; i < quantities.length; i++)\n quantities[i] = market.netOutcomeTokensSold(i);\n }\n}","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/LMSRMarketMaker.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/LMSRMarketMaker.sol","exportedSymbols":{"LMSRMarketMaker":[1526]},"id":1527,"nodeType":"SourceUnit","nodes":[{"id":842,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:4"},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":843,"nodeType":"ImportDirective","scope":1527,"sourceUnit":7190,"src":"25:59:4","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","file":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","id":844,"nodeType":"ImportDirective","scope":1527,"sourceUnit":6669,"src":"85:65:4","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":845,"nodeType":"ImportDirective","scope":1527,"sourceUnit":1572,"src":"151:41:4","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":846,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"377:11:4","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":847,"nodeType":"InheritanceSpecifier","src":"377:11:4"}],"contractDependencies":[1571],"contractKind":"contract","documentation":"@title LMSR market maker contract - Calculates share prices based on share distribution and initial funding\n @author Alan Lu - ","fullyImplemented":true,"id":1526,"linearizedBaseContracts":[1526,1571],"name":"LMSRMarketMaker","nodeType":"ContractDefinition","nodes":[{"id":849,"libraryName":{"contractScope":null,"id":848,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"401:8:4","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"395:21:4","typeName":null},{"constant":true,"id":852,"name":"ONE","nodeType":"VariableDeclaration","scope":1526,"src":"455:39:4","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":850,"name":"uint","nodeType":"ElementaryTypeName","src":"455:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":851,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"475:19:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"internal"},{"constant":true,"id":855,"name":"EXP_LIMIT","nodeType":"VariableDeclaration","scope":1526,"src":"500:47:4","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":853,"name":"int","nodeType":"ElementaryTypeName","src":"500:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":{"argumentTypes":null,"hexValue":"33333934323030393039353632353537343937333434","id":854,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"525:22:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3394200909562557497344_by_1","typeString":"int_const 3394200909562557497344"},"value":"3394200909562557497344"},"visibility":"internal"},{"body":{"id":999,"nodeType":"Block","src":"1207:1442:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":866,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":857,"src":"1225:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":867,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"1225:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":868,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1225:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":869,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"1225:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":870,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1225:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"31","id":871,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1268:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1225:44:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":865,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1217:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":873,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1217:53:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":874,"nodeType":"ExpressionStatement","src":"1217:53:4"},{"assignments":[878],"declarations":[{"constant":false,"id":878,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1000,"src":"1280:33:4","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":876,"name":"int","nodeType":"ElementaryTypeName","src":"1280:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":877,"length":null,"nodeType":"ArrayTypeName","src":"1280:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":882,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":880,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":857,"src":"1340:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":879,"name":"getNetOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1525,"src":"1316:23:4","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_contract$_Market_$2238_$returns$_t_array$_t_int256_$dyn_memory_ptr_$","typeString":"function (contract Market) view returns (int256[] memory)"}},"id":881,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1316:31:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1280:67:4"},{"assignments":[884],"declarations":[{"constant":false,"id":884,"name":"log2N","nodeType":"VariableDeclaration","scope":1000,"src":"1426:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":883,"name":"int","nodeType":"ElementaryTypeName","src":"1426:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":895,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":890,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":887,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1464:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":888,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1464:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":889,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"1494:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1464:33:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":891,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"1499:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":892,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"1499:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":893,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1499:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":885,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"1438:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":886,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"1438:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":894,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1438:103:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1426:115:4"},{"assignments":[897],"declarations":[{"constant":false,"id":897,"name":"funding","nodeType":"VariableDeclaration","scope":1000,"src":"1551:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":896,"name":"uint","nodeType":"ElementaryTypeName","src":"1551:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":901,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":898,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":857,"src":"1566:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":899,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"funding","nodeType":"MemberAccess","referencedDeclaration":2162,"src":"1566:14:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":900,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1566:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"1551:31:4"},{"assignments":[903],"declarations":[{"constant":false,"id":903,"name":"costLevelBefore","nodeType":"VariableDeclaration","scope":1000,"src":"1592:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":902,"name":"int","nodeType":"ElementaryTypeName","src":"1592:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":912,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":905,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":884,"src":"1628:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":906,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1635:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":907,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":897,"src":"1657:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":908,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"1666:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"1666:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":910,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1666:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":904,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"1614:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":911,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1614:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1592:116:4"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":918,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":914,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1792:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1792:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":916,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":860,"src":"1823:19:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1823:26:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1792:57:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":913,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1784:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":919,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1784:66:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":920,"nodeType":"ExpressionStatement","src":"1784:66:4"},{"body":{"id":945,"nodeType":"Block","src":"1916:102:4","statements":[{"expression":{"argumentTypes":null,"id":943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":932,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1930:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":934,"indexExpression":{"argumentTypes":null,"id":933,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"1951:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1930:23:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":939,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":860,"src":"1984:19:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":941,"indexExpression":{"argumentTypes":null,"id":940,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"2004:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1984:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":935,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1956:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":937,"indexExpression":{"argumentTypes":null,"id":936,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"1977:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1956:23:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"1956:27:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":942,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1956:51:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1930:77:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":944,"nodeType":"ExpressionStatement","src":"1930:77:4"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":928,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":925,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"1878:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":926,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1882:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1882:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1878:31:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":946,"initializationExpression":{"assignments":[922],"declarations":[{"constant":false,"id":922,"name":"i","nodeType":"VariableDeclaration","scope":1000,"src":"1865:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":921,"name":"uint8","nodeType":"ElementaryTypeName","src":"1865:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":924,"initialValue":{"argumentTypes":null,"hexValue":"30","id":923,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1875:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1865:11:4"},"loopExpression":{"expression":{"argumentTypes":null,"id":930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1911:3:4","subExpression":{"argumentTypes":null,"id":929,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"1911:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":931,"nodeType":"ExpressionStatement","src":"1911:3:4"},"nodeType":"ForStatement","src":"1860:158:4"},{"assignments":[948],"declarations":[{"constant":false,"id":948,"name":"costLevelAfter","nodeType":"VariableDeclaration","scope":1000,"src":"2086:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":947,"name":"int","nodeType":"ElementaryTypeName","src":"2086:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":957,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":950,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":884,"src":"2121:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":951,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"2128:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":952,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":897,"src":"2150:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":953,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"2159:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"2159:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":955,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2159:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":949,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"2107:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":956,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2107:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"2086:115:4"},{"expression":{"argumentTypes":null,"id":963,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":958,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2284:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":961,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":903,"src":"2313:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":959,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":948,"src":"2294:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":960,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7128,"src":"2294:18:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":962,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2294:35:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2284:45:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":964,"nodeType":"ExpressionStatement","src":"2284:45:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":979,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":967,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":965,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2478:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":966,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2489:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2478:12:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":972,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":968,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2494:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":970,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"2508:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":969,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2504:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":971,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2504:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2494:18:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":974,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"2519:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":973,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2515:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":975,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2515:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2494:29:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":977,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2527:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2494:40:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2478:56:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":997,"nodeType":"Block","src":"2586:57:4","statements":[{"expression":{"argumentTypes":null,"id":995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":987,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2600:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":994,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":992,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":988,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2610:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":990,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"2624:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":989,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2620:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":991,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2620:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2610:18:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":993,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2631:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2610:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2600:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":996,"nodeType":"ExpressionStatement","src":"2600:32:4"}]},"id":998,"nodeType":"IfStatement","src":"2475:168:4","trueBody":{"id":986,"nodeType":"Block","src":"2536:44:4","statements":[{"expression":{"argumentTypes":null,"id":984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":980,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2550:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"/=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":982,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"2565:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":981,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2561:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":983,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2561:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2550:19:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":985,"nodeType":"ExpressionStatement","src":"2550:19:4"}]}}]},"documentation":"@dev Calculates the net cost for executing a given trade.\n @param market Market contract\n @param outcomeTokenAmounts Amounts of outcome tokens to buy from the market. If an amount is negative, represents an amount to sell to the market.\n @return Net cost of trade. If positive, represents amount of collateral which would be paid to the market for the trade. If negative, represents amount of collateral which would be received from the market for the trade.","id":1000,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcNetCost","nodeType":"FunctionDefinition","parameters":{"id":861,"nodeType":"ParameterList","parameters":[{"constant":false,"id":857,"name":"market","nodeType":"VariableDeclaration","scope":1000,"src":"1103:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":856,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"1103:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":860,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":1000,"src":"1118:25:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":858,"name":"int","nodeType":"ElementaryTypeName","src":"1118:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":859,"length":null,"nodeType":"ArrayTypeName","src":"1118:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"1102:42:4"},"payable":false,"returnParameters":{"id":864,"nodeType":"ParameterList","parameters":[{"constant":false,"id":863,"name":"netCost","nodeType":"VariableDeclaration","scope":1000,"src":"1190:11:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":862,"name":"int","nodeType":"ElementaryTypeName","src":"1190:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1189:13:4"},"scope":1526,"src":"1082:1567:4","stateMutability":"view","superFunction":1561,"visibility":"public"},{"body":{"id":1135,"nodeType":"Block","src":"3042:1482:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":1018,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1012,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1002,"src":"3060:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1013,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3060:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":1014,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3060:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1015,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"3060:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":1016,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3060:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"31","id":1017,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3103:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3060:44:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1011,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3052:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1019,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3052:53:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1020,"nodeType":"ExpressionStatement","src":"3052:53:4"},{"assignments":[1024],"declarations":[{"constant":false,"id":1024,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1136,"src":"3115:33:4","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1022,"name":"int","nodeType":"ElementaryTypeName","src":"3115:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1023,"length":null,"nodeType":"ArrayTypeName","src":"3115:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":1028,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1026,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1002,"src":"3175:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1025,"name":"getNetOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1525,"src":"3151:23:4","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_contract$_Market_$2238_$returns$_t_array$_t_int256_$dyn_memory_ptr_$","typeString":"function (contract Market) view returns (int256[] memory)"}},"id":1027,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3151:31:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"3115:67:4"},{"assignments":[1030],"declarations":[{"constant":false,"id":1030,"name":"log2N","nodeType":"VariableDeclaration","scope":1136,"src":"3260:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1029,"name":"int","nodeType":"ElementaryTypeName","src":"3260:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1041,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1036,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1033,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3298:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1034,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3298:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":1035,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"3328:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3298:33:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1037,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"3333:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1038,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"3333:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1039,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3333:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1031,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"3272:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1032,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"3272:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1040,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3272:103:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3260:115:4"},{"assignments":[1043],"declarations":[{"constant":false,"id":1043,"name":"funding","nodeType":"VariableDeclaration","scope":1136,"src":"3385:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1042,"name":"uint","nodeType":"ElementaryTypeName","src":"3385:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1047,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1044,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1002,"src":"3400:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1045,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"funding","nodeType":"MemberAccess","referencedDeclaration":2162,"src":"3400:14:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":1046,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3400:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3385:31:4"},{"assignments":[1049],"declarations":[{"constant":false,"id":1049,"name":"costLevelBefore","nodeType":"VariableDeclaration","scope":1136,"src":"3426:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1048,"name":"int","nodeType":"ElementaryTypeName","src":"3426:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1058,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1051,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1030,"src":"3462:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1052,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3469:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1053,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1043,"src":"3491:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1054,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"3500:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1055,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"3500:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1056,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3500:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1050,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"3448:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3448:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3426:116:4"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1064,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1061,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1006,"src":"3628:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1060,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3624:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1062,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3624:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1063,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3650:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3624:27:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1059,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3616:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1065,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3616:36:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1066,"nodeType":"ExpressionStatement","src":"3616:36:4"},{"expression":{"argumentTypes":null,"id":1078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1067,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3662:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1069,"indexExpression":{"argumentTypes":null,"id":1068,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1004,"src":"3683:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3662:39:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1075,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1006,"src":"3752:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1074,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3748:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1076,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3748:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1070,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3704:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1072,"indexExpression":{"argumentTypes":null,"id":1071,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1004,"src":"3725:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3704:39:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1073,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"3704:43:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1077,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3704:67:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3662:109:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1079,"nodeType":"ExpressionStatement","src":"3662:109:4"},{"assignments":[1081],"declarations":[{"constant":false,"id":1081,"name":"costLevelAfter","nodeType":"VariableDeclaration","scope":1136,"src":"3839:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1080,"name":"int","nodeType":"ElementaryTypeName","src":"3839:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1090,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1083,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1030,"src":"3874:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1084,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3881:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1085,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1043,"src":"3903:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1086,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"3912:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"3912:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1088,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3912:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1082,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"3860:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1089,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3860:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3839:115:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1093,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1091,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1081,"src":"4018:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1092,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1049,"src":"4035:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4018:32:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1098,"nodeType":"IfStatement","src":"4015:81:4","trueBody":{"expression":{"argumentTypes":null,"id":1096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1094,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1081,"src":"4064:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1095,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1049,"src":"4081:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4064:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1097,"nodeType":"ExpressionStatement","src":"4064:32:4"}},{"expression":{"argumentTypes":null,"id":1105,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1099,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4106:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1103,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1101,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1081,"src":"4118:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":1102,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1049,"src":"4135:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4118:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":1100,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4113:4:4","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":1104,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4113:38:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4106:45:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1106,"nodeType":"ExpressionStatement","src":"4106:45:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1111,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1109,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1107,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4217:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1108,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"4224:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4217:10:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":1110,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"4230:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4217:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1112,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4237:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4217:24:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":1124,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1118,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4363:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1119,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4370:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1120,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"4377:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4370:10:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":1122,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4383:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"4370:14:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4363:21:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1125,"nodeType":"ExpressionStatement","src":"4363:21:4"},"id":1126,"nodeType":"IfStatement","src":"4213:171:4","trueBody":{"expression":{"argumentTypes":null,"id":1116,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1114,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4255:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"/=","rightHandSide":{"argumentTypes":null,"id":1115,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"4263:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4255:11:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1117,"nodeType":"ExpressionStatement","src":"4255:11:4"}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1127,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4455:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":1128,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1006,"src":"4462:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4455:24:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1134,"nodeType":"IfStatement","src":"4451:66:4","trueBody":{"expression":{"argumentTypes":null,"id":1132,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1130,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4493:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1131,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1006,"src":"4500:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4493:24:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1133,"nodeType":"ExpressionStatement","src":"4493:24:4"}}]},"documentation":"@dev Returns cost to buy given number of outcome tokens\n @param market Market contract\n @param outcomeTokenIndex Index of outcome to buy\n @param outcomeTokenCount Number of outcome tokens to buy\n @return Cost","id":1136,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcCost","nodeType":"FunctionDefinition","parameters":{"id":1007,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1002,"name":"market","nodeType":"VariableDeclaration","scope":1136,"src":"2918:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1001,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"2918:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1004,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1136,"src":"2933:23:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1003,"name":"uint8","nodeType":"ElementaryTypeName","src":"2933:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1006,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":1136,"src":"2958:22:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1005,"name":"uint","nodeType":"ElementaryTypeName","src":"2958:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2917:64:4"},"payable":false,"returnParameters":{"id":1010,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1009,"name":"cost","nodeType":"VariableDeclaration","scope":1136,"src":"3027:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1008,"name":"uint","nodeType":"ElementaryTypeName","src":"3027:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3026:11:4"},"scope":1526,"src":"2900:1624:4","stateMutability":"view","superFunction":1540,"visibility":"public"},{"body":{"id":1245,"nodeType":"Block","src":"4932:1164:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":1154,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1148,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1138,"src":"4950:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4950:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":1150,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4950:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1151,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"4950:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":1152,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4950:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"31","id":1153,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4993:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"4950:44:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1147,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4942:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1155,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4942:53:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1156,"nodeType":"ExpressionStatement","src":"4942:53:4"},{"assignments":[1160],"declarations":[{"constant":false,"id":1160,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1246,"src":"5005:33:4","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1158,"name":"int","nodeType":"ElementaryTypeName","src":"5005:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1159,"length":null,"nodeType":"ArrayTypeName","src":"5005:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":1164,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1162,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1138,"src":"5065:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1161,"name":"getNetOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1525,"src":"5041:23:4","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_contract$_Market_$2238_$returns$_t_array$_t_int256_$dyn_memory_ptr_$","typeString":"function (contract Market) view returns (int256[] memory)"}},"id":1163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5041:31:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"5005:67:4"},{"assignments":[1166],"declarations":[{"constant":false,"id":1166,"name":"log2N","nodeType":"VariableDeclaration","scope":1246,"src":"5150:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1165,"name":"int","nodeType":"ElementaryTypeName","src":"5150:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1177,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1169,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5188:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5188:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":1171,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"5218:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5188:33:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1173,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"5223:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1174,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"5223:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1175,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5223:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1167,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"5162:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"5162:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1176,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5162:103:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"5150:115:4"},{"assignments":[1179],"declarations":[{"constant":false,"id":1179,"name":"funding","nodeType":"VariableDeclaration","scope":1246,"src":"5275:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1178,"name":"uint","nodeType":"ElementaryTypeName","src":"5275:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1183,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1180,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1138,"src":"5290:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"funding","nodeType":"MemberAccess","referencedDeclaration":2162,"src":"5290:14:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":1182,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5290:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5275:31:4"},{"assignments":[1185],"declarations":[{"constant":false,"id":1185,"name":"costLevelBefore","nodeType":"VariableDeclaration","scope":1246,"src":"5316:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1184,"name":"int","nodeType":"ElementaryTypeName","src":"5316:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1194,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1187,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1166,"src":"5352:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1188,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5359:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1189,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1179,"src":"5381:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1190,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"5390:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1191,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"5390:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1192,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5390:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1186,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"5338:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1193,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5338:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"5316:116:4"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1197,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1142,"src":"5529:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1196,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5525:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5525:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1199,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5551:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5525:27:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1195,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5517:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1201,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5517:36:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1202,"nodeType":"ExpressionStatement","src":"5517:36:4"},{"expression":{"argumentTypes":null,"id":1214,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1203,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5563:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1205,"indexExpression":{"argumentTypes":null,"id":1204,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1140,"src":"5584:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5563:39:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1211,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1142,"src":"5653:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1210,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5649:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1212,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5649:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1206,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5605:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1208,"indexExpression":{"argumentTypes":null,"id":1207,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1140,"src":"5626:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5605:39:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7128,"src":"5605:43:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1213,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5605:67:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5563:109:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1215,"nodeType":"ExpressionStatement","src":"5563:109:4"},{"assignments":[1217],"declarations":[{"constant":false,"id":1217,"name":"costLevelAfter","nodeType":"VariableDeclaration","scope":1246,"src":"5740:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1216,"name":"int","nodeType":"ElementaryTypeName","src":"5740:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1226,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1219,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1166,"src":"5775:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1220,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5782:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1221,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1179,"src":"5804:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1222,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"5813:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"5813:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1224,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5813:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1218,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"5761:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1225,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5761:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"5740:115:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1229,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1227,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1185,"src":"5921:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":1228,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1217,"src":"5940:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5921:33:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1234,"nodeType":"IfStatement","src":"5918:82:4","trueBody":{"expression":{"argumentTypes":null,"id":1232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1230,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1185,"src":"5968:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1231,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1217,"src":"5986:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5968:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1233,"nodeType":"ExpressionStatement","src":"5968:32:4"}},{"expression":{"argumentTypes":null,"id":1243,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1235,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1145,"src":"6036:6:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1237,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1185,"src":"6050:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":1238,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1217,"src":"6068:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6050:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":1236,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6045:4:4","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":1240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6045:38:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1241,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"6086:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6045:44:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6036:53:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1244,"nodeType":"ExpressionStatement","src":"6036:53:4"}]},"documentation":"@dev Returns profit for selling given number of outcome tokens\n @param market Market contract\n @param outcomeTokenIndex Index of outcome to sell\n @param outcomeTokenCount Number of outcome tokens to sell\n @return Profit","id":1246,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcProfit","nodeType":"FunctionDefinition","parameters":{"id":1143,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1138,"name":"market","nodeType":"VariableDeclaration","scope":1246,"src":"4806:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1137,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4806:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1140,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1246,"src":"4821:23:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1139,"name":"uint8","nodeType":"ElementaryTypeName","src":"4821:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1142,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":1246,"src":"4846:22:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1141,"name":"uint","nodeType":"ElementaryTypeName","src":"4846:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4805:64:4"},"payable":false,"returnParameters":{"id":1146,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1145,"name":"profit","nodeType":"VariableDeclaration","scope":1246,"src":"4915:11:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1144,"name":"uint","nodeType":"ElementaryTypeName","src":"4915:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4914:13:4"},"scope":1526,"src":"4786:1310:4","stateMutability":"view","superFunction":1551,"visibility":"public"},{"body":{"id":1313,"nodeType":"Block","src":"6468:731:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":1262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1256,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1248,"src":"6486:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"6486:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":1258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6486:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1259,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"6486:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":1260,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6486:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"31","id":1261,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6529:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"6486:44:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1255,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6478:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1263,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6478:53:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1264,"nodeType":"ExpressionStatement","src":"6478:53:4"},{"assignments":[1268],"declarations":[{"constant":false,"id":1268,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1314,"src":"6541:33:4","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1266,"name":"int","nodeType":"ElementaryTypeName","src":"6541:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1267,"length":null,"nodeType":"ArrayTypeName","src":"6541:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":1272,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1270,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1248,"src":"6601:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1269,"name":"getNetOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1525,"src":"6577:23:4","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_contract$_Market_$2238_$returns$_t_array$_t_int256_$dyn_memory_ptr_$","typeString":"function (contract Market) view returns (int256[] memory)"}},"id":1271,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6577:31:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"6541:67:4"},{"assignments":[1274],"declarations":[{"constant":false,"id":1274,"name":"logN","nodeType":"VariableDeclaration","scope":1314,"src":"6618:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1273,"name":"int","nodeType":"ElementaryTypeName","src":"6618:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1285,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1277,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1268,"src":"6655:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1278,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6655:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":1279,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"6685:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6655:33:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1281,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"6690:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1282,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"6690:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1283,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6690:39:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1275,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"6629:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"6629:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1284,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6629:101:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"6618:112:4"},{"assignments":[1287],"declarations":[{"constant":false,"id":1287,"name":"funding","nodeType":"VariableDeclaration","scope":1314,"src":"6740:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1286,"name":"uint","nodeType":"ElementaryTypeName","src":"6740:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1291,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1288,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1248,"src":"6755:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1289,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"funding","nodeType":"MemberAccess","referencedDeclaration":2162,"src":"6755:14:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":1290,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6755:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"6740:31:4"},{"assignments":[1293,null,1295],"declarations":[{"constant":false,"id":1293,"name":"sum","nodeType":"VariableDeclaration","scope":1314,"src":"7003:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1292,"name":"uint","nodeType":"ElementaryTypeName","src":"7003:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},null,{"constant":false,"id":1295,"name":"outcomeExpTerm","nodeType":"VariableDeclaration","scope":1314,"src":"7015:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1294,"name":"uint","nodeType":"ElementaryTypeName","src":"7015:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1305,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1297,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1274,"src":"7051:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1298,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1268,"src":"7057:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1299,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1287,"src":"7079:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":1300,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1250,"src":"7088:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1301,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"7107:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1302,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"7107:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1303,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7107:39:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1296,"name":"sumExpOffset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1483,"src":"7038:12:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_uint8_$_t_enum$_EstimationMode_$5680_$returns$_t_uint256_$_t_int256_$_t_uint256_$","typeString":"function (int256,int256[] memory,uint256,uint8,enum Fixed192x64Math.EstimationMode) pure returns (uint256,int256,uint256)"}},"id":1304,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7038:109:4","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_int256_$_t_uint256_$","typeString":"tuple(uint256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"7002:145:4"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1311,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1306,"name":"outcomeExpTerm","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1295,"src":"7164:14:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1309,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1307,"name":"sum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1293,"src":"7182:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1308,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"7188:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7182:9:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":1310,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"7181:11:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7164:28:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":1254,"id":1312,"nodeType":"Return","src":"7157:35:4"}]},"documentation":"@dev Returns marginal price of an outcome\n @param market Market contract\n @param outcomeTokenIndex Index of outcome to determine marginal price of\n @return Marginal price of an outcome as a fixed point number","id":1314,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarginalPrice","nodeType":"FunctionDefinition","parameters":{"id":1251,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1248,"name":"market","nodeType":"VariableDeclaration","scope":1314,"src":"6367:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1247,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"6367:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1250,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1314,"src":"6382:23:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1249,"name":"uint8","nodeType":"ElementaryTypeName","src":"6382:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"6366:40:4"},"payable":false,"returnParameters":{"id":1254,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1253,"name":"price","nodeType":"VariableDeclaration","scope":1314,"src":"6452:10:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1252,"name":"uint","nodeType":"ElementaryTypeName","src":"6452:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6451:12:4"},"scope":1526,"src":"6340:859:4","stateMutability":"view","superFunction":1570,"visibility":"public"},{"body":{"id":1372,"nodeType":"Block","src":"7762:524:4","statements":[{"assignments":[1329,1331,null],"declarations":[{"constant":false,"id":1329,"name":"sum","nodeType":"VariableDeclaration","scope":1373,"src":"8002:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1328,"name":"uint","nodeType":"ElementaryTypeName","src":"8002:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1331,"name":"offset","nodeType":"VariableDeclaration","scope":1373,"src":"8012:10:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1330,"name":"int","nodeType":"ElementaryTypeName","src":"8012:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},null],"id":1339,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1333,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1316,"src":"8041:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1334,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1319,"src":"8047:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1335,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1321,"src":"8069:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"hexValue":"30","id":1336,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8078:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"argumentTypes":null,"id":1337,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1323,"src":"8081:14:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1332,"name":"sumExpOffset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1483,"src":"8028:12:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_uint8_$_t_enum$_EstimationMode_$5680_$returns$_t_uint256_$_t_int256_$_t_uint256_$","typeString":"function (int256,int256[] memory,uint256,uint8,enum Fixed192x64Math.EstimationMode) pure returns (uint256,int256,uint256)"}},"id":1338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8028:68:4","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_int256_$_t_uint256_$","typeString":"tuple(uint256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"8001:95:4"},{"expression":{"argumentTypes":null,"id":1346,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1340,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8106:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1343,"name":"sum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1329,"src":"8144:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":1344,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1323,"src":"8149:14:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1341,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"8118:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1342,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"8118:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1345,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8118:46:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8106:58:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1347,"nodeType":"ExpressionStatement","src":"8106:58:4"},{"expression":{"argumentTypes":null,"id":1353,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1348,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8174:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1351,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1331,"src":"8200:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":1349,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8186:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1350,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"8186:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1352,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8186:21:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8174:33:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1354,"nodeType":"ExpressionStatement","src":"8174:33:4"},{"expression":{"argumentTypes":null,"id":1370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1355,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8217:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1367,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1321,"src":"8270:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1366,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8266:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8266:12:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1363,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1359,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"8248:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1358,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8244:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1360,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8244:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":1356,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8230:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1357,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":7033,"src":"8230:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1361,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8230:23:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1362,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1316,"src":"8256:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8230:30:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":1364,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8229:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":7033,"src":"8229:36:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1369,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8229:50:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8217:62:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1371,"nodeType":"ExpressionStatement","src":"8217:62:4"}]},"documentation":"@dev Calculates the result of the LMSR cost function which is used to\n derive prices from the market state\n @param logN Logarithm of the number of outcomes\n @param netOutcomeTokensSold Net outcome tokens sold by market\n @param funding Initial funding for market\n @return Cost level","id":1373,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcCostLevel","nodeType":"FunctionDefinition","parameters":{"id":1324,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1316,"name":"logN","nodeType":"VariableDeclaration","scope":1373,"src":"7599:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1315,"name":"int","nodeType":"ElementaryTypeName","src":"7599:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1319,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1373,"src":"7609:26:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1317,"name":"int","nodeType":"ElementaryTypeName","src":"7609:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1318,"length":null,"nodeType":"ArrayTypeName","src":"7609:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":1321,"name":"funding","nodeType":"VariableDeclaration","scope":1373,"src":"7637:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1320,"name":"uint","nodeType":"ElementaryTypeName","src":"7637:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1323,"name":"estimationMode","nodeType":"VariableDeclaration","scope":1373,"src":"7651:45:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":1322,"name":"Fixed192x64Math.EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"7651:30:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"7598:99:4"},"payable":false,"returnParameters":{"id":1327,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1326,"name":"costLevel","nodeType":"VariableDeclaration","scope":1373,"src":"7743:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1325,"name":"int","nodeType":"ElementaryTypeName","src":"7743:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7742:15:4"},"scope":1526,"src":"7576:710:4","stateMutability":"pure","superFunction":null,"visibility":"private"},{"body":{"id":1482,"nodeType":"Block","src":"9066:1371:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1396,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1394,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1375,"src":"9926:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1395,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9934:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9926:9:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1398,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1380,"src":"9943:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1397,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9939:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9939:12:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1400,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9955:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9939:17:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9926:30:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1393,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9918:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1403,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9918:39:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1404,"nodeType":"ExpressionStatement","src":"9918:39:4"},{"expression":{"argumentTypes":null,"id":1410,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1405,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"9967:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1408,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1378,"src":"9996:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}],"expression":{"argumentTypes":null,"id":1406,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"9976:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1407,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"max","nodeType":"MemberAccess","referencedDeclaration":6667,"src":"9976:19:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$","typeString":"function (int256[] memory) pure returns (int256)"}},"id":1409,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9976:41:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9967:50:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1411,"nodeType":"ExpressionStatement","src":"9967:50:4"},{"expression":{"argumentTypes":null,"id":1421,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1412,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10027:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1415,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1375,"src":"10047:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":1413,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10036:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":7033,"src":"10036:10:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1416,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10036:16:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1418,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1380,"src":"10059:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1417,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10055:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1419,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10055:12:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"10036:31:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"10027:40:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1422,"nodeType":"ExpressionStatement","src":"10027:40:4"},{"expression":{"argumentTypes":null,"id":1428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1423,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10077:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1426,"name":"EXP_LIMIT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":855,"src":"10097:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":1424,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10086:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1425,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7128,"src":"10086:10:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1427,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10086:21:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"10077:30:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1429,"nodeType":"ExpressionStatement","src":"10077:30:4"},{"assignments":[],"declarations":[{"constant":false,"id":1431,"name":"term","nodeType":"VariableDeclaration","scope":1483,"src":"10117:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1430,"name":"uint","nodeType":"ElementaryTypeName","src":"10117:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1432,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"10117:9:4"},{"body":{"id":1480,"nodeType":"Block","src":"10192:239:4","statements":[{"expression":{"argumentTypes":null,"id":1463,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1444,"name":"term","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1431,"src":"10206:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1459,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10289:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1456,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1451,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1375,"src":"10263:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1447,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1378,"src":"10235:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1449,"indexExpression":{"argumentTypes":null,"id":1448,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1434,"src":"10256:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"10235:23:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1450,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":7033,"src":"10235:27:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1452,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10235:33:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1454,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1380,"src":"10275:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1453,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10271:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1455,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10271:12:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"10235:48:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":1457,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"10234:50:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1458,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7128,"src":"10234:54:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1460,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10234:62:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1461,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1384,"src":"10298:14:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1445,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"10213:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"pow2","nodeType":"MemberAccess","referencedDeclaration":5787,"src":"10213:20:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_int256_$_t_enum$_EstimationMode_$5680_$returns$_t_uint256_$","typeString":"function (int256,enum Fixed192x64Math.EstimationMode) pure returns (uint256)"}},"id":1462,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10213:100:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10206:107:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1464,"nodeType":"ExpressionStatement","src":"10206:107:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":1467,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1465,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1434,"src":"10331:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1466,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1382,"src":"10336:12:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"10331:17:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1472,"nodeType":"IfStatement","src":"10327:60:4","trueBody":{"expression":{"argumentTypes":null,"id":1470,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1468,"name":"outcomeExpTerm","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1391,"src":"10366:14:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1469,"name":"term","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1431,"src":"10383:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10366:21:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1471,"nodeType":"ExpressionStatement","src":"10366:21:4"}},{"expression":{"argumentTypes":null,"id":1478,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1473,"name":"sum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1387,"src":"10401:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1476,"name":"term","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1431,"src":"10415:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1474,"name":"sum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1387,"src":"10407:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1475,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"10407:7:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1477,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10407:13:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10401:19:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1479,"nodeType":"ExpressionStatement","src":"10401:19:4"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1440,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1437,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1434,"src":"10154:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1438,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1378,"src":"10158:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1439,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"10158:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10154:31:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":1481,"initializationExpression":{"assignments":[1434],"declarations":[{"constant":false,"id":1434,"name":"i","nodeType":"VariableDeclaration","scope":1483,"src":"10141:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1433,"name":"uint8","nodeType":"ElementaryTypeName","src":"10141:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":1436,"initialValue":{"argumentTypes":null,"hexValue":"30","id":1435,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10151:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"10141:11:4"},"loopExpression":{"expression":{"argumentTypes":null,"id":1442,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"10187:3:4","subExpression":{"argumentTypes":null,"id":1441,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1434,"src":"10187:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":1443,"nodeType":"ExpressionStatement","src":"10187:3:4"},"nodeType":"ForStatement","src":"10136:295:4"}]},"documentation":"@dev Calculates sum(exp(q/b - offset) for q in quantities), where offset is set\n so that the sum fits in 248-256 bits\n @param logN Logarithm of the number of outcomes\n @param netOutcomeTokensSold Net outcome tokens sold by market\n @param funding Initial funding for market\n @param outcomeIndex Index of exponential term to extract (for use by marginal price function)\n @return A result structure composed of the sum, the offset used, and the summand associated with the supplied index","id":1483,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"sumExpOffset","nodeType":"FunctionDefinition","parameters":{"id":1385,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1375,"name":"logN","nodeType":"VariableDeclaration","scope":1483,"src":"8854:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1374,"name":"int","nodeType":"ElementaryTypeName","src":"8854:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1378,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1483,"src":"8864:26:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1376,"name":"int","nodeType":"ElementaryTypeName","src":"8864:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1377,"length":null,"nodeType":"ArrayTypeName","src":"8864:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":1380,"name":"funding","nodeType":"VariableDeclaration","scope":1483,"src":"8892:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1379,"name":"uint","nodeType":"ElementaryTypeName","src":"8892:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1382,"name":"outcomeIndex","nodeType":"VariableDeclaration","scope":1483,"src":"8906:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1381,"name":"uint8","nodeType":"ElementaryTypeName","src":"8906:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1384,"name":"estimationMode","nodeType":"VariableDeclaration","scope":1483,"src":"8926:45:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":1383,"name":"Fixed192x64Math.EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"8926:30:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"8853:119:4"},"payable":false,"returnParameters":{"id":1392,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1387,"name":"sum","nodeType":"VariableDeclaration","scope":1483,"src":"9019:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1386,"name":"uint","nodeType":"ElementaryTypeName","src":"9019:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1389,"name":"offset","nodeType":"VariableDeclaration","scope":1483,"src":"9029:10:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1388,"name":"int","nodeType":"ElementaryTypeName","src":"9029:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1391,"name":"outcomeExpTerm","nodeType":"VariableDeclaration","scope":1483,"src":"9041:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1390,"name":"uint","nodeType":"ElementaryTypeName","src":"9041:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"9018:43:4"},"scope":1526,"src":"8832:1605:4","stateMutability":"pure","superFunction":null,"visibility":"private"},{"body":{"id":1524,"nodeType":"Block","src":"11033:195:4","statements":[{"expression":{"argumentTypes":null,"id":1501,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1491,"name":"quantities","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1489,"src":"11043:10:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1495,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1485,"src":"11066:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1496,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"11066:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":1497,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11066:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1498,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"11066:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":1499,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11066:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":1494,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"11056:9:4","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":1492,"name":"int","nodeType":"ElementaryTypeName","src":"11060:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1493,"length":null,"nodeType":"ArrayTypeName","src":"11060:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":1500,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11056:51:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"src":"11043:64:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1502,"nodeType":"ExpressionStatement","src":"11043:64:4"},{"body":{"expression":{"argumentTypes":null,"id":1521,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1514,"name":"quantities","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1489,"src":"11175:10:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1516,"indexExpression":{"argumentTypes":null,"id":1515,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1504,"src":"11186:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"11175:13:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1519,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1504,"src":"11219:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":1517,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1485,"src":"11191:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1518,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"netOutcomeTokensSold","nodeType":"MemberAccess","referencedDeclaration":2165,"src":"11191:27:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_int256_$","typeString":"function (uint256) view external returns (int256)"}},"id":1520,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11191:30:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"11175:46:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1522,"nodeType":"ExpressionStatement","src":"11175:46:4"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1510,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1507,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1504,"src":"11135:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1508,"name":"quantities","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1489,"src":"11139:10:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1509,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"11139:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"11135:21:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":1523,"initializationExpression":{"assignments":[1504],"declarations":[{"constant":false,"id":1504,"name":"i","nodeType":"VariableDeclaration","scope":1525,"src":"11122:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1503,"name":"uint8","nodeType":"ElementaryTypeName","src":"11122:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":1506,"initialValue":{"argumentTypes":null,"hexValue":"30","id":1505,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11132:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"11122:11:4"},"loopExpression":{"expression":{"argumentTypes":null,"id":1512,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"11158:3:4","subExpression":{"argumentTypes":null,"id":1511,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1504,"src":"11158:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":1513,"nodeType":"ExpressionStatement","src":"11158:3:4"},"nodeType":"ForStatement","src":"11117:104:4"}]},"documentation":"@dev Gets net outcome tokens sold by market. Since all sets of outcome tokens are backed by\n corresponding collateral tokens, the net quantity of a token sold by the market is the\n number of collateral tokens (which is the same as the number of outcome tokens the\n market created) subtracted by the quantity of that token held by the market.\n @param market Market contract\n @return Net outcome tokens sold by market","id":1525,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getNetOutcomeTokensSold","nodeType":"FunctionDefinition","parameters":{"id":1486,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1485,"name":"market","nodeType":"VariableDeclaration","scope":1525,"src":"10950:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1484,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"10950:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"10949:15:4"},"payable":false,"returnParameters":{"id":1490,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1489,"name":"quantities","nodeType":"VariableDeclaration","scope":1525,"src":"11011:16:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1487,"name":"int","nodeType":"ElementaryTypeName","src":"11011:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1488,"length":null,"nodeType":"ArrayTypeName","src":"11011:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"11010:18:4"},"scope":1526,"src":"10917:311:4","stateMutability":"view","superFunction":null,"visibility":"private"}],"scope":1527,"src":"349:10881:4"}],"src":"0:11230:4"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/LMSRMarketMaker.sol","exportedSymbols":{"LMSRMarketMaker":[1526]},"id":1527,"nodeType":"SourceUnit","nodes":[{"id":842,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:4"},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":843,"nodeType":"ImportDirective","scope":1527,"sourceUnit":7190,"src":"25:59:4","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","file":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","id":844,"nodeType":"ImportDirective","scope":1527,"sourceUnit":6669,"src":"85:65:4","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":845,"nodeType":"ImportDirective","scope":1527,"sourceUnit":1572,"src":"151:41:4","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":846,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"377:11:4","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":847,"nodeType":"InheritanceSpecifier","src":"377:11:4"}],"contractDependencies":[1571],"contractKind":"contract","documentation":"@title LMSR market maker contract - Calculates share prices based on share distribution and initial funding\n @author Alan Lu - ","fullyImplemented":true,"id":1526,"linearizedBaseContracts":[1526,1571],"name":"LMSRMarketMaker","nodeType":"ContractDefinition","nodes":[{"id":849,"libraryName":{"contractScope":null,"id":848,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"401:8:4","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"395:21:4","typeName":null},{"constant":true,"id":852,"name":"ONE","nodeType":"VariableDeclaration","scope":1526,"src":"455:39:4","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":850,"name":"uint","nodeType":"ElementaryTypeName","src":"455:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":851,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"475:19:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"internal"},{"constant":true,"id":855,"name":"EXP_LIMIT","nodeType":"VariableDeclaration","scope":1526,"src":"500:47:4","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":853,"name":"int","nodeType":"ElementaryTypeName","src":"500:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":{"argumentTypes":null,"hexValue":"33333934323030393039353632353537343937333434","id":854,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"525:22:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3394200909562557497344_by_1","typeString":"int_const 3394200909562557497344"},"value":"3394200909562557497344"},"visibility":"internal"},{"body":{"id":999,"nodeType":"Block","src":"1207:1442:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":866,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":857,"src":"1225:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":867,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"1225:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":868,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1225:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":869,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"1225:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":870,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1225:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"31","id":871,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1268:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1225:44:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":865,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1217:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":873,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1217:53:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":874,"nodeType":"ExpressionStatement","src":"1217:53:4"},{"assignments":[878],"declarations":[{"constant":false,"id":878,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1000,"src":"1280:33:4","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":876,"name":"int","nodeType":"ElementaryTypeName","src":"1280:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":877,"length":null,"nodeType":"ArrayTypeName","src":"1280:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":882,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":880,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":857,"src":"1340:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":879,"name":"getNetOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1525,"src":"1316:23:4","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_contract$_Market_$2238_$returns$_t_array$_t_int256_$dyn_memory_ptr_$","typeString":"function (contract Market) view returns (int256[] memory)"}},"id":881,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1316:31:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1280:67:4"},{"assignments":[884],"declarations":[{"constant":false,"id":884,"name":"log2N","nodeType":"VariableDeclaration","scope":1000,"src":"1426:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":883,"name":"int","nodeType":"ElementaryTypeName","src":"1426:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":895,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":890,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":887,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1464:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":888,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1464:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":889,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"1494:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1464:33:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":891,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"1499:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":892,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"1499:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":893,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1499:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":885,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"1438:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":886,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"1438:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":894,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1438:103:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1426:115:4"},{"assignments":[897],"declarations":[{"constant":false,"id":897,"name":"funding","nodeType":"VariableDeclaration","scope":1000,"src":"1551:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":896,"name":"uint","nodeType":"ElementaryTypeName","src":"1551:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":901,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":898,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":857,"src":"1566:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":899,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"funding","nodeType":"MemberAccess","referencedDeclaration":2162,"src":"1566:14:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":900,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1566:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"1551:31:4"},{"assignments":[903],"declarations":[{"constant":false,"id":903,"name":"costLevelBefore","nodeType":"VariableDeclaration","scope":1000,"src":"1592:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":902,"name":"int","nodeType":"ElementaryTypeName","src":"1592:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":912,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":905,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":884,"src":"1628:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":906,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1635:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":907,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":897,"src":"1657:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":908,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"1666:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"1666:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":910,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1666:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":904,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"1614:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":911,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1614:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1592:116:4"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":918,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":914,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1792:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1792:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":916,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":860,"src":"1823:19:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1823:26:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1792:57:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":913,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1784:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":919,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1784:66:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":920,"nodeType":"ExpressionStatement","src":"1784:66:4"},{"body":{"id":945,"nodeType":"Block","src":"1916:102:4","statements":[{"expression":{"argumentTypes":null,"id":943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":932,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1930:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":934,"indexExpression":{"argumentTypes":null,"id":933,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"1951:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1930:23:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":939,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":860,"src":"1984:19:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":941,"indexExpression":{"argumentTypes":null,"id":940,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"2004:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1984:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":935,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1956:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":937,"indexExpression":{"argumentTypes":null,"id":936,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"1977:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1956:23:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":938,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"1956:27:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":942,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1956:51:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1930:77:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":944,"nodeType":"ExpressionStatement","src":"1930:77:4"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":928,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":925,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"1878:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":926,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"1882:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1882:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1878:31:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":946,"initializationExpression":{"assignments":[922],"declarations":[{"constant":false,"id":922,"name":"i","nodeType":"VariableDeclaration","scope":1000,"src":"1865:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":921,"name":"uint8","nodeType":"ElementaryTypeName","src":"1865:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":924,"initialValue":{"argumentTypes":null,"hexValue":"30","id":923,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1875:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1865:11:4"},"loopExpression":{"expression":{"argumentTypes":null,"id":930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1911:3:4","subExpression":{"argumentTypes":null,"id":929,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":922,"src":"1911:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":931,"nodeType":"ExpressionStatement","src":"1911:3:4"},"nodeType":"ForStatement","src":"1860:158:4"},{"assignments":[948],"declarations":[{"constant":false,"id":948,"name":"costLevelAfter","nodeType":"VariableDeclaration","scope":1000,"src":"2086:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":947,"name":"int","nodeType":"ElementaryTypeName","src":"2086:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":957,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":950,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":884,"src":"2121:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":951,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":878,"src":"2128:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":952,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":897,"src":"2150:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":953,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"2159:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"2159:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":955,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2159:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":949,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"2107:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":956,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2107:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"2086:115:4"},{"expression":{"argumentTypes":null,"id":963,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":958,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2284:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":961,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":903,"src":"2313:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":959,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":948,"src":"2294:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":960,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7128,"src":"2294:18:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":962,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2294:35:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2284:45:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":964,"nodeType":"ExpressionStatement","src":"2284:45:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":979,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":967,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":965,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2478:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":966,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2489:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2478:12:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":972,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":968,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2494:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":970,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"2508:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":969,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2504:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":971,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2504:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2494:18:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":974,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"2519:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":973,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2515:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":975,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2515:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2494:29:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":977,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2527:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2494:40:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2478:56:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":997,"nodeType":"Block","src":"2586:57:4","statements":[{"expression":{"argumentTypes":null,"id":995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":987,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2600:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":994,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":992,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":988,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2610:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":990,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"2624:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":989,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2620:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":991,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2620:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2610:18:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":993,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2631:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2610:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2600:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":996,"nodeType":"ExpressionStatement","src":"2600:32:4"}]},"id":998,"nodeType":"IfStatement","src":"2475:168:4","trueBody":{"id":986,"nodeType":"Block","src":"2536:44:4","statements":[{"expression":{"argumentTypes":null,"id":984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":980,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"2550:7:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"/=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":982,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"2565:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":981,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2561:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":983,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2561:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2550:19:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":985,"nodeType":"ExpressionStatement","src":"2550:19:4"}]}}]},"documentation":"@dev Calculates the net cost for executing a given trade.\n @param market Market contract\n @param outcomeTokenAmounts Amounts of outcome tokens to buy from the market. If an amount is negative, represents an amount to sell to the market.\n @return Net cost of trade. If positive, represents amount of collateral which would be paid to the market for the trade. If negative, represents amount of collateral which would be received from the market for the trade.","id":1000,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcNetCost","nodeType":"FunctionDefinition","parameters":{"id":861,"nodeType":"ParameterList","parameters":[{"constant":false,"id":857,"name":"market","nodeType":"VariableDeclaration","scope":1000,"src":"1103:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":856,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"1103:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":860,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":1000,"src":"1118:25:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":858,"name":"int","nodeType":"ElementaryTypeName","src":"1118:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":859,"length":null,"nodeType":"ArrayTypeName","src":"1118:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"1102:42:4"},"payable":false,"returnParameters":{"id":864,"nodeType":"ParameterList","parameters":[{"constant":false,"id":863,"name":"netCost","nodeType":"VariableDeclaration","scope":1000,"src":"1190:11:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":862,"name":"int","nodeType":"ElementaryTypeName","src":"1190:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1189:13:4"},"scope":1526,"src":"1082:1567:4","stateMutability":"view","superFunction":1561,"visibility":"public"},{"body":{"id":1135,"nodeType":"Block","src":"3042:1482:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":1018,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1012,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1002,"src":"3060:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1013,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3060:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":1014,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3060:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1015,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"3060:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":1016,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3060:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"31","id":1017,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3103:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3060:44:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1011,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3052:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1019,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3052:53:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1020,"nodeType":"ExpressionStatement","src":"3052:53:4"},{"assignments":[1024],"declarations":[{"constant":false,"id":1024,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1136,"src":"3115:33:4","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1022,"name":"int","nodeType":"ElementaryTypeName","src":"3115:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1023,"length":null,"nodeType":"ArrayTypeName","src":"3115:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":1028,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1026,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1002,"src":"3175:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1025,"name":"getNetOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1525,"src":"3151:23:4","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_contract$_Market_$2238_$returns$_t_array$_t_int256_$dyn_memory_ptr_$","typeString":"function (contract Market) view returns (int256[] memory)"}},"id":1027,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3151:31:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"3115:67:4"},{"assignments":[1030],"declarations":[{"constant":false,"id":1030,"name":"log2N","nodeType":"VariableDeclaration","scope":1136,"src":"3260:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1029,"name":"int","nodeType":"ElementaryTypeName","src":"3260:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1041,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1036,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1033,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3298:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1034,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3298:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":1035,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"3328:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3298:33:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1037,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"3333:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1038,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"3333:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1039,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3333:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1031,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"3272:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1032,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"3272:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1040,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3272:103:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3260:115:4"},{"assignments":[1043],"declarations":[{"constant":false,"id":1043,"name":"funding","nodeType":"VariableDeclaration","scope":1136,"src":"3385:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1042,"name":"uint","nodeType":"ElementaryTypeName","src":"3385:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1047,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1044,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1002,"src":"3400:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1045,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"funding","nodeType":"MemberAccess","referencedDeclaration":2162,"src":"3400:14:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":1046,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3400:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3385:31:4"},{"assignments":[1049],"declarations":[{"constant":false,"id":1049,"name":"costLevelBefore","nodeType":"VariableDeclaration","scope":1136,"src":"3426:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1048,"name":"int","nodeType":"ElementaryTypeName","src":"3426:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1058,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1051,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1030,"src":"3462:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1052,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3469:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1053,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1043,"src":"3491:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1054,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"3500:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1055,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"3500:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1056,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3500:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1050,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"3448:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1057,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3448:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3426:116:4"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1064,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1061,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1006,"src":"3628:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1060,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3624:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1062,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3624:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1063,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3650:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3624:27:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1059,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3616:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1065,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3616:36:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1066,"nodeType":"ExpressionStatement","src":"3616:36:4"},{"expression":{"argumentTypes":null,"id":1078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1067,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3662:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1069,"indexExpression":{"argumentTypes":null,"id":1068,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1004,"src":"3683:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3662:39:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1075,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1006,"src":"3752:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1074,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3748:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1076,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3748:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1070,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3704:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1072,"indexExpression":{"argumentTypes":null,"id":1071,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1004,"src":"3725:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3704:39:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1073,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"3704:43:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1077,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3704:67:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3662:109:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1079,"nodeType":"ExpressionStatement","src":"3662:109:4"},{"assignments":[1081],"declarations":[{"constant":false,"id":1081,"name":"costLevelAfter","nodeType":"VariableDeclaration","scope":1136,"src":"3839:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1080,"name":"int","nodeType":"ElementaryTypeName","src":"3839:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1090,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1083,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1030,"src":"3874:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1084,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1024,"src":"3881:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1085,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1043,"src":"3903:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1086,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"3912:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"3912:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1088,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3912:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1082,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"3860:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1089,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3860:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3839:115:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1093,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1091,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1081,"src":"4018:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":1092,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1049,"src":"4035:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4018:32:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1098,"nodeType":"IfStatement","src":"4015:81:4","trueBody":{"expression":{"argumentTypes":null,"id":1096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1094,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1081,"src":"4064:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1095,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1049,"src":"4081:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4064:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1097,"nodeType":"ExpressionStatement","src":"4064:32:4"}},{"expression":{"argumentTypes":null,"id":1105,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1099,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4106:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1103,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1101,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1081,"src":"4118:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":1102,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1049,"src":"4135:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4118:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":1100,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4113:4:4","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":1104,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4113:38:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4106:45:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1106,"nodeType":"ExpressionStatement","src":"4106:45:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1111,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1109,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1107,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4217:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1108,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"4224:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4217:10:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":1110,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"4230:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4217:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1112,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4237:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4217:24:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":1124,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1118,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4363:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1119,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4370:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1120,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"4377:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4370:10:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":1122,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4383:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"4370:14:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4363:21:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1125,"nodeType":"ExpressionStatement","src":"4363:21:4"},"id":1126,"nodeType":"IfStatement","src":"4213:171:4","trueBody":{"expression":{"argumentTypes":null,"id":1116,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1114,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4255:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"/=","rightHandSide":{"argumentTypes":null,"id":1115,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"4263:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4255:11:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1117,"nodeType":"ExpressionStatement","src":"4255:11:4"}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1127,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4455:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":1128,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1006,"src":"4462:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4455:24:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1134,"nodeType":"IfStatement","src":"4451:66:4","trueBody":{"expression":{"argumentTypes":null,"id":1132,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1130,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1009,"src":"4493:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1131,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1006,"src":"4500:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4493:24:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1133,"nodeType":"ExpressionStatement","src":"4493:24:4"}}]},"documentation":"@dev Returns cost to buy given number of outcome tokens\n @param market Market contract\n @param outcomeTokenIndex Index of outcome to buy\n @param outcomeTokenCount Number of outcome tokens to buy\n @return Cost","id":1136,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcCost","nodeType":"FunctionDefinition","parameters":{"id":1007,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1002,"name":"market","nodeType":"VariableDeclaration","scope":1136,"src":"2918:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1001,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"2918:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1004,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1136,"src":"2933:23:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1003,"name":"uint8","nodeType":"ElementaryTypeName","src":"2933:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1006,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":1136,"src":"2958:22:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1005,"name":"uint","nodeType":"ElementaryTypeName","src":"2958:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2917:64:4"},"payable":false,"returnParameters":{"id":1010,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1009,"name":"cost","nodeType":"VariableDeclaration","scope":1136,"src":"3027:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1008,"name":"uint","nodeType":"ElementaryTypeName","src":"3027:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3026:11:4"},"scope":1526,"src":"2900:1624:4","stateMutability":"view","superFunction":1540,"visibility":"public"},{"body":{"id":1245,"nodeType":"Block","src":"4932:1164:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":1154,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1148,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1138,"src":"4950:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4950:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":1150,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4950:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1151,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"4950:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":1152,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4950:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"31","id":1153,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4993:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"4950:44:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1147,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4942:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1155,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4942:53:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1156,"nodeType":"ExpressionStatement","src":"4942:53:4"},{"assignments":[1160],"declarations":[{"constant":false,"id":1160,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1246,"src":"5005:33:4","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1158,"name":"int","nodeType":"ElementaryTypeName","src":"5005:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1159,"length":null,"nodeType":"ArrayTypeName","src":"5005:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":1164,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1162,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1138,"src":"5065:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1161,"name":"getNetOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1525,"src":"5041:23:4","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_contract$_Market_$2238_$returns$_t_array$_t_int256_$dyn_memory_ptr_$","typeString":"function (contract Market) view returns (int256[] memory)"}},"id":1163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5041:31:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"5005:67:4"},{"assignments":[1166],"declarations":[{"constant":false,"id":1166,"name":"log2N","nodeType":"VariableDeclaration","scope":1246,"src":"5150:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1165,"name":"int","nodeType":"ElementaryTypeName","src":"5150:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1177,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1169,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5188:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5188:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":1171,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"5218:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5188:33:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1173,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"5223:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1174,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"5223:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1175,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5223:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1167,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"5162:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"5162:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1176,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5162:103:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"5150:115:4"},{"assignments":[1179],"declarations":[{"constant":false,"id":1179,"name":"funding","nodeType":"VariableDeclaration","scope":1246,"src":"5275:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1178,"name":"uint","nodeType":"ElementaryTypeName","src":"5275:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1183,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1180,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1138,"src":"5290:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"funding","nodeType":"MemberAccess","referencedDeclaration":2162,"src":"5290:14:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":1182,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5290:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"5275:31:4"},{"assignments":[1185],"declarations":[{"constant":false,"id":1185,"name":"costLevelBefore","nodeType":"VariableDeclaration","scope":1246,"src":"5316:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1184,"name":"int","nodeType":"ElementaryTypeName","src":"5316:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1194,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1187,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1166,"src":"5352:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1188,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5359:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1189,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1179,"src":"5381:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1190,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"5390:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1191,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"5390:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1192,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5390:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1186,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"5338:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1193,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5338:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"5316:116:4"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1197,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1142,"src":"5529:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1196,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5525:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5525:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1199,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5551:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5525:27:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1195,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5517:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1201,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5517:36:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1202,"nodeType":"ExpressionStatement","src":"5517:36:4"},{"expression":{"argumentTypes":null,"id":1214,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1203,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5563:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1205,"indexExpression":{"argumentTypes":null,"id":1204,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1140,"src":"5584:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5563:39:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1211,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1142,"src":"5653:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1210,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5649:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1212,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5649:22:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1206,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5605:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1208,"indexExpression":{"argumentTypes":null,"id":1207,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1140,"src":"5626:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5605:39:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7128,"src":"5605:43:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1213,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5605:67:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5563:109:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1215,"nodeType":"ExpressionStatement","src":"5563:109:4"},{"assignments":[1217],"declarations":[{"constant":false,"id":1217,"name":"costLevelAfter","nodeType":"VariableDeclaration","scope":1246,"src":"5740:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1216,"name":"int","nodeType":"ElementaryTypeName","src":"5740:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1226,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1219,"name":"log2N","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1166,"src":"5775:5:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1220,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1160,"src":"5782:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1221,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1179,"src":"5804:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1222,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"5813:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"5813:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1224,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5813:41:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1218,"name":"calcCostLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1373,"src":"5761:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (int256,int256[] memory,uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1225,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5761:94:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"5740:115:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1229,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1227,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1185,"src":"5921:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":1228,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1217,"src":"5940:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5921:33:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1234,"nodeType":"IfStatement","src":"5918:82:4","trueBody":{"expression":{"argumentTypes":null,"id":1232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1230,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1185,"src":"5968:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1231,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1217,"src":"5986:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5968:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1233,"nodeType":"ExpressionStatement","src":"5968:32:4"}},{"expression":{"argumentTypes":null,"id":1243,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1235,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1145,"src":"6036:6:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1237,"name":"costLevelBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1185,"src":"6050:15:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":1238,"name":"costLevelAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1217,"src":"6068:14:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6050:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":1236,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6045:4:4","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":1240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6045:38:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1241,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"6086:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6045:44:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6036:53:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1244,"nodeType":"ExpressionStatement","src":"6036:53:4"}]},"documentation":"@dev Returns profit for selling given number of outcome tokens\n @param market Market contract\n @param outcomeTokenIndex Index of outcome to sell\n @param outcomeTokenCount Number of outcome tokens to sell\n @return Profit","id":1246,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcProfit","nodeType":"FunctionDefinition","parameters":{"id":1143,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1138,"name":"market","nodeType":"VariableDeclaration","scope":1246,"src":"4806:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1137,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"4806:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1140,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1246,"src":"4821:23:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1139,"name":"uint8","nodeType":"ElementaryTypeName","src":"4821:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1142,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":1246,"src":"4846:22:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1141,"name":"uint","nodeType":"ElementaryTypeName","src":"4846:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4805:64:4"},"payable":false,"returnParameters":{"id":1146,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1145,"name":"profit","nodeType":"VariableDeclaration","scope":1246,"src":"4915:11:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1144,"name":"uint","nodeType":"ElementaryTypeName","src":"4915:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4914:13:4"},"scope":1526,"src":"4786:1310:4","stateMutability":"view","superFunction":1551,"visibility":"public"},{"body":{"id":1313,"nodeType":"Block","src":"6468:731:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":1262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1256,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1248,"src":"6486:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"6486:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":1258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6486:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1259,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"6486:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":1260,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6486:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"31","id":1261,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6529:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"6486:44:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1255,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6478:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1263,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6478:53:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1264,"nodeType":"ExpressionStatement","src":"6478:53:4"},{"assignments":[1268],"declarations":[{"constant":false,"id":1268,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1314,"src":"6541:33:4","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1266,"name":"int","nodeType":"ElementaryTypeName","src":"6541:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1267,"length":null,"nodeType":"ArrayTypeName","src":"6541:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":1272,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1270,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1248,"src":"6601:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}],"id":1269,"name":"getNetOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1525,"src":"6577:23:4","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_contract$_Market_$2238_$returns$_t_array$_t_int256_$dyn_memory_ptr_$","typeString":"function (contract Market) view returns (int256[] memory)"}},"id":1271,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6577:31:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"6541:67:4"},{"assignments":[1274],"declarations":[{"constant":false,"id":1274,"name":"logN","nodeType":"VariableDeclaration","scope":1314,"src":"6618:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1273,"name":"int","nodeType":"ElementaryTypeName","src":"6618:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":1285,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1277,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1268,"src":"6655:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1278,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6655:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":1279,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"6685:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6655:33:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1281,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"6690:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1282,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"6690:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1283,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6690:39:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1275,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"6629:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"6629:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1284,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6629:101:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"6618:112:4"},{"assignments":[1287],"declarations":[{"constant":false,"id":1287,"name":"funding","nodeType":"VariableDeclaration","scope":1314,"src":"6740:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1286,"name":"uint","nodeType":"ElementaryTypeName","src":"6740:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1291,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1288,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1248,"src":"6755:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1289,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"funding","nodeType":"MemberAccess","referencedDeclaration":2162,"src":"6755:14:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint256_$","typeString":"function () view external returns (uint256)"}},"id":1290,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6755:16:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"6740:31:4"},{"assignments":[1293,null,1295],"declarations":[{"constant":false,"id":1293,"name":"sum","nodeType":"VariableDeclaration","scope":1314,"src":"7003:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1292,"name":"uint","nodeType":"ElementaryTypeName","src":"7003:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},null,{"constant":false,"id":1295,"name":"outcomeExpTerm","nodeType":"VariableDeclaration","scope":1314,"src":"7015:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1294,"name":"uint","nodeType":"ElementaryTypeName","src":"7015:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1305,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1297,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1274,"src":"7051:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1298,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1268,"src":"7057:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1299,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1287,"src":"7079:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":1300,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1250,"src":"7088:17:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1301,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"7107:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1302,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"EstimationMode","nodeType":"MemberAccess","referencedDeclaration":5680,"src":"7107:30:4","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":1303,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7107:39:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1296,"name":"sumExpOffset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1483,"src":"7038:12:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_uint8_$_t_enum$_EstimationMode_$5680_$returns$_t_uint256_$_t_int256_$_t_uint256_$","typeString":"function (int256,int256[] memory,uint256,uint8,enum Fixed192x64Math.EstimationMode) pure returns (uint256,int256,uint256)"}},"id":1304,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7038:109:4","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_int256_$_t_uint256_$","typeString":"tuple(uint256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"7002:145:4"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1311,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1306,"name":"outcomeExpTerm","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1295,"src":"7164:14:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1309,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1307,"name":"sum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1293,"src":"7182:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1308,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"7188:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7182:9:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":1310,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"7181:11:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7164:28:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":1254,"id":1312,"nodeType":"Return","src":"7157:35:4"}]},"documentation":"@dev Returns marginal price of an outcome\n @param market Market contract\n @param outcomeTokenIndex Index of outcome to determine marginal price of\n @return Marginal price of an outcome as a fixed point number","id":1314,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarginalPrice","nodeType":"FunctionDefinition","parameters":{"id":1251,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1248,"name":"market","nodeType":"VariableDeclaration","scope":1314,"src":"6367:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1247,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"6367:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1250,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1314,"src":"6382:23:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1249,"name":"uint8","nodeType":"ElementaryTypeName","src":"6382:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"6366:40:4"},"payable":false,"returnParameters":{"id":1254,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1253,"name":"price","nodeType":"VariableDeclaration","scope":1314,"src":"6452:10:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1252,"name":"uint","nodeType":"ElementaryTypeName","src":"6452:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6451:12:4"},"scope":1526,"src":"6340:859:4","stateMutability":"view","superFunction":1570,"visibility":"public"},{"body":{"id":1372,"nodeType":"Block","src":"7762:524:4","statements":[{"assignments":[1329,1331,null],"declarations":[{"constant":false,"id":1329,"name":"sum","nodeType":"VariableDeclaration","scope":1373,"src":"8002:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1328,"name":"uint","nodeType":"ElementaryTypeName","src":"8002:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1331,"name":"offset","nodeType":"VariableDeclaration","scope":1373,"src":"8012:10:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1330,"name":"int","nodeType":"ElementaryTypeName","src":"8012:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},null],"id":1339,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1333,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1316,"src":"8041:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1334,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1319,"src":"8047:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":1335,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1321,"src":"8069:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"hexValue":"30","id":1336,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8078:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"argumentTypes":null,"id":1337,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1323,"src":"8081:14:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"id":1332,"name":"sumExpOffset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1483,"src":"8028:12:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_array$_t_int256_$dyn_memory_ptr_$_t_uint256_$_t_uint8_$_t_enum$_EstimationMode_$5680_$returns$_t_uint256_$_t_int256_$_t_uint256_$","typeString":"function (int256,int256[] memory,uint256,uint8,enum Fixed192x64Math.EstimationMode) pure returns (uint256,int256,uint256)"}},"id":1338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8028:68:4","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_int256_$_t_uint256_$","typeString":"tuple(uint256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"8001:95:4"},{"expression":{"argumentTypes":null,"id":1346,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1340,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8106:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1343,"name":"sum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1329,"src":"8144:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":1344,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1323,"src":"8149:14:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1341,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"8118:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1342,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"binaryLog","nodeType":"MemberAccess","referencedDeclaration":6441,"src":"8118:25:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_uint256_$_t_enum$_EstimationMode_$5680_$returns$_t_int256_$","typeString":"function (uint256,enum Fixed192x64Math.EstimationMode) pure returns (int256)"}},"id":1345,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8118:46:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8106:58:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1347,"nodeType":"ExpressionStatement","src":"8106:58:4"},{"expression":{"argumentTypes":null,"id":1353,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1348,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8174:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1351,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1331,"src":"8200:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":1349,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8186:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1350,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"8186:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1352,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8186:21:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8174:33:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1354,"nodeType":"ExpressionStatement","src":"8174:33:4"},{"expression":{"argumentTypes":null,"id":1370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1355,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8217:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1367,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1321,"src":"8270:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1366,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8266:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8266:12:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1363,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1359,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":852,"src":"8248:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1358,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8244:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1360,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8244:8:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":1356,"name":"costLevel","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1326,"src":"8230:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1357,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":7033,"src":"8230:13:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1361,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8230:23:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":1362,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1316,"src":"8256:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8230:30:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":1364,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8229:32:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":7033,"src":"8229:36:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1369,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8229:50:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8217:62:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1371,"nodeType":"ExpressionStatement","src":"8217:62:4"}]},"documentation":"@dev Calculates the result of the LMSR cost function which is used to\n derive prices from the market state\n @param logN Logarithm of the number of outcomes\n @param netOutcomeTokensSold Net outcome tokens sold by market\n @param funding Initial funding for market\n @return Cost level","id":1373,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcCostLevel","nodeType":"FunctionDefinition","parameters":{"id":1324,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1316,"name":"logN","nodeType":"VariableDeclaration","scope":1373,"src":"7599:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1315,"name":"int","nodeType":"ElementaryTypeName","src":"7599:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1319,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1373,"src":"7609:26:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1317,"name":"int","nodeType":"ElementaryTypeName","src":"7609:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1318,"length":null,"nodeType":"ArrayTypeName","src":"7609:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":1321,"name":"funding","nodeType":"VariableDeclaration","scope":1373,"src":"7637:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1320,"name":"uint","nodeType":"ElementaryTypeName","src":"7637:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1323,"name":"estimationMode","nodeType":"VariableDeclaration","scope":1373,"src":"7651:45:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":1322,"name":"Fixed192x64Math.EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"7651:30:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"7598:99:4"},"payable":false,"returnParameters":{"id":1327,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1326,"name":"costLevel","nodeType":"VariableDeclaration","scope":1373,"src":"7743:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1325,"name":"int","nodeType":"ElementaryTypeName","src":"7743:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7742:15:4"},"scope":1526,"src":"7576:710:4","stateMutability":"pure","superFunction":null,"visibility":"private"},{"body":{"id":1482,"nodeType":"Block","src":"9066:1371:4","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":1402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1396,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1394,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1375,"src":"9926:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1395,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9934:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9926:9:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1398,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1380,"src":"9943:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1397,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9939:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9939:12:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":1400,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9955:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9939:17:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9926:30:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":1393,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9918:7:4","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":1403,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9918:39:4","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":1404,"nodeType":"ExpressionStatement","src":"9918:39:4"},{"expression":{"argumentTypes":null,"id":1410,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1405,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"9967:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1408,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1378,"src":"9996:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}],"expression":{"argumentTypes":null,"id":1406,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"9976:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1407,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"max","nodeType":"MemberAccess","referencedDeclaration":6667,"src":"9976:19:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$","typeString":"function (int256[] memory) pure returns (int256)"}},"id":1409,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9976:41:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9967:50:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1411,"nodeType":"ExpressionStatement","src":"9967:50:4"},{"expression":{"argumentTypes":null,"id":1421,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1412,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10027:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1415,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1375,"src":"10047:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":1413,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10036:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":7033,"src":"10036:10:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1416,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10036:16:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1418,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1380,"src":"10059:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1417,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10055:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1419,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10055:12:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"10036:31:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"10027:40:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1422,"nodeType":"ExpressionStatement","src":"10027:40:4"},{"expression":{"argumentTypes":null,"id":1428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1423,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10077:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1426,"name":"EXP_LIMIT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":855,"src":"10097:9:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":1424,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10086:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1425,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7128,"src":"10086:10:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1427,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10086:21:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"10077:30:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1429,"nodeType":"ExpressionStatement","src":"10077:30:4"},{"assignments":[],"declarations":[{"constant":false,"id":1431,"name":"term","nodeType":"VariableDeclaration","scope":1483,"src":"10117:9:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1430,"name":"uint","nodeType":"ElementaryTypeName","src":"10117:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":1432,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"10117:9:4"},{"body":{"id":1480,"nodeType":"Block","src":"10192:239:4","statements":[{"expression":{"argumentTypes":null,"id":1463,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1444,"name":"term","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1431,"src":"10206:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1459,"name":"offset","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1389,"src":"10289:6:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":1456,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1451,"name":"logN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1375,"src":"10263:4:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1447,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1378,"src":"10235:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1449,"indexExpression":{"argumentTypes":null,"id":1448,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1434,"src":"10256:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"10235:23:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1450,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":7033,"src":"10235:27:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1452,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10235:33:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1454,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1380,"src":"10275:7:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":1453,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10271:3:4","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":1455,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10271:12:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"10235:48:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":1457,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"10234:50:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1458,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7128,"src":"10234:54:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":1460,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10234:62:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":1461,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1384,"src":"10298:14:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}],"expression":{"argumentTypes":null,"id":1445,"name":"Fixed192x64Math","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6668,"src":"10213:15:4","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Fixed192x64Math_$6668_$","typeString":"type(library Fixed192x64Math)"}},"id":1446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"pow2","nodeType":"MemberAccess","referencedDeclaration":5787,"src":"10213:20:4","typeDescriptions":{"typeIdentifier":"t_function_delegatecall_pure$_t_int256_$_t_enum$_EstimationMode_$5680_$returns$_t_uint256_$","typeString":"function (int256,enum Fixed192x64Math.EstimationMode) pure returns (uint256)"}},"id":1462,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10213:100:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10206:107:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1464,"nodeType":"ExpressionStatement","src":"10206:107:4"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":1467,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1465,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1434,"src":"10331:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":1466,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1382,"src":"10336:12:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"10331:17:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":1472,"nodeType":"IfStatement","src":"10327:60:4","trueBody":{"expression":{"argumentTypes":null,"id":1470,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1468,"name":"outcomeExpTerm","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1391,"src":"10366:14:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":1469,"name":"term","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1431,"src":"10383:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10366:21:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1471,"nodeType":"ExpressionStatement","src":"10366:21:4"}},{"expression":{"argumentTypes":null,"id":1478,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1473,"name":"sum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1387,"src":"10401:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1476,"name":"term","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1431,"src":"10415:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":1474,"name":"sum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1387,"src":"10407:3:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1475,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"10407:7:4","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":1477,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10407:13:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10401:19:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":1479,"nodeType":"ExpressionStatement","src":"10401:19:4"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1440,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1437,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1434,"src":"10154:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1438,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1378,"src":"10158:20:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1439,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"10158:27:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"10154:31:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":1481,"initializationExpression":{"assignments":[1434],"declarations":[{"constant":false,"id":1434,"name":"i","nodeType":"VariableDeclaration","scope":1483,"src":"10141:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1433,"name":"uint8","nodeType":"ElementaryTypeName","src":"10141:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":1436,"initialValue":{"argumentTypes":null,"hexValue":"30","id":1435,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10151:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"10141:11:4"},"loopExpression":{"expression":{"argumentTypes":null,"id":1442,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"10187:3:4","subExpression":{"argumentTypes":null,"id":1441,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1434,"src":"10187:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":1443,"nodeType":"ExpressionStatement","src":"10187:3:4"},"nodeType":"ForStatement","src":"10136:295:4"}]},"documentation":"@dev Calculates sum(exp(q/b - offset) for q in quantities), where offset is set\n so that the sum fits in 248-256 bits\n @param logN Logarithm of the number of outcomes\n @param netOutcomeTokensSold Net outcome tokens sold by market\n @param funding Initial funding for market\n @param outcomeIndex Index of exponential term to extract (for use by marginal price function)\n @return A result structure composed of the sum, the offset used, and the summand associated with the supplied index","id":1483,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"sumExpOffset","nodeType":"FunctionDefinition","parameters":{"id":1385,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1375,"name":"logN","nodeType":"VariableDeclaration","scope":1483,"src":"8854:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1374,"name":"int","nodeType":"ElementaryTypeName","src":"8854:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1378,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":1483,"src":"8864:26:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1376,"name":"int","nodeType":"ElementaryTypeName","src":"8864:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1377,"length":null,"nodeType":"ArrayTypeName","src":"8864:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":1380,"name":"funding","nodeType":"VariableDeclaration","scope":1483,"src":"8892:12:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1379,"name":"uint","nodeType":"ElementaryTypeName","src":"8892:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1382,"name":"outcomeIndex","nodeType":"VariableDeclaration","scope":1483,"src":"8906:18:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1381,"name":"uint8","nodeType":"ElementaryTypeName","src":"8906:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1384,"name":"estimationMode","nodeType":"VariableDeclaration","scope":1483,"src":"8926:45:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":1383,"name":"Fixed192x64Math.EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"8926:30:4","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"8853:119:4"},"payable":false,"returnParameters":{"id":1392,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1387,"name":"sum","nodeType":"VariableDeclaration","scope":1483,"src":"9019:8:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1386,"name":"uint","nodeType":"ElementaryTypeName","src":"9019:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1389,"name":"offset","nodeType":"VariableDeclaration","scope":1483,"src":"9029:10:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1388,"name":"int","nodeType":"ElementaryTypeName","src":"9029:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":1391,"name":"outcomeExpTerm","nodeType":"VariableDeclaration","scope":1483,"src":"9041:19:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1390,"name":"uint","nodeType":"ElementaryTypeName","src":"9041:4:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"9018:43:4"},"scope":1526,"src":"8832:1605:4","stateMutability":"pure","superFunction":null,"visibility":"private"},{"body":{"id":1524,"nodeType":"Block","src":"11033:195:4","statements":[{"expression":{"argumentTypes":null,"id":1501,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":1491,"name":"quantities","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1489,"src":"11043:10:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":1495,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1485,"src":"11066:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1496,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"eventContract","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"11066:20:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_Event_$384_$","typeString":"function () view external returns (contract Event)"}},"id":1497,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11066:22:4","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":1498,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"11066:38:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":1499,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11066:40:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":1494,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"11056:9:4","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":1492,"name":"int","nodeType":"ElementaryTypeName","src":"11060:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1493,"length":null,"nodeType":"ArrayTypeName","src":"11060:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":1500,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11056:51:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"src":"11043:64:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1502,"nodeType":"ExpressionStatement","src":"11043:64:4"},{"body":{"expression":{"argumentTypes":null,"id":1521,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":1514,"name":"quantities","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1489,"src":"11175:10:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1516,"indexExpression":{"argumentTypes":null,"id":1515,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1504,"src":"11186:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"11175:13:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":1519,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1504,"src":"11219:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":1517,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1485,"src":"11191:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":1518,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"netOutcomeTokensSold","nodeType":"MemberAccess","referencedDeclaration":2165,"src":"11191:27:4","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_int256_$","typeString":"function (uint256) view external returns (int256)"}},"id":1520,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11191:30:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"11175:46:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1522,"nodeType":"ExpressionStatement","src":"11175:46:4"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":1510,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":1507,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1504,"src":"11135:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":1508,"name":"quantities","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1489,"src":"11139:10:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":1509,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"11139:17:4","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"11135:21:4","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":1523,"initializationExpression":{"assignments":[1504],"declarations":[{"constant":false,"id":1504,"name":"i","nodeType":"VariableDeclaration","scope":1525,"src":"11122:7:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1503,"name":"uint8","nodeType":"ElementaryTypeName","src":"11122:5:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":1506,"initialValue":{"argumentTypes":null,"hexValue":"30","id":1505,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11132:1:4","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"11122:11:4"},"loopExpression":{"expression":{"argumentTypes":null,"id":1512,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"11158:3:4","subExpression":{"argumentTypes":null,"id":1511,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":1504,"src":"11158:1:4","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":1513,"nodeType":"ExpressionStatement","src":"11158:3:4"},"nodeType":"ForStatement","src":"11117:104:4"}]},"documentation":"@dev Gets net outcome tokens sold by market. Since all sets of outcome tokens are backed by\n corresponding collateral tokens, the net quantity of a token sold by the market is the\n number of collateral tokens (which is the same as the number of outcome tokens the\n market created) subtracted by the quantity of that token held by the market.\n @param market Market contract\n @return Net outcome tokens sold by market","id":1525,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getNetOutcomeTokensSold","nodeType":"FunctionDefinition","parameters":{"id":1486,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1485,"name":"market","nodeType":"VariableDeclaration","scope":1525,"src":"10950:13:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1484,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"10950:6:4","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"}],"src":"10949:15:4"},"payable":false,"returnParameters":{"id":1490,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1489,"name":"quantities","nodeType":"VariableDeclaration","scope":1525,"src":"11011:16:4","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1487,"name":"int","nodeType":"ElementaryTypeName","src":"11011:3:4","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1488,"length":null,"nodeType":"ArrayTypeName","src":"11011:5:4","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"11010:18:4"},"scope":1526,"src":"10917:311:4","stateMutability":"view","superFunction":null,"visibility":"private"}],"scope":1527,"src":"349:10881:4"}],"src":"0:11230:4"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0xad5c33f474239d9a7da38730f5837e7c7db3cb98","transactionHash":"0xa3f88100fea3ee1aa25e1fd9d6179851c306af618b1cd8f8546a3ecff5dc69f0"},"3":{"address":"0xe7d655d64f43f9eb8fe6f2193ced87578910b8aa","transactionHash":"0x1b1045ba57ec05ab2e40d010b53a3c66fa24d46f7ee324b7a12c6023dfe73664"},"4":{"address":"0x137a20882b7e66955a29ff3d16675f27bc5a4752","transactionHash":"0xb03d7d8037fe2b6f0cb41e3ec6cdce8d758e910086b4b4b43820666841836773"},"42":{"address":"0x235a12029e6366f649c4a4a817a2fbc5a79aa532","transactionHash":"0xb4e53e669700ed541f09bf5a728768d7094325f10c811d7eba1ff1912b88e851"},"437894314312":{"address":"0x254dffcd3277c0b1660f6d42efbb754edababc2b","transactionHash":"0xdb9a94a5238bd36f707497474f6e36a2f222d3c8443f29eb2c8ecb6a39c9b969"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:42.535Z"}; /***/ }), @@ -297,10 +483,21 @@ module.exports = {"contract_name":"LMSRMarketMaker","abi":[{"constant":true,"inp /*!**********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracle.json ***! \**********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"MajorityOracle","abi":[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"oracles","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"getStatusAndOutcome","outputs":[{"name":"outcomeSet","type":"bool"},{"name":"outcome","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[{"name":"_oracles","type":"address[]"}],"payable":false,"type":"constructor"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263311}; +module.exports = {"contractName":"MajorityOracle","abi":[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"oracles","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":"getStatusAndOutcome","outputs":[{"name":"outcomeSet","type":"bool"},{"name":"outcome","type":"int256"}],"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":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50610633806100206000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635b69a7d8146100725780636bcc035a146100df5780637e7e4b4714610115578063a619486e14610140578063ccdf68f314610197575b600080fd5b34801561007e57600080fd5b5061009d600480360381019080803590602001909291905050506101c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100eb57600080fd5b506100f4610204565b60405180831515151581526020018281526020019250505060405180910390f35b34801561012157600080fd5b5061012a6105b8565b6040518082815260200191505060405180910390f35b34801561014c57600080fd5b506101556105cd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6105f2565b604051808215151515815260200191505060405180910390f35b6001818154811015156101d557fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006060806000806000806001805490506040519080825280602002602001820160405280156102465781602001602082028038833980820191505090505b50955060018054905060405190808252806020026020018201604052801561027d5781602001602082028038833980820191505090505b509450600096505b60018054905087101561051a576001878154811015156102a157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561032f57600080fd5b505af1158015610343573d6000803e3d6000fd5b505050506040513d602081101561035957600080fd5b81019080805190602001909291905050501561050d5760018781548110151561037e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561040c57600080fd5b505af1158015610420573d6000803e3d6000fd5b505050506040513d602081101561043657600080fd5b81019080805190602001909291905050509350600092505b868311151561050c57858381518110151561046557fe5b9060200190602002015184141561049f576001858481518110151561048657fe5b906020019060200201818151019150818152505061050c565b600085848151811015156104af57fe5b9060200190602002015114156104ff578386848151811015156104ce57fe5b9060200190602002018181525050600185848151811015156104ec57fe5b906020019060200201818152505061050c565b828060010193505061044e565b5b8680600101975050610285565b6000915060009050600096505b60018054905087101561057e5781858881518110151561054357fe5b90602001906020020151111561057157848781518110151561056157fe5b9060200190602002015191508690505b8680600101975050610527565b6001805490506002830211156105ad576001985085818151811015156105a057fe5b9060200190602002015197505b505050505050509091565b6000806105c3610204565b9150508091505090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806105fd610204565b50905080915050905600a165627a7a723058202203390b6f59c3ae400548707da758f182bdbec12d8cf8ee556059fc44399c500029","deployedBytecode":"0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635b69a7d8146100725780636bcc035a146100df5780637e7e4b4714610115578063a619486e14610140578063ccdf68f314610197575b600080fd5b34801561007e57600080fd5b5061009d600480360381019080803590602001909291905050506101c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100eb57600080fd5b506100f4610204565b60405180831515151581526020018281526020019250505060405180910390f35b34801561012157600080fd5b5061012a6105b8565b6040518082815260200191505060405180910390f35b34801561014c57600080fd5b506101556105cd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6105f2565b604051808215151515815260200191505060405180910390f35b6001818154811015156101d557fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006060806000806000806001805490506040519080825280602002602001820160405280156102465781602001602082028038833980820191505090505b50955060018054905060405190808252806020026020018201604052801561027d5781602001602082028038833980820191505090505b509450600096505b60018054905087101561051a576001878154811015156102a157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561032f57600080fd5b505af1158015610343573d6000803e3d6000fd5b505050506040513d602081101561035957600080fd5b81019080805190602001909291905050501561050d5760018781548110151561037e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561040c57600080fd5b505af1158015610420573d6000803e3d6000fd5b505050506040513d602081101561043657600080fd5b81019080805190602001909291905050509350600092505b868311151561050c57858381518110151561046557fe5b9060200190602002015184141561049f576001858481518110151561048657fe5b906020019060200201818151019150818152505061050c565b600085848151811015156104af57fe5b9060200190602002015114156104ff578386848151811015156104ce57fe5b9060200190602002018181525050600185848151811015156104ec57fe5b906020019060200201818152505061050c565b828060010193505061044e565b5b8680600101975050610285565b6000915060009050600096505b60018054905087101561057e5781858881518110151561054357fe5b90602001906020020151111561057157848781518110151561056157fe5b9060200190602002015191508690505b8680600101975050610527565b6001805490506002830211156105ad576001985085818151811015156105a057fe5b9060200190602002015197505b505050505050509091565b6000806105c3610204565b9150508091505090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806105fd610204565b50905080915050905600a165627a7a723058202203390b6f59c3ae400548707da758f182bdbec12d8cf8ee556059fc44399c500029","sourceMap":"946:1972:20:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;946:1972:20;;;;;;;","deployedSourceMap":"946:1972:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;181:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;181:23:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1173:1255;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1173:1255:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2746:170;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2746:170:20;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;2513:166:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2513:166:20;;;;;;;;;;;;;;;;;;;;;;;;;;;181:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1173:1255::-;1249:15;1266:11;1293:6;1309:21;1368:25;1530:12;1591:6;1984:23;2021:17;1343:7;:14;;;;1333:25;;;;;;;;;;;;;;;;;;;;;;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;1333:25:20;;;;1309:49;;1407:7;:14;;;;1396:26;;;;;;;;;;;;;;;;;;;;;;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;1396:26:20;;;;1368:54;;1441:1;1437:5;;1432:543;1448:7;:14;;;;1444:1;:18;1432:543;;;1485:7;1493:1;1485:10;;;;;;;;;;;;;;;;;;;;;;;;;;;:23;;;:25;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1485:25:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1485:25:20;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1485:25:20;;;;;;;;;;;;;;;;1481:494;;;1545:7;1553:1;1545:10;;;;;;;;;;;;;;;;;;;;;;;;;;;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1545:23:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1545:23:20;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1545:23:20;;;;;;;;;;;;;;;;1530:38;;1600:1;1591:10;;1586:375;1608:1;1603;:6;;1586:375;;;1652:8;1661:1;1652:11;;;;;;;;;;;;;;;;;;1640:8;:23;1636:325;;;1709:1;1691:11;1703:1;1691:14;;;;;;;;;;;;;;;;;:19;;;;;;;;;;;1736:5;;1636:325;1812:1;1794:11;1806:1;1794:14;;;;;;;;;;;;;;;;;;:19;1790:171;;;1855:8;1841;1850:1;1841:11;;;;;;;;;;;;;;;;;:22;;;;;1906:1;1889:11;1901:1;1889:14;;;;;;;;;;;;;;;;;:18;;;;;1933:5;;1790:171;1611:3;;;;;;;1586:375;;;1481:494;1464:3;;;;;;;1432:543;;;2010:1;1984:27;;2041:1;2021:21;;2061:1;2057:5;;2052:192;2068:7;:14;;;;2064:1;:18;2052:192;;;2122:18;2105:11;2117:1;2105:14;;;;;;;;;;;;;;;;;;:35;2101:143;;;2181:11;2193:1;2181:14;;;;;;;;;;;;;;;;;;2160:35;;2228:1;2213:16;;2101:143;2084:3;;;;;;;2052:192;;;2318:7;:14;;;;2314:1;2293:18;:22;:39;2289:133;;;2361:4;2348:17;;2389:8;2398:12;2389:22;;;;;;;;;;;;;;;;;;2379:32;;2289:133;1173:1255;;;;;;;;;:::o;2746:170::-;2813:3;2835:18;2857:21;:19;:21::i;:::-;2832:46;;;2895:14;2888:21;;2746:170;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;2513:166:20:-;2582:4;2603:15;2624:21;:19;:21::i;:::-;2602:43;;;2662:10;2655:17;;2513:166;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract MajorityOracleData {\n\n /*\n * Storage\n */\n Oracle[] public oracles;\n}\n\ncontract MajorityOracleProxy is Proxy, MajorityOracleData {\n\n /// @dev Allows to create an oracle for a majority vote based on other oracles\n /// @param _oracles List of oracles taking part in the majority vote\n constructor(address proxied, Oracle[] _oracles)\n Proxy(proxied)\n public\n {\n // At least 2 oracles should be defined\n require(_oracles.length > 2);\n for (uint i = 0; i < _oracles.length; i++)\n // Oracle address cannot be null\n require(address(_oracles[i]) != 0);\n oracles = _oracles;\n }\n}\n\n/// @title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n/// @author Stefan George - \ncontract MajorityOracle is Proxied, Oracle, MajorityOracleData {\n\n /*\n * Public functions\n */\n /// @dev Allows to registers oracles for a majority vote\n /// @return Is outcome set?\n /// @return Outcome\n function getStatusAndOutcome()\n public\n view\n returns (bool outcomeSet, int outcome)\n {\n uint i;\n int[] memory outcomes = new int[](oracles.length);\n uint[] memory validations = new uint[](oracles.length);\n for (i = 0; i < oracles.length; i++)\n if (oracles[i].isOutcomeSet()) {\n int _outcome = oracles[i].getOutcome();\n for (uint j = 0; j <= i; j++)\n if (_outcome == outcomes[j]) {\n validations[j] += 1;\n break;\n }\n else if (validations[j] == 0) {\n outcomes[j] = _outcome;\n validations[j] = 1;\n break;\n }\n }\n uint outcomeValidations = 0;\n uint outcomeIndex = 0;\n for (i = 0; i < oracles.length; i++)\n if (validations[i] > outcomeValidations) {\n outcomeValidations = validations[i];\n outcomeIndex = i;\n }\n // There is a majority vote\n if (outcomeValidations * 2 > oracles.length) {\n outcomeSet = true;\n outcome = outcomes[outcomeIndex];\n }\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n (bool outcomeSet, ) = getStatusAndOutcome();\n return outcomeSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n (, int winningOutcome) = getStatusAndOutcome();\n return winningOutcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","exportedSymbols":{"MajorityOracle":[4652],"MajorityOracleData":[4409],"MajorityOracleProxy":[4459]},"id":4653,"nodeType":"SourceUnit","nodes":[{"id":4403,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:20"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4404,"nodeType":"ImportDirective","scope":4653,"sourceUnit":4718,"src":"25:31:20","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4405,"nodeType":"ImportDirective","scope":4653,"sourceUnit":6702,"src":"57:55:20","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4409,"linearizedBaseContracts":[4409],"name":"MajorityOracleData","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":4408,"name":"oracles","nodeType":"VariableDeclaration","scope":4409,"src":"181:23:20","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4406,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"181:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4407,"length":null,"nodeType":"ArrayTypeName","src":"181:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"public"}],"scope":4653,"src":"115:92:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4410,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"241:5:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4411,"nodeType":"InheritanceSpecifier","src":"241:5:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4412,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"248:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4413,"nodeType":"InheritanceSpecifier","src":"248:18:20"}],"contractDependencies":[4409,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4459,"linearizedBaseContracts":[4459,4409,6701,6673],"name":"MajorityOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4457,"nodeType":"Block","src":"520:265:20","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4425,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"586:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4426,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"586:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4427,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"604:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"586:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4424,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"578:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4429,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"578:28:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4430,"nodeType":"ExpressionStatement","src":"578:28:20"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4449,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4444,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"732:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4446,"indexExpression":{"argumentTypes":null,"id":4445,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"741:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"732:11:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":4443,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"724:7:20","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"724:20:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4448,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"748:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"724:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4442,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"716:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4450,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"716:34:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4451,"nodeType":"ExpressionStatement","src":"716:34:20"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4435,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"633:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4436,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"637:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"637:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"633:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4452,"initializationExpression":{"assignments":[4432],"declarations":[{"constant":false,"id":4432,"name":"i","nodeType":"VariableDeclaration","scope":4458,"src":"621:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4431,"name":"uint","nodeType":"ElementaryTypeName","src":"621:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4434,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4433,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"630:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"621:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4440,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"654:3:20","subExpression":{"argumentTypes":null,"id":4439,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"654:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4441,"nodeType":"ExpressionStatement","src":"654:3:20"},"nodeType":"ForStatement","src":"616:134:20"},{"expression":{"argumentTypes":null,"id":4455,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4453,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"760:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4454,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"770:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"src":"760:18:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4456,"nodeType":"ExpressionStatement","src":"760:18:20"}]},"documentation":"@dev Allows to create an oracle for a majority vote based on other oracles\n @param _oracles List of oracles taking part in the majority vote","id":4458,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4421,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4415,"src":"492:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4422,"modifierName":{"argumentTypes":null,"id":4420,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"486:5:20","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"486:14:20"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4419,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4415,"name":"proxied","nodeType":"VariableDeclaration","scope":4458,"src":"442:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4414,"name":"address","nodeType":"ElementaryTypeName","src":"442:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4418,"name":"_oracles","nodeType":"VariableDeclaration","scope":4458,"src":"459:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4416,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"459:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4417,"length":null,"nodeType":"ArrayTypeName","src":"459:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"441:36:20"},"payable":false,"returnParameters":{"id":4423,"nodeType":"ParameterList","parameters":[],"src":"520:0:20"},"scope":4459,"src":"430:355:20","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4653,"src":"209:578:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4460,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"973:7:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4461,"nodeType":"InheritanceSpecifier","src":"973:7:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4462,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"982:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4463,"nodeType":"InheritanceSpecifier","src":"982:6:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4464,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"990:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4465,"nodeType":"InheritanceSpecifier","src":"990:18:20"}],"contractDependencies":[4409,4717,6673],"contractKind":"contract","documentation":"@title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n @author Stefan George - ","fullyImplemented":true,"id":4652,"linearizedBaseContracts":[4652,4409,4717,6673],"name":"MajorityOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4624,"nodeType":"Block","src":"1283:1145:20","statements":[{"assignments":[],"declarations":[{"constant":false,"id":4473,"name":"i","nodeType":"VariableDeclaration","scope":4625,"src":"1293:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4472,"name":"uint","nodeType":"ElementaryTypeName","src":"1293:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4474,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"1293:6:20"},{"assignments":[4478],"declarations":[{"constant":false,"id":4478,"name":"outcomes","nodeType":"VariableDeclaration","scope":4625,"src":"1309:21:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":4476,"name":"int","nodeType":"ElementaryTypeName","src":"1309:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4477,"length":null,"nodeType":"ArrayTypeName","src":"1309:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":4485,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4482,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1343:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4483,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1343:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4481,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1333:9:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":4479,"name":"int","nodeType":"ElementaryTypeName","src":"1337:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4480,"length":null,"nodeType":"ArrayTypeName","src":"1337:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":4484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1333:25:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1309:49:20"},{"assignments":[4489],"declarations":[{"constant":false,"id":4489,"name":"validations","nodeType":"VariableDeclaration","scope":4625,"src":"1368:25:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":4487,"name":"uint","nodeType":"ElementaryTypeName","src":"1368:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4488,"length":null,"nodeType":"ArrayTypeName","src":"1368:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"id":4496,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4493,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1407:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4494,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1407:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4492,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1396:10:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":4490,"name":"uint","nodeType":"ElementaryTypeName","src":"1400:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4491,"length":null,"nodeType":"ArrayTypeName","src":"1400:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":4495,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1396:26:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1368:54:20"},{"body":{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4508,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1485:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4510,"indexExpression":{"argumentTypes":null,"id":4509,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1493:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1485:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"1485:23:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4512,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1485:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4567,"nodeType":"IfStatement","src":"1481:494:20","trueBody":{"id":4566,"nodeType":"Block","src":"1512:463:20","statements":[{"assignments":[4514],"declarations":[{"constant":false,"id":4514,"name":"_outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1530:12:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4513,"name":"int","nodeType":"ElementaryTypeName","src":"1530:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4520,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4515,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1545:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4517,"indexExpression":{"argumentTypes":null,"id":4516,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1553:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1545:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4518,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"1545:21:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":4519,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1545:23:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1530:38:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":4535,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4531,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1640:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4532,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1652:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4534,"indexExpression":{"argumentTypes":null,"id":4533,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1661:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1652:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1640:23:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4548,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4544,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1794:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4546,"indexExpression":{"argumentTypes":null,"id":4545,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1806:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4547,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1812:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1794:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4563,"nodeType":"IfStatement","src":"1790:171:20","trueBody":{"id":4562,"nodeType":"Block","src":"1815:146:20","statements":[{"expression":{"argumentTypes":null,"id":4553,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4549,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1841:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4551,"indexExpression":{"argumentTypes":null,"id":4550,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1850:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1841:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4552,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1855:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1841:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4554,"nodeType":"ExpressionStatement","src":"1841:22:20"},{"expression":{"argumentTypes":null,"id":4559,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4555,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1889:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4557,"indexExpression":{"argumentTypes":null,"id":4556,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1901:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1889:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1906:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1889:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4560,"nodeType":"ExpressionStatement","src":"1889:18:20"},{"id":4561,"nodeType":"Break","src":"1933:5:20"}]}},"id":4564,"nodeType":"IfStatement","src":"1636:325:20","trueBody":{"id":4543,"nodeType":"Block","src":"1665:99:20","statements":[{"expression":{"argumentTypes":null,"id":4540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4536,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1691:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4538,"indexExpression":{"argumentTypes":null,"id":4537,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1703:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1691:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1709:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1691:19:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4541,"nodeType":"ExpressionStatement","src":"1691:19:20"},{"id":4542,"nodeType":"Break","src":"1736:5:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4525,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1603:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":4526,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1608:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1603:6:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4565,"initializationExpression":{"assignments":[4522],"declarations":[{"constant":false,"id":4522,"name":"j","nodeType":"VariableDeclaration","scope":4625,"src":"1591:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4521,"name":"uint","nodeType":"ElementaryTypeName","src":"1591:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4524,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4523,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1600:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1591:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1611:3:20","subExpression":{"argumentTypes":null,"id":4528,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1611:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4530,"nodeType":"ExpressionStatement","src":"1611:3:20"},"nodeType":"ForStatement","src":"1586:375:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4501,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1444:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4502,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1448:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4503,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1448:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1444:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4568,"initializationExpression":{"expression":{"argumentTypes":null,"id":4499,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4497,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1437:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4498,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1441:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1437:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4500,"nodeType":"ExpressionStatement","src":"1437:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4506,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1464:3:20","subExpression":{"argumentTypes":null,"id":4505,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1464:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4507,"nodeType":"ExpressionStatement","src":"1464:3:20"},"nodeType":"ForStatement","src":"1432:543:20"},{"assignments":[4570],"declarations":[{"constant":false,"id":4570,"name":"outcomeValidations","nodeType":"VariableDeclaration","scope":4625,"src":"1984:23:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4569,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4572,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4571,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2010:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1984:27:20"},{"assignments":[4574],"declarations":[{"constant":false,"id":4574,"name":"outcomeIndex","nodeType":"VariableDeclaration","scope":4625,"src":"2021:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4573,"name":"uint","nodeType":"ElementaryTypeName","src":"2021:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4576,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4575,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2041:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2021:21:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4592,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4588,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2105:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4590,"indexExpression":{"argumentTypes":null,"id":4589,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2117:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2105:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4591,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2122:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2105:35:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4604,"nodeType":"IfStatement","src":"2101:143:20","trueBody":{"id":4603,"nodeType":"Block","src":"2142:102:20","statements":[{"expression":{"argumentTypes":null,"id":4597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4593,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2160:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4594,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2181:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4596,"indexExpression":{"argumentTypes":null,"id":4595,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2193:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2181:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2160:35:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4598,"nodeType":"ExpressionStatement","src":"2160:35:20"},{"expression":{"argumentTypes":null,"id":4601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4599,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2213:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4600,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2228:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2213:16:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4602,"nodeType":"ExpressionStatement","src":"2213:16:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4581,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2064:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4582,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2068:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4583,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2068:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2064:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4605,"initializationExpression":{"expression":{"argumentTypes":null,"id":4579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4577,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2057:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4578,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2061:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2057:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4580,"nodeType":"ExpressionStatement","src":"2057:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2084:3:20","subExpression":{"argumentTypes":null,"id":4585,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2084:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4587,"nodeType":"ExpressionStatement","src":"2084:3:20"},"nodeType":"ForStatement","src":"2052:192:20"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4608,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4606,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2293:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4607,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2314:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2293:22:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4609,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2318:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4610,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2318:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2293:39:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4623,"nodeType":"IfStatement","src":"2289:133:20","trueBody":{"id":4622,"nodeType":"Block","src":"2334:88:20","statements":[{"expression":{"argumentTypes":null,"id":4614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4612,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4468,"src":"2348:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2361:4:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2348:17:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4615,"nodeType":"ExpressionStatement","src":"2348:17:20"},{"expression":{"argumentTypes":null,"id":4620,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4616,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4470,"src":"2379:7:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4617,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"2389:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4619,"indexExpression":{"argumentTypes":null,"id":4618,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2398:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2389:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2379:32:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4621,"nodeType":"ExpressionStatement","src":"2379:32:20"}]}}]},"documentation":"@dev Allows to registers oracles for a majority vote\n @return Is outcome set?\n @return Outcome","id":4625,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getStatusAndOutcome","nodeType":"FunctionDefinition","parameters":{"id":4466,"nodeType":"ParameterList","parameters":[],"src":"1201:2:20"},"payable":false,"returnParameters":{"id":4471,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4468,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4625,"src":"1249:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4467,"name":"bool","nodeType":"ElementaryTypeName","src":"1249:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},{"constant":false,"id":4470,"name":"outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1266:11:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4469,"name":"int","nodeType":"ElementaryTypeName","src":"1266:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1248:30:20"},"scope":4652,"src":"1173:1255:20","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":4637,"nodeType":"Block","src":"2592:87:20","statements":[{"assignments":[4631,null],"declarations":[{"constant":false,"id":4631,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4638,"src":"2603:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4630,"name":"bool","nodeType":"ElementaryTypeName","src":"2603:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},null],"id":4634,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4632,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2624:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2624:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2602:43:20"},{"expression":{"argumentTypes":null,"id":4635,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4631,"src":"2662:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4629,"id":4636,"nodeType":"Return","src":"2655:17:20"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4638,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4626,"nodeType":"ParameterList","parameters":[],"src":"2534:2:20"},"payable":false,"returnParameters":{"id":4629,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4628,"name":"","nodeType":"VariableDeclaration","scope":4638,"src":"2582:4:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4627,"name":"bool","nodeType":"ElementaryTypeName","src":"2582:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2581:6:20"},"scope":4652,"src":"2513:166:20","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4650,"nodeType":"Block","src":"2822:94:20","statements":[{"assignments":[null,4644],"declarations":[null,{"constant":false,"id":4644,"name":"winningOutcome","nodeType":"VariableDeclaration","scope":4651,"src":"2835:18:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4643,"name":"int","nodeType":"ElementaryTypeName","src":"2835:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4647,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4645,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2857:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4646,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2857:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2832:46:20"},{"expression":{"argumentTypes":null,"id":4648,"name":"winningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4644,"src":"2895:14:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4642,"id":4649,"nodeType":"Return","src":"2888:21:20"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4651,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4639,"nodeType":"ParameterList","parameters":[],"src":"2765:2:20"},"payable":false,"returnParameters":{"id":4642,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4641,"name":"","nodeType":"VariableDeclaration","scope":4651,"src":"2813:3:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4640,"name":"int","nodeType":"ElementaryTypeName","src":"2813:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2812:5:20"},"scope":4652,"src":"2746:170:20","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4653,"src":"946:1972:20"}],"src":"0:2919:20"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","exportedSymbols":{"MajorityOracle":[4652],"MajorityOracleData":[4409],"MajorityOracleProxy":[4459]},"id":4653,"nodeType":"SourceUnit","nodes":[{"id":4403,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:20"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4404,"nodeType":"ImportDirective","scope":4653,"sourceUnit":4718,"src":"25:31:20","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4405,"nodeType":"ImportDirective","scope":4653,"sourceUnit":6702,"src":"57:55:20","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4409,"linearizedBaseContracts":[4409],"name":"MajorityOracleData","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":4408,"name":"oracles","nodeType":"VariableDeclaration","scope":4409,"src":"181:23:20","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4406,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"181:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4407,"length":null,"nodeType":"ArrayTypeName","src":"181:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"public"}],"scope":4653,"src":"115:92:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4410,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"241:5:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4411,"nodeType":"InheritanceSpecifier","src":"241:5:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4412,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"248:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4413,"nodeType":"InheritanceSpecifier","src":"248:18:20"}],"contractDependencies":[4409,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4459,"linearizedBaseContracts":[4459,4409,6701,6673],"name":"MajorityOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4457,"nodeType":"Block","src":"520:265:20","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4425,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"586:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4426,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"586:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4427,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"604:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"586:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4424,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"578:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4429,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"578:28:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4430,"nodeType":"ExpressionStatement","src":"578:28:20"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4449,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4444,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"732:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4446,"indexExpression":{"argumentTypes":null,"id":4445,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"741:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"732:11:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":4443,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"724:7:20","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"724:20:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4448,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"748:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"724:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4442,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"716:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4450,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"716:34:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4451,"nodeType":"ExpressionStatement","src":"716:34:20"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4435,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"633:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4436,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"637:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"637:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"633:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4452,"initializationExpression":{"assignments":[4432],"declarations":[{"constant":false,"id":4432,"name":"i","nodeType":"VariableDeclaration","scope":4458,"src":"621:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4431,"name":"uint","nodeType":"ElementaryTypeName","src":"621:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4434,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4433,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"630:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"621:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4440,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"654:3:20","subExpression":{"argumentTypes":null,"id":4439,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"654:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4441,"nodeType":"ExpressionStatement","src":"654:3:20"},"nodeType":"ForStatement","src":"616:134:20"},{"expression":{"argumentTypes":null,"id":4455,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4453,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"760:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4454,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"770:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"src":"760:18:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4456,"nodeType":"ExpressionStatement","src":"760:18:20"}]},"documentation":"@dev Allows to create an oracle for a majority vote based on other oracles\n @param _oracles List of oracles taking part in the majority vote","id":4458,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4421,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4415,"src":"492:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4422,"modifierName":{"argumentTypes":null,"id":4420,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"486:5:20","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"486:14:20"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4419,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4415,"name":"proxied","nodeType":"VariableDeclaration","scope":4458,"src":"442:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4414,"name":"address","nodeType":"ElementaryTypeName","src":"442:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4418,"name":"_oracles","nodeType":"VariableDeclaration","scope":4458,"src":"459:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4416,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"459:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4417,"length":null,"nodeType":"ArrayTypeName","src":"459:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"441:36:20"},"payable":false,"returnParameters":{"id":4423,"nodeType":"ParameterList","parameters":[],"src":"520:0:20"},"scope":4459,"src":"430:355:20","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4653,"src":"209:578:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4460,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"973:7:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4461,"nodeType":"InheritanceSpecifier","src":"973:7:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4462,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"982:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4463,"nodeType":"InheritanceSpecifier","src":"982:6:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4464,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"990:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4465,"nodeType":"InheritanceSpecifier","src":"990:18:20"}],"contractDependencies":[4409,4717,6673],"contractKind":"contract","documentation":"@title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n @author Stefan George - ","fullyImplemented":true,"id":4652,"linearizedBaseContracts":[4652,4409,4717,6673],"name":"MajorityOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4624,"nodeType":"Block","src":"1283:1145:20","statements":[{"assignments":[],"declarations":[{"constant":false,"id":4473,"name":"i","nodeType":"VariableDeclaration","scope":4625,"src":"1293:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4472,"name":"uint","nodeType":"ElementaryTypeName","src":"1293:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4474,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"1293:6:20"},{"assignments":[4478],"declarations":[{"constant":false,"id":4478,"name":"outcomes","nodeType":"VariableDeclaration","scope":4625,"src":"1309:21:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":4476,"name":"int","nodeType":"ElementaryTypeName","src":"1309:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4477,"length":null,"nodeType":"ArrayTypeName","src":"1309:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":4485,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4482,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1343:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4483,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1343:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4481,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1333:9:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":4479,"name":"int","nodeType":"ElementaryTypeName","src":"1337:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4480,"length":null,"nodeType":"ArrayTypeName","src":"1337:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":4484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1333:25:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1309:49:20"},{"assignments":[4489],"declarations":[{"constant":false,"id":4489,"name":"validations","nodeType":"VariableDeclaration","scope":4625,"src":"1368:25:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":4487,"name":"uint","nodeType":"ElementaryTypeName","src":"1368:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4488,"length":null,"nodeType":"ArrayTypeName","src":"1368:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"id":4496,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4493,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1407:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4494,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1407:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4492,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1396:10:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":4490,"name":"uint","nodeType":"ElementaryTypeName","src":"1400:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4491,"length":null,"nodeType":"ArrayTypeName","src":"1400:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":4495,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1396:26:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1368:54:20"},{"body":{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4508,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1485:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4510,"indexExpression":{"argumentTypes":null,"id":4509,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1493:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1485:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"1485:23:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4512,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1485:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4567,"nodeType":"IfStatement","src":"1481:494:20","trueBody":{"id":4566,"nodeType":"Block","src":"1512:463:20","statements":[{"assignments":[4514],"declarations":[{"constant":false,"id":4514,"name":"_outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1530:12:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4513,"name":"int","nodeType":"ElementaryTypeName","src":"1530:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4520,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4515,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1545:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4517,"indexExpression":{"argumentTypes":null,"id":4516,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1553:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1545:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4518,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"1545:21:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":4519,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1545:23:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1530:38:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":4535,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4531,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1640:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4532,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1652:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4534,"indexExpression":{"argumentTypes":null,"id":4533,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1661:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1652:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1640:23:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4548,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4544,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1794:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4546,"indexExpression":{"argumentTypes":null,"id":4545,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1806:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4547,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1812:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1794:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4563,"nodeType":"IfStatement","src":"1790:171:20","trueBody":{"id":4562,"nodeType":"Block","src":"1815:146:20","statements":[{"expression":{"argumentTypes":null,"id":4553,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4549,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1841:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4551,"indexExpression":{"argumentTypes":null,"id":4550,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1850:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1841:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4552,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1855:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1841:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4554,"nodeType":"ExpressionStatement","src":"1841:22:20"},{"expression":{"argumentTypes":null,"id":4559,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4555,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1889:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4557,"indexExpression":{"argumentTypes":null,"id":4556,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1901:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1889:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1906:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1889:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4560,"nodeType":"ExpressionStatement","src":"1889:18:20"},{"id":4561,"nodeType":"Break","src":"1933:5:20"}]}},"id":4564,"nodeType":"IfStatement","src":"1636:325:20","trueBody":{"id":4543,"nodeType":"Block","src":"1665:99:20","statements":[{"expression":{"argumentTypes":null,"id":4540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4536,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1691:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4538,"indexExpression":{"argumentTypes":null,"id":4537,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1703:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1691:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1709:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1691:19:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4541,"nodeType":"ExpressionStatement","src":"1691:19:20"},{"id":4542,"nodeType":"Break","src":"1736:5:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4525,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1603:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":4526,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1608:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1603:6:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4565,"initializationExpression":{"assignments":[4522],"declarations":[{"constant":false,"id":4522,"name":"j","nodeType":"VariableDeclaration","scope":4625,"src":"1591:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4521,"name":"uint","nodeType":"ElementaryTypeName","src":"1591:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4524,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4523,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1600:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1591:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1611:3:20","subExpression":{"argumentTypes":null,"id":4528,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1611:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4530,"nodeType":"ExpressionStatement","src":"1611:3:20"},"nodeType":"ForStatement","src":"1586:375:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4501,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1444:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4502,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1448:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4503,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1448:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1444:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4568,"initializationExpression":{"expression":{"argumentTypes":null,"id":4499,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4497,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1437:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4498,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1441:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1437:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4500,"nodeType":"ExpressionStatement","src":"1437:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4506,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1464:3:20","subExpression":{"argumentTypes":null,"id":4505,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1464:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4507,"nodeType":"ExpressionStatement","src":"1464:3:20"},"nodeType":"ForStatement","src":"1432:543:20"},{"assignments":[4570],"declarations":[{"constant":false,"id":4570,"name":"outcomeValidations","nodeType":"VariableDeclaration","scope":4625,"src":"1984:23:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4569,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4572,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4571,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2010:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1984:27:20"},{"assignments":[4574],"declarations":[{"constant":false,"id":4574,"name":"outcomeIndex","nodeType":"VariableDeclaration","scope":4625,"src":"2021:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4573,"name":"uint","nodeType":"ElementaryTypeName","src":"2021:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4576,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4575,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2041:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2021:21:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4592,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4588,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2105:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4590,"indexExpression":{"argumentTypes":null,"id":4589,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2117:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2105:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4591,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2122:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2105:35:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4604,"nodeType":"IfStatement","src":"2101:143:20","trueBody":{"id":4603,"nodeType":"Block","src":"2142:102:20","statements":[{"expression":{"argumentTypes":null,"id":4597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4593,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2160:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4594,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2181:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4596,"indexExpression":{"argumentTypes":null,"id":4595,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2193:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2181:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2160:35:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4598,"nodeType":"ExpressionStatement","src":"2160:35:20"},{"expression":{"argumentTypes":null,"id":4601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4599,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2213:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4600,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2228:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2213:16:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4602,"nodeType":"ExpressionStatement","src":"2213:16:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4581,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2064:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4582,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2068:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4583,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2068:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2064:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4605,"initializationExpression":{"expression":{"argumentTypes":null,"id":4579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4577,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2057:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4578,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2061:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2057:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4580,"nodeType":"ExpressionStatement","src":"2057:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2084:3:20","subExpression":{"argumentTypes":null,"id":4585,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2084:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4587,"nodeType":"ExpressionStatement","src":"2084:3:20"},"nodeType":"ForStatement","src":"2052:192:20"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4608,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4606,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2293:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4607,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2314:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2293:22:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4609,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2318:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4610,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2318:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2293:39:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4623,"nodeType":"IfStatement","src":"2289:133:20","trueBody":{"id":4622,"nodeType":"Block","src":"2334:88:20","statements":[{"expression":{"argumentTypes":null,"id":4614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4612,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4468,"src":"2348:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2361:4:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2348:17:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4615,"nodeType":"ExpressionStatement","src":"2348:17:20"},{"expression":{"argumentTypes":null,"id":4620,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4616,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4470,"src":"2379:7:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4617,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"2389:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4619,"indexExpression":{"argumentTypes":null,"id":4618,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2398:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2389:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2379:32:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4621,"nodeType":"ExpressionStatement","src":"2379:32:20"}]}}]},"documentation":"@dev Allows to registers oracles for a majority vote\n @return Is outcome set?\n @return Outcome","id":4625,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getStatusAndOutcome","nodeType":"FunctionDefinition","parameters":{"id":4466,"nodeType":"ParameterList","parameters":[],"src":"1201:2:20"},"payable":false,"returnParameters":{"id":4471,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4468,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4625,"src":"1249:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4467,"name":"bool","nodeType":"ElementaryTypeName","src":"1249:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},{"constant":false,"id":4470,"name":"outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1266:11:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4469,"name":"int","nodeType":"ElementaryTypeName","src":"1266:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1248:30:20"},"scope":4652,"src":"1173:1255:20","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":4637,"nodeType":"Block","src":"2592:87:20","statements":[{"assignments":[4631,null],"declarations":[{"constant":false,"id":4631,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4638,"src":"2603:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4630,"name":"bool","nodeType":"ElementaryTypeName","src":"2603:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},null],"id":4634,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4632,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2624:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2624:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2602:43:20"},{"expression":{"argumentTypes":null,"id":4635,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4631,"src":"2662:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4629,"id":4636,"nodeType":"Return","src":"2655:17:20"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4638,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4626,"nodeType":"ParameterList","parameters":[],"src":"2534:2:20"},"payable":false,"returnParameters":{"id":4629,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4628,"name":"","nodeType":"VariableDeclaration","scope":4638,"src":"2582:4:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4627,"name":"bool","nodeType":"ElementaryTypeName","src":"2582:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2581:6:20"},"scope":4652,"src":"2513:166:20","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4650,"nodeType":"Block","src":"2822:94:20","statements":[{"assignments":[null,4644],"declarations":[null,{"constant":false,"id":4644,"name":"winningOutcome","nodeType":"VariableDeclaration","scope":4651,"src":"2835:18:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4643,"name":"int","nodeType":"ElementaryTypeName","src":"2835:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4647,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4645,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2857:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4646,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2857:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2832:46:20"},{"expression":{"argumentTypes":null,"id":4648,"name":"winningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4644,"src":"2895:14:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4642,"id":4649,"nodeType":"Return","src":"2888:21:20"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4651,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4639,"nodeType":"ParameterList","parameters":[],"src":"2765:2:20"},"payable":false,"returnParameters":{"id":4642,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4641,"name":"","nodeType":"VariableDeclaration","scope":4651,"src":"2813:3:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4640,"name":"int","nodeType":"ElementaryTypeName","src":"2813:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2812:5:20"},"scope":4652,"src":"2746:170:20","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4653,"src":"946:1972:20"}],"src":"0:2919:20"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0xfa79712c284739d17afbe12ade9b94290de76fd9","transactionHash":"0x0d2a86557c95bf9ff2149fd6f006b6b2682b14f8eceb20d1953adbdb1cbccded"},"4":{"address":"0x4e09ae531d709b24a53a4bbfa92e11489e5697fe","transactionHash":"0xe3ccce3f32d8811e4ca54c448a0918a6859d9ad8ed200acd52d570b6d7cfec24"},"42":{"address":"0xf009c8b825c777bf8c2b7c01171b2fdf030a0ee2","transactionHash":"0xeec2f1b0e518090d4db4918a6f0be208a2cb32957a2d8a02d59cb6abc4c9623e"},"437894314312":{"address":"0x9561c133dd8580860b6b7e504bc5aa500f0f06a7","transactionHash":"0xb00c2e4cc9ef2a3d744d925036d2a10baf21569987f47556ec5642923dfc55e9"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.808Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracleData.json": +/*!**************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracleData.json ***! + \**************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"MajorityOracleData","abi":[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"oracles","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50610117806100206000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635b69a7d8146044575b600080fd5b348015604f57600080fd5b50606c6004803603810190808035906020019092919050505060ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008181548110151560bc57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820013cd53654a4fa7a8907a6620ab93a4f6ba34c9fd8c8e9432058c7bd803646fb0029","deployedBytecode":"0x608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635b69a7d8146044575b600080fd5b348015604f57600080fd5b50606c6004803603810190808035906020019092919050505060ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008181548110151560bc57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820013cd53654a4fa7a8907a6620ab93a4f6ba34c9fd8c8e9432058c7bd803646fb0029","sourceMap":"115:92:20:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;115:92:20;;;;;;;","deployedSourceMap":"115:92:20:-;;;;;;;;;;;;;;;;;;;;;;;;181:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;181:23:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract MajorityOracleData {\n\n /*\n * Storage\n */\n Oracle[] public oracles;\n}\n\ncontract MajorityOracleProxy is Proxy, MajorityOracleData {\n\n /// @dev Allows to create an oracle for a majority vote based on other oracles\n /// @param _oracles List of oracles taking part in the majority vote\n constructor(address proxied, Oracle[] _oracles)\n Proxy(proxied)\n public\n {\n // At least 2 oracles should be defined\n require(_oracles.length > 2);\n for (uint i = 0; i < _oracles.length; i++)\n // Oracle address cannot be null\n require(address(_oracles[i]) != 0);\n oracles = _oracles;\n }\n}\n\n/// @title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n/// @author Stefan George - \ncontract MajorityOracle is Proxied, Oracle, MajorityOracleData {\n\n /*\n * Public functions\n */\n /// @dev Allows to registers oracles for a majority vote\n /// @return Is outcome set?\n /// @return Outcome\n function getStatusAndOutcome()\n public\n view\n returns (bool outcomeSet, int outcome)\n {\n uint i;\n int[] memory outcomes = new int[](oracles.length);\n uint[] memory validations = new uint[](oracles.length);\n for (i = 0; i < oracles.length; i++)\n if (oracles[i].isOutcomeSet()) {\n int _outcome = oracles[i].getOutcome();\n for (uint j = 0; j <= i; j++)\n if (_outcome == outcomes[j]) {\n validations[j] += 1;\n break;\n }\n else if (validations[j] == 0) {\n outcomes[j] = _outcome;\n validations[j] = 1;\n break;\n }\n }\n uint outcomeValidations = 0;\n uint outcomeIndex = 0;\n for (i = 0; i < oracles.length; i++)\n if (validations[i] > outcomeValidations) {\n outcomeValidations = validations[i];\n outcomeIndex = i;\n }\n // There is a majority vote\n if (outcomeValidations * 2 > oracles.length) {\n outcomeSet = true;\n outcome = outcomes[outcomeIndex];\n }\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n (bool outcomeSet, ) = getStatusAndOutcome();\n return outcomeSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n (, int winningOutcome) = getStatusAndOutcome();\n return winningOutcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","exportedSymbols":{"MajorityOracle":[4652],"MajorityOracleData":[4409],"MajorityOracleProxy":[4459]},"id":4653,"nodeType":"SourceUnit","nodes":[{"id":4403,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:20"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4404,"nodeType":"ImportDirective","scope":4653,"sourceUnit":4718,"src":"25:31:20","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4405,"nodeType":"ImportDirective","scope":4653,"sourceUnit":6702,"src":"57:55:20","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4409,"linearizedBaseContracts":[4409],"name":"MajorityOracleData","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":4408,"name":"oracles","nodeType":"VariableDeclaration","scope":4409,"src":"181:23:20","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4406,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"181:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4407,"length":null,"nodeType":"ArrayTypeName","src":"181:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"public"}],"scope":4653,"src":"115:92:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4410,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"241:5:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4411,"nodeType":"InheritanceSpecifier","src":"241:5:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4412,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"248:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4413,"nodeType":"InheritanceSpecifier","src":"248:18:20"}],"contractDependencies":[4409,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4459,"linearizedBaseContracts":[4459,4409,6701,6673],"name":"MajorityOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4457,"nodeType":"Block","src":"520:265:20","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4425,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"586:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4426,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"586:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4427,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"604:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"586:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4424,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"578:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4429,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"578:28:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4430,"nodeType":"ExpressionStatement","src":"578:28:20"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4449,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4444,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"732:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4446,"indexExpression":{"argumentTypes":null,"id":4445,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"741:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"732:11:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":4443,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"724:7:20","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"724:20:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4448,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"748:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"724:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4442,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"716:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4450,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"716:34:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4451,"nodeType":"ExpressionStatement","src":"716:34:20"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4435,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"633:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4436,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"637:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"637:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"633:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4452,"initializationExpression":{"assignments":[4432],"declarations":[{"constant":false,"id":4432,"name":"i","nodeType":"VariableDeclaration","scope":4458,"src":"621:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4431,"name":"uint","nodeType":"ElementaryTypeName","src":"621:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4434,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4433,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"630:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"621:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4440,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"654:3:20","subExpression":{"argumentTypes":null,"id":4439,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"654:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4441,"nodeType":"ExpressionStatement","src":"654:3:20"},"nodeType":"ForStatement","src":"616:134:20"},{"expression":{"argumentTypes":null,"id":4455,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4453,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"760:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4454,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"770:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"src":"760:18:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4456,"nodeType":"ExpressionStatement","src":"760:18:20"}]},"documentation":"@dev Allows to create an oracle for a majority vote based on other oracles\n @param _oracles List of oracles taking part in the majority vote","id":4458,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4421,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4415,"src":"492:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4422,"modifierName":{"argumentTypes":null,"id":4420,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"486:5:20","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"486:14:20"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4419,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4415,"name":"proxied","nodeType":"VariableDeclaration","scope":4458,"src":"442:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4414,"name":"address","nodeType":"ElementaryTypeName","src":"442:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4418,"name":"_oracles","nodeType":"VariableDeclaration","scope":4458,"src":"459:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4416,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"459:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4417,"length":null,"nodeType":"ArrayTypeName","src":"459:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"441:36:20"},"payable":false,"returnParameters":{"id":4423,"nodeType":"ParameterList","parameters":[],"src":"520:0:20"},"scope":4459,"src":"430:355:20","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4653,"src":"209:578:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4460,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"973:7:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4461,"nodeType":"InheritanceSpecifier","src":"973:7:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4462,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"982:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4463,"nodeType":"InheritanceSpecifier","src":"982:6:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4464,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"990:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4465,"nodeType":"InheritanceSpecifier","src":"990:18:20"}],"contractDependencies":[4409,4717,6673],"contractKind":"contract","documentation":"@title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n @author Stefan George - ","fullyImplemented":true,"id":4652,"linearizedBaseContracts":[4652,4409,4717,6673],"name":"MajorityOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4624,"nodeType":"Block","src":"1283:1145:20","statements":[{"assignments":[],"declarations":[{"constant":false,"id":4473,"name":"i","nodeType":"VariableDeclaration","scope":4625,"src":"1293:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4472,"name":"uint","nodeType":"ElementaryTypeName","src":"1293:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4474,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"1293:6:20"},{"assignments":[4478],"declarations":[{"constant":false,"id":4478,"name":"outcomes","nodeType":"VariableDeclaration","scope":4625,"src":"1309:21:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":4476,"name":"int","nodeType":"ElementaryTypeName","src":"1309:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4477,"length":null,"nodeType":"ArrayTypeName","src":"1309:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":4485,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4482,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1343:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4483,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1343:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4481,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1333:9:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":4479,"name":"int","nodeType":"ElementaryTypeName","src":"1337:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4480,"length":null,"nodeType":"ArrayTypeName","src":"1337:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":4484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1333:25:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1309:49:20"},{"assignments":[4489],"declarations":[{"constant":false,"id":4489,"name":"validations","nodeType":"VariableDeclaration","scope":4625,"src":"1368:25:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":4487,"name":"uint","nodeType":"ElementaryTypeName","src":"1368:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4488,"length":null,"nodeType":"ArrayTypeName","src":"1368:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"id":4496,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4493,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1407:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4494,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1407:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4492,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1396:10:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":4490,"name":"uint","nodeType":"ElementaryTypeName","src":"1400:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4491,"length":null,"nodeType":"ArrayTypeName","src":"1400:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":4495,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1396:26:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1368:54:20"},{"body":{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4508,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1485:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4510,"indexExpression":{"argumentTypes":null,"id":4509,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1493:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1485:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"1485:23:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4512,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1485:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4567,"nodeType":"IfStatement","src":"1481:494:20","trueBody":{"id":4566,"nodeType":"Block","src":"1512:463:20","statements":[{"assignments":[4514],"declarations":[{"constant":false,"id":4514,"name":"_outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1530:12:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4513,"name":"int","nodeType":"ElementaryTypeName","src":"1530:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4520,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4515,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1545:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4517,"indexExpression":{"argumentTypes":null,"id":4516,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1553:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1545:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4518,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"1545:21:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":4519,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1545:23:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1530:38:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":4535,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4531,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1640:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4532,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1652:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4534,"indexExpression":{"argumentTypes":null,"id":4533,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1661:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1652:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1640:23:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4548,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4544,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1794:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4546,"indexExpression":{"argumentTypes":null,"id":4545,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1806:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4547,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1812:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1794:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4563,"nodeType":"IfStatement","src":"1790:171:20","trueBody":{"id":4562,"nodeType":"Block","src":"1815:146:20","statements":[{"expression":{"argumentTypes":null,"id":4553,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4549,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1841:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4551,"indexExpression":{"argumentTypes":null,"id":4550,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1850:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1841:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4552,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1855:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1841:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4554,"nodeType":"ExpressionStatement","src":"1841:22:20"},{"expression":{"argumentTypes":null,"id":4559,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4555,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1889:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4557,"indexExpression":{"argumentTypes":null,"id":4556,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1901:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1889:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1906:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1889:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4560,"nodeType":"ExpressionStatement","src":"1889:18:20"},{"id":4561,"nodeType":"Break","src":"1933:5:20"}]}},"id":4564,"nodeType":"IfStatement","src":"1636:325:20","trueBody":{"id":4543,"nodeType":"Block","src":"1665:99:20","statements":[{"expression":{"argumentTypes":null,"id":4540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4536,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1691:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4538,"indexExpression":{"argumentTypes":null,"id":4537,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1703:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1691:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1709:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1691:19:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4541,"nodeType":"ExpressionStatement","src":"1691:19:20"},{"id":4542,"nodeType":"Break","src":"1736:5:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4525,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1603:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":4526,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1608:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1603:6:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4565,"initializationExpression":{"assignments":[4522],"declarations":[{"constant":false,"id":4522,"name":"j","nodeType":"VariableDeclaration","scope":4625,"src":"1591:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4521,"name":"uint","nodeType":"ElementaryTypeName","src":"1591:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4524,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4523,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1600:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1591:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1611:3:20","subExpression":{"argumentTypes":null,"id":4528,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1611:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4530,"nodeType":"ExpressionStatement","src":"1611:3:20"},"nodeType":"ForStatement","src":"1586:375:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4501,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1444:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4502,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1448:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4503,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1448:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1444:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4568,"initializationExpression":{"expression":{"argumentTypes":null,"id":4499,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4497,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1437:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4498,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1441:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1437:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4500,"nodeType":"ExpressionStatement","src":"1437:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4506,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1464:3:20","subExpression":{"argumentTypes":null,"id":4505,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1464:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4507,"nodeType":"ExpressionStatement","src":"1464:3:20"},"nodeType":"ForStatement","src":"1432:543:20"},{"assignments":[4570],"declarations":[{"constant":false,"id":4570,"name":"outcomeValidations","nodeType":"VariableDeclaration","scope":4625,"src":"1984:23:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4569,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4572,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4571,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2010:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1984:27:20"},{"assignments":[4574],"declarations":[{"constant":false,"id":4574,"name":"outcomeIndex","nodeType":"VariableDeclaration","scope":4625,"src":"2021:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4573,"name":"uint","nodeType":"ElementaryTypeName","src":"2021:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4576,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4575,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2041:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2021:21:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4592,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4588,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2105:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4590,"indexExpression":{"argumentTypes":null,"id":4589,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2117:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2105:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4591,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2122:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2105:35:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4604,"nodeType":"IfStatement","src":"2101:143:20","trueBody":{"id":4603,"nodeType":"Block","src":"2142:102:20","statements":[{"expression":{"argumentTypes":null,"id":4597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4593,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2160:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4594,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2181:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4596,"indexExpression":{"argumentTypes":null,"id":4595,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2193:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2181:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2160:35:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4598,"nodeType":"ExpressionStatement","src":"2160:35:20"},{"expression":{"argumentTypes":null,"id":4601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4599,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2213:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4600,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2228:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2213:16:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4602,"nodeType":"ExpressionStatement","src":"2213:16:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4581,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2064:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4582,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2068:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4583,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2068:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2064:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4605,"initializationExpression":{"expression":{"argumentTypes":null,"id":4579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4577,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2057:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4578,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2061:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2057:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4580,"nodeType":"ExpressionStatement","src":"2057:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2084:3:20","subExpression":{"argumentTypes":null,"id":4585,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2084:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4587,"nodeType":"ExpressionStatement","src":"2084:3:20"},"nodeType":"ForStatement","src":"2052:192:20"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4608,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4606,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2293:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4607,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2314:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2293:22:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4609,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2318:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4610,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2318:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2293:39:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4623,"nodeType":"IfStatement","src":"2289:133:20","trueBody":{"id":4622,"nodeType":"Block","src":"2334:88:20","statements":[{"expression":{"argumentTypes":null,"id":4614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4612,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4468,"src":"2348:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2361:4:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2348:17:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4615,"nodeType":"ExpressionStatement","src":"2348:17:20"},{"expression":{"argumentTypes":null,"id":4620,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4616,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4470,"src":"2379:7:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4617,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"2389:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4619,"indexExpression":{"argumentTypes":null,"id":4618,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2398:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2389:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2379:32:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4621,"nodeType":"ExpressionStatement","src":"2379:32:20"}]}}]},"documentation":"@dev Allows to registers oracles for a majority vote\n @return Is outcome set?\n @return Outcome","id":4625,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getStatusAndOutcome","nodeType":"FunctionDefinition","parameters":{"id":4466,"nodeType":"ParameterList","parameters":[],"src":"1201:2:20"},"payable":false,"returnParameters":{"id":4471,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4468,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4625,"src":"1249:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4467,"name":"bool","nodeType":"ElementaryTypeName","src":"1249:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},{"constant":false,"id":4470,"name":"outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1266:11:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4469,"name":"int","nodeType":"ElementaryTypeName","src":"1266:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1248:30:20"},"scope":4652,"src":"1173:1255:20","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":4637,"nodeType":"Block","src":"2592:87:20","statements":[{"assignments":[4631,null],"declarations":[{"constant":false,"id":4631,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4638,"src":"2603:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4630,"name":"bool","nodeType":"ElementaryTypeName","src":"2603:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},null],"id":4634,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4632,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2624:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2624:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2602:43:20"},{"expression":{"argumentTypes":null,"id":4635,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4631,"src":"2662:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4629,"id":4636,"nodeType":"Return","src":"2655:17:20"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4638,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4626,"nodeType":"ParameterList","parameters":[],"src":"2534:2:20"},"payable":false,"returnParameters":{"id":4629,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4628,"name":"","nodeType":"VariableDeclaration","scope":4638,"src":"2582:4:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4627,"name":"bool","nodeType":"ElementaryTypeName","src":"2582:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2581:6:20"},"scope":4652,"src":"2513:166:20","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4650,"nodeType":"Block","src":"2822:94:20","statements":[{"assignments":[null,4644],"declarations":[null,{"constant":false,"id":4644,"name":"winningOutcome","nodeType":"VariableDeclaration","scope":4651,"src":"2835:18:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4643,"name":"int","nodeType":"ElementaryTypeName","src":"2835:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4647,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4645,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2857:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4646,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2857:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2832:46:20"},{"expression":{"argumentTypes":null,"id":4648,"name":"winningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4644,"src":"2895:14:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4642,"id":4649,"nodeType":"Return","src":"2888:21:20"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4651,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4639,"nodeType":"ParameterList","parameters":[],"src":"2765:2:20"},"payable":false,"returnParameters":{"id":4642,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4641,"name":"","nodeType":"VariableDeclaration","scope":4651,"src":"2813:3:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4640,"name":"int","nodeType":"ElementaryTypeName","src":"2813:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2812:5:20"},"scope":4652,"src":"2746:170:20","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4653,"src":"946:1972:20"}],"src":"0:2919:20"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","exportedSymbols":{"MajorityOracle":[4652],"MajorityOracleData":[4409],"MajorityOracleProxy":[4459]},"id":4653,"nodeType":"SourceUnit","nodes":[{"id":4403,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:20"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4404,"nodeType":"ImportDirective","scope":4653,"sourceUnit":4718,"src":"25:31:20","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4405,"nodeType":"ImportDirective","scope":4653,"sourceUnit":6702,"src":"57:55:20","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4409,"linearizedBaseContracts":[4409],"name":"MajorityOracleData","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":4408,"name":"oracles","nodeType":"VariableDeclaration","scope":4409,"src":"181:23:20","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4406,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"181:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4407,"length":null,"nodeType":"ArrayTypeName","src":"181:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"public"}],"scope":4653,"src":"115:92:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4410,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"241:5:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4411,"nodeType":"InheritanceSpecifier","src":"241:5:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4412,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"248:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4413,"nodeType":"InheritanceSpecifier","src":"248:18:20"}],"contractDependencies":[4409,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4459,"linearizedBaseContracts":[4459,4409,6701,6673],"name":"MajorityOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4457,"nodeType":"Block","src":"520:265:20","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4425,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"586:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4426,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"586:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4427,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"604:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"586:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4424,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"578:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4429,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"578:28:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4430,"nodeType":"ExpressionStatement","src":"578:28:20"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4449,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4444,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"732:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4446,"indexExpression":{"argumentTypes":null,"id":4445,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"741:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"732:11:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":4443,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"724:7:20","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"724:20:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4448,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"748:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"724:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4442,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"716:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4450,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"716:34:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4451,"nodeType":"ExpressionStatement","src":"716:34:20"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4435,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"633:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4436,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"637:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"637:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"633:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4452,"initializationExpression":{"assignments":[4432],"declarations":[{"constant":false,"id":4432,"name":"i","nodeType":"VariableDeclaration","scope":4458,"src":"621:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4431,"name":"uint","nodeType":"ElementaryTypeName","src":"621:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4434,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4433,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"630:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"621:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4440,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"654:3:20","subExpression":{"argumentTypes":null,"id":4439,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"654:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4441,"nodeType":"ExpressionStatement","src":"654:3:20"},"nodeType":"ForStatement","src":"616:134:20"},{"expression":{"argumentTypes":null,"id":4455,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4453,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"760:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4454,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"770:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"src":"760:18:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4456,"nodeType":"ExpressionStatement","src":"760:18:20"}]},"documentation":"@dev Allows to create an oracle for a majority vote based on other oracles\n @param _oracles List of oracles taking part in the majority vote","id":4458,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4421,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4415,"src":"492:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4422,"modifierName":{"argumentTypes":null,"id":4420,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"486:5:20","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"486:14:20"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4419,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4415,"name":"proxied","nodeType":"VariableDeclaration","scope":4458,"src":"442:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4414,"name":"address","nodeType":"ElementaryTypeName","src":"442:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4418,"name":"_oracles","nodeType":"VariableDeclaration","scope":4458,"src":"459:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4416,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"459:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4417,"length":null,"nodeType":"ArrayTypeName","src":"459:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"441:36:20"},"payable":false,"returnParameters":{"id":4423,"nodeType":"ParameterList","parameters":[],"src":"520:0:20"},"scope":4459,"src":"430:355:20","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4653,"src":"209:578:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4460,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"973:7:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4461,"nodeType":"InheritanceSpecifier","src":"973:7:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4462,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"982:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4463,"nodeType":"InheritanceSpecifier","src":"982:6:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4464,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"990:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4465,"nodeType":"InheritanceSpecifier","src":"990:18:20"}],"contractDependencies":[4409,4717,6673],"contractKind":"contract","documentation":"@title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n @author Stefan George - ","fullyImplemented":true,"id":4652,"linearizedBaseContracts":[4652,4409,4717,6673],"name":"MajorityOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4624,"nodeType":"Block","src":"1283:1145:20","statements":[{"assignments":[],"declarations":[{"constant":false,"id":4473,"name":"i","nodeType":"VariableDeclaration","scope":4625,"src":"1293:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4472,"name":"uint","nodeType":"ElementaryTypeName","src":"1293:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4474,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"1293:6:20"},{"assignments":[4478],"declarations":[{"constant":false,"id":4478,"name":"outcomes","nodeType":"VariableDeclaration","scope":4625,"src":"1309:21:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":4476,"name":"int","nodeType":"ElementaryTypeName","src":"1309:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4477,"length":null,"nodeType":"ArrayTypeName","src":"1309:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":4485,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4482,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1343:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4483,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1343:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4481,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1333:9:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":4479,"name":"int","nodeType":"ElementaryTypeName","src":"1337:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4480,"length":null,"nodeType":"ArrayTypeName","src":"1337:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":4484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1333:25:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1309:49:20"},{"assignments":[4489],"declarations":[{"constant":false,"id":4489,"name":"validations","nodeType":"VariableDeclaration","scope":4625,"src":"1368:25:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":4487,"name":"uint","nodeType":"ElementaryTypeName","src":"1368:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4488,"length":null,"nodeType":"ArrayTypeName","src":"1368:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"id":4496,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4493,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1407:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4494,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1407:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4492,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1396:10:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":4490,"name":"uint","nodeType":"ElementaryTypeName","src":"1400:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4491,"length":null,"nodeType":"ArrayTypeName","src":"1400:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":4495,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1396:26:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1368:54:20"},{"body":{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4508,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1485:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4510,"indexExpression":{"argumentTypes":null,"id":4509,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1493:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1485:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"1485:23:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4512,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1485:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4567,"nodeType":"IfStatement","src":"1481:494:20","trueBody":{"id":4566,"nodeType":"Block","src":"1512:463:20","statements":[{"assignments":[4514],"declarations":[{"constant":false,"id":4514,"name":"_outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1530:12:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4513,"name":"int","nodeType":"ElementaryTypeName","src":"1530:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4520,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4515,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1545:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4517,"indexExpression":{"argumentTypes":null,"id":4516,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1553:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1545:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4518,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"1545:21:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":4519,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1545:23:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1530:38:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":4535,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4531,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1640:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4532,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1652:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4534,"indexExpression":{"argumentTypes":null,"id":4533,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1661:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1652:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1640:23:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4548,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4544,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1794:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4546,"indexExpression":{"argumentTypes":null,"id":4545,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1806:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4547,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1812:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1794:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4563,"nodeType":"IfStatement","src":"1790:171:20","trueBody":{"id":4562,"nodeType":"Block","src":"1815:146:20","statements":[{"expression":{"argumentTypes":null,"id":4553,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4549,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1841:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4551,"indexExpression":{"argumentTypes":null,"id":4550,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1850:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1841:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4552,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1855:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1841:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4554,"nodeType":"ExpressionStatement","src":"1841:22:20"},{"expression":{"argumentTypes":null,"id":4559,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4555,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1889:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4557,"indexExpression":{"argumentTypes":null,"id":4556,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1901:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1889:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1906:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1889:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4560,"nodeType":"ExpressionStatement","src":"1889:18:20"},{"id":4561,"nodeType":"Break","src":"1933:5:20"}]}},"id":4564,"nodeType":"IfStatement","src":"1636:325:20","trueBody":{"id":4543,"nodeType":"Block","src":"1665:99:20","statements":[{"expression":{"argumentTypes":null,"id":4540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4536,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1691:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4538,"indexExpression":{"argumentTypes":null,"id":4537,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1703:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1691:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1709:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1691:19:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4541,"nodeType":"ExpressionStatement","src":"1691:19:20"},{"id":4542,"nodeType":"Break","src":"1736:5:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4525,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1603:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":4526,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1608:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1603:6:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4565,"initializationExpression":{"assignments":[4522],"declarations":[{"constant":false,"id":4522,"name":"j","nodeType":"VariableDeclaration","scope":4625,"src":"1591:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4521,"name":"uint","nodeType":"ElementaryTypeName","src":"1591:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4524,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4523,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1600:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1591:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1611:3:20","subExpression":{"argumentTypes":null,"id":4528,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1611:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4530,"nodeType":"ExpressionStatement","src":"1611:3:20"},"nodeType":"ForStatement","src":"1586:375:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4501,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1444:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4502,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1448:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4503,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1448:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1444:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4568,"initializationExpression":{"expression":{"argumentTypes":null,"id":4499,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4497,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1437:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4498,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1441:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1437:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4500,"nodeType":"ExpressionStatement","src":"1437:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4506,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1464:3:20","subExpression":{"argumentTypes":null,"id":4505,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1464:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4507,"nodeType":"ExpressionStatement","src":"1464:3:20"},"nodeType":"ForStatement","src":"1432:543:20"},{"assignments":[4570],"declarations":[{"constant":false,"id":4570,"name":"outcomeValidations","nodeType":"VariableDeclaration","scope":4625,"src":"1984:23:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4569,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4572,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4571,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2010:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1984:27:20"},{"assignments":[4574],"declarations":[{"constant":false,"id":4574,"name":"outcomeIndex","nodeType":"VariableDeclaration","scope":4625,"src":"2021:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4573,"name":"uint","nodeType":"ElementaryTypeName","src":"2021:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4576,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4575,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2041:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2021:21:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4592,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4588,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2105:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4590,"indexExpression":{"argumentTypes":null,"id":4589,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2117:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2105:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4591,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2122:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2105:35:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4604,"nodeType":"IfStatement","src":"2101:143:20","trueBody":{"id":4603,"nodeType":"Block","src":"2142:102:20","statements":[{"expression":{"argumentTypes":null,"id":4597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4593,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2160:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4594,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2181:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4596,"indexExpression":{"argumentTypes":null,"id":4595,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2193:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2181:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2160:35:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4598,"nodeType":"ExpressionStatement","src":"2160:35:20"},{"expression":{"argumentTypes":null,"id":4601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4599,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2213:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4600,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2228:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2213:16:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4602,"nodeType":"ExpressionStatement","src":"2213:16:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4581,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2064:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4582,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2068:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4583,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2068:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2064:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4605,"initializationExpression":{"expression":{"argumentTypes":null,"id":4579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4577,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2057:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4578,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2061:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2057:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4580,"nodeType":"ExpressionStatement","src":"2057:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2084:3:20","subExpression":{"argumentTypes":null,"id":4585,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2084:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4587,"nodeType":"ExpressionStatement","src":"2084:3:20"},"nodeType":"ForStatement","src":"2052:192:20"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4608,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4606,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2293:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4607,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2314:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2293:22:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4609,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2318:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4610,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2318:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2293:39:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4623,"nodeType":"IfStatement","src":"2289:133:20","trueBody":{"id":4622,"nodeType":"Block","src":"2334:88:20","statements":[{"expression":{"argumentTypes":null,"id":4614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4612,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4468,"src":"2348:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2361:4:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2348:17:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4615,"nodeType":"ExpressionStatement","src":"2348:17:20"},{"expression":{"argumentTypes":null,"id":4620,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4616,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4470,"src":"2379:7:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4617,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"2389:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4619,"indexExpression":{"argumentTypes":null,"id":4618,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2398:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2389:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2379:32:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4621,"nodeType":"ExpressionStatement","src":"2379:32:20"}]}}]},"documentation":"@dev Allows to registers oracles for a majority vote\n @return Is outcome set?\n @return Outcome","id":4625,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getStatusAndOutcome","nodeType":"FunctionDefinition","parameters":{"id":4466,"nodeType":"ParameterList","parameters":[],"src":"1201:2:20"},"payable":false,"returnParameters":{"id":4471,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4468,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4625,"src":"1249:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4467,"name":"bool","nodeType":"ElementaryTypeName","src":"1249:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},{"constant":false,"id":4470,"name":"outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1266:11:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4469,"name":"int","nodeType":"ElementaryTypeName","src":"1266:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1248:30:20"},"scope":4652,"src":"1173:1255:20","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":4637,"nodeType":"Block","src":"2592:87:20","statements":[{"assignments":[4631,null],"declarations":[{"constant":false,"id":4631,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4638,"src":"2603:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4630,"name":"bool","nodeType":"ElementaryTypeName","src":"2603:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},null],"id":4634,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4632,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2624:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2624:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2602:43:20"},{"expression":{"argumentTypes":null,"id":4635,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4631,"src":"2662:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4629,"id":4636,"nodeType":"Return","src":"2655:17:20"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4638,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4626,"nodeType":"ParameterList","parameters":[],"src":"2534:2:20"},"payable":false,"returnParameters":{"id":4629,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4628,"name":"","nodeType":"VariableDeclaration","scope":4638,"src":"2582:4:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4627,"name":"bool","nodeType":"ElementaryTypeName","src":"2582:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2581:6:20"},"scope":4652,"src":"2513:166:20","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4650,"nodeType":"Block","src":"2822:94:20","statements":[{"assignments":[null,4644],"declarations":[null,{"constant":false,"id":4644,"name":"winningOutcome","nodeType":"VariableDeclaration","scope":4651,"src":"2835:18:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4643,"name":"int","nodeType":"ElementaryTypeName","src":"2835:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4647,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4645,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2857:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4646,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2857:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2832:46:20"},{"expression":{"argumentTypes":null,"id":4648,"name":"winningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4644,"src":"2895:14:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4642,"id":4649,"nodeType":"Return","src":"2888:21:20"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4651,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4639,"nodeType":"ParameterList","parameters":[],"src":"2765:2:20"},"payable":false,"returnParameters":{"id":4642,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4641,"name":"","nodeType":"VariableDeclaration","scope":4651,"src":"2813:3:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4640,"name":"int","nodeType":"ElementaryTypeName","src":"2813:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2812:5:20"},"scope":4652,"src":"2746:170:20","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4653,"src":"946:1972:20"}],"src":"0:2919:20"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.025Z"}; /***/ }), @@ -308,10 +505,21 @@ module.exports = {"contract_name":"MajorityOracle","abi":[{"constant":true,"inpu /*!*****************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracleFactory.json ***! \*****************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"MajorityOracleFactory","abi":[{"constant":false,"inputs":[{"name":"oracles","type":"address[]"}],"name":"createMajorityOracle","outputs":[{"name":"majorityOracle","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"majorityOracle","type":"address"},{"indexed":false,"name":"oracles","type":"address[]"}],"name":"MajorityOracleCreation","type":"event"}],"networks":{"3":{"address":"0xb3289eaac0fe3ed15df177f925c6f8ceeb908b8f","updated_at":1503605014190},"4":{"address":"0xa2f86534959e83abbade7f5a560ba735bb4de3a3","updated_at":1503603856237},"42":{"address":"0x4b9d168269dda8630fb4d064dbcbbe90d0286158","updated_at":1503602339890},"437894314312":{"address":"0x254dffcd3277c0b1660f6d42efbb754edababc2b","updated_at":1507361155408}},"schema_version":"0.0.5","updated_at":1543915159045}; +module.exports = {"contractName":"MajorityOracleFactory","abi":[{"constant":true,"inputs":[],"name":"majorityOracleMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_majorityOracleMasterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"majorityOracle","type":"address"},{"indexed":false,"name":"oracles","type":"address[]"}],"name":"MajorityOracleCreation","type":"event"},{"constant":false,"inputs":[{"name":"oracles","type":"address[]"}],"name":"createMajorityOracle","outputs":[{"name":"majorityOracle","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506040516020806107bb83398101806040528101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610738806100836000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a41d7eec14610051578063e04c0c52146100a8575b600080fd5b34801561005d57600080fd5b5061006661014e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b5061010c60048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610173565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826101a0610305565b808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156102125780820151818401526020810190506101f7565b505050509050019350505050604051809103906000f08015801561023a573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167fdf1eeefc4815bdd1bdf45905c4ce59f6ca50efb4148303c9bbda2bff40301d3d8284604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156102ec5780820151818401526020810190506102d1565b50505050905001935050505060405180910390a2919050565b6040516103f780610316833901905600608060405234801561001057600080fd5b506040516103f73803806103f7833981018060405281019080805190602001909291908051820192919050505060008260008173ffffffffffffffffffffffffffffffffffffffff161415151561006657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600282511115156100b757600080fd5b600090505b815181101561010f57600082828151811015156100d557fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff161415151561010257600080fd5b80806001019150506100bc565b816001908051906020019061012592919061012e565b505050506101fb565b8280548282559060005260206000209081019282156101a7579160200282015b828111156101a65782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019061014e565b5b5090506101b491906101b8565b5090565b6101f891905b808211156101f457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506001016101be565b5090565b90565b6101ed8061020a6000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635b69a7d81461009a578063a619486e14610107575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610095573d6000f35b3d6000fd5b3480156100a657600080fd5b506100c56004803603810190808035906020019092919050505061015e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011357600080fd5b5061011c61019c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60018181548110151561016d57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820e8c7cc78033038cc2e30057813c9e54039b1e57283ba7c89d2661eecbf601be40029a165627a7a72305820b02a2dd263cb96ba31b57f9ff60b682a35309912ebafc117d37daa9fe68a9eb10029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a41d7eec14610051578063e04c0c52146100a8575b600080fd5b34801561005d57600080fd5b5061006661014e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b5061010c60048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610173565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826101a0610305565b808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156102125780820151818401526020810190506101f7565b505050509050019350505050604051809103906000f08015801561023a573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167fdf1eeefc4815bdd1bdf45905c4ce59f6ca50efb4148303c9bbda2bff40301d3d8284604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156102ec5780820151818401526020810190506102d1565b50505050905001935050505060405180910390a2919050565b6040516103f780610316833901905600608060405234801561001057600080fd5b506040516103f73803806103f7833981018060405281019080805190602001909291908051820192919050505060008260008173ffffffffffffffffffffffffffffffffffffffff161415151561006657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600282511115156100b757600080fd5b600090505b815181101561010f57600082828151811015156100d557fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff161415151561010257600080fd5b80806001019150506100bc565b816001908051906020019061012592919061012e565b505050506101fb565b8280548282559060005260206000209081019282156101a7579160200282015b828111156101a65782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019061014e565b5b5090506101b491906101b8565b5090565b6101f891905b808211156101f457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506001016101be565b5090565b90565b6101ed8061020a6000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635b69a7d81461009a578063a619486e14610107575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610095573d6000f35b3d6000fd5b3480156100a657600080fd5b506100c56004803603810190808035906020019092919050505061015e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011357600080fd5b5061011c61019c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60018181548110151561016d57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820e8c7cc78033038cc2e30057813c9e54039b1e57283ba7c89d2661eecbf601be40029a165627a7a72305820b02a2dd263cb96ba31b57f9ff60b682a35309912ebafc117d37daa9fe68a9eb10029","sourceMap":"203:904:21:-;;;504:142;8:9:-1;5:2;;;30:1;27;20:12;5:2;504:142:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:25;587:24;;:52;;;;;;;;;;;;;;;;;;504:142;203:904;;;;;;","deployedSourceMap":"203:904:21:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;411:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;411:46:21;;;;;;;;;;;;;;;;;;;;;;;;;;;808:297;;8:9:-1;5:2;;;30:1;27;20:12;5:2;808:297:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;411:46;;;;;;;;;;;;;:::o;808:297::-;888:29;989:24;;;;;;;;;;;1015:7;965:58;;:::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;965:58:21;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;965:58:21;933:91;;1062:10;1039:59;;;1074:14;1090:7;1039:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1039:59:21;;;;;;;;;;;;;;;;;;808:297;;;:::o;203:904::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/MajorityOracle.sol\";\n\n\n/// @title Majority oracle factory contract - Allows to create majority oracle contracts\n/// @author Stefan George - \ncontract MajorityOracleFactory {\n\n /*\n * Events\n */\n event MajorityOracleCreation(address indexed creator, MajorityOracle majorityOracle, Oracle[] oracles);\n\n /*\n * Storage\n */\n MajorityOracle public majorityOracleMasterCopy;\n\n /*\n * Public functions\n */\n constructor(MajorityOracle _majorityOracleMasterCopy)\n public\n {\n majorityOracleMasterCopy = _majorityOracleMasterCopy;\n }\n\n /// @dev Creates a new majority oracle contract\n /// @param oracles List of oracles taking part in the majority vote\n /// @return Oracle contract\n function createMajorityOracle(Oracle[] oracles)\n public\n returns (MajorityOracle majorityOracle)\n {\n majorityOracle = MajorityOracle(new MajorityOracleProxy(majorityOracleMasterCopy, oracles));\n emit MajorityOracleCreation(msg.sender, majorityOracle, oracles);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracleFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracleFactory.sol","exportedSymbols":{"MajorityOracleFactory":[4703]},"id":4704,"nodeType":"SourceUnit","nodes":[{"id":4654,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:21"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","file":"../Oracles/MajorityOracle.sol","id":4655,"nodeType":"ImportDirective","scope":4704,"sourceUnit":4653,"src":"25:39:21","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[4459],"contractKind":"contract","documentation":"@title Majority oracle factory contract - Allows to create majority oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":4703,"linearizedBaseContracts":[4703],"name":"MajorityOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4664,"name":"MajorityOracleCreation","nodeType":"EventDefinition","parameters":{"id":4663,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4657,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":4664,"src":"300:23:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4656,"name":"address","nodeType":"ElementaryTypeName","src":"300:7:21","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4659,"indexed":false,"name":"majorityOracle","nodeType":"VariableDeclaration","scope":4664,"src":"325:29:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},"typeName":{"contractScope":null,"id":4658,"name":"MajorityOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4652,"src":"325:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4662,"indexed":false,"name":"oracles","nodeType":"VariableDeclaration","scope":4664,"src":"356:16:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4660,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"356:6:21","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4661,"length":null,"nodeType":"ArrayTypeName","src":"356:8:21","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"299:74:21"},"src":"271:103:21"},{"constant":false,"id":4666,"name":"majorityOracleMasterCopy","nodeType":"VariableDeclaration","scope":4703,"src":"411:46:21","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},"typeName":{"contractScope":null,"id":4665,"name":"MajorityOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4652,"src":"411:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"value":null,"visibility":"public"},{"body":{"id":4675,"nodeType":"Block","src":"577:69:21","statements":[{"expression":{"argumentTypes":null,"id":4673,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4671,"name":"majorityOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4666,"src":"587:24:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4672,"name":"_majorityOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4668,"src":"614:25:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"src":"587:52:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"id":4674,"nodeType":"ExpressionStatement","src":"587:52:21"}]},"documentation":null,"id":4676,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4669,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4668,"name":"_majorityOracleMasterCopy","nodeType":"VariableDeclaration","scope":4676,"src":"516:40:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},"typeName":{"contractScope":null,"id":4667,"name":"MajorityOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4652,"src":"516:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"value":null,"visibility":"internal"}],"src":"515:42:21"},"payable":false,"returnParameters":{"id":4670,"nodeType":"ParameterList","parameters":[],"src":"577:0:21"},"scope":4703,"src":"504:142:21","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4701,"nodeType":"Block","src":"923:182:21","statements":[{"expression":{"argumentTypes":null,"id":4692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4684,"name":"majorityOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4682,"src":"933:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4688,"name":"majorityOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4666,"src":"989:24:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},{"argumentTypes":null,"id":4689,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4679,"src":"1015:7:21","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}],"id":4687,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"965:23:21","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr_$returns$_t_contract$_MajorityOracleProxy_$4459_$","typeString":"function (address,contract Oracle[] memory) returns (contract MajorityOracleProxy)"},"typeName":{"contractScope":null,"id":4686,"name":"MajorityOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":4459,"src":"969:19:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleProxy_$4459","typeString":"contract MajorityOracleProxy"}}},"id":4690,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"965:58:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleProxy_$4459","typeString":"contract MajorityOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MajorityOracleProxy_$4459","typeString":"contract MajorityOracleProxy"}],"id":4685,"name":"MajorityOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4652,"src":"950:14:21","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_MajorityOracle_$4652_$","typeString":"type(contract MajorityOracle)"}},"id":4691,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"950:74:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"src":"933:91:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"id":4693,"nodeType":"ExpressionStatement","src":"933:91:21"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4695,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1062:3:21","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4696,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1062:10:21","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4697,"name":"majorityOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4682,"src":"1074:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},{"argumentTypes":null,"id":4698,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4679,"src":"1090:7:21","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}],"id":4694,"name":"MajorityOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4664,"src":"1039:22:21","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_MajorityOracle_$4652_$_t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr_$returns$__$","typeString":"function (address,contract MajorityOracle,contract Oracle[] memory)"}},"id":4699,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1039:59:21","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4700,"nodeType":"EmitStatement","src":"1034:64:21"}]},"documentation":"@dev Creates a new majority oracle contract\n @param oracles List of oracles taking part in the majority vote\n @return Oracle contract","id":4702,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createMajorityOracle","nodeType":"FunctionDefinition","parameters":{"id":4680,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4679,"name":"oracles","nodeType":"VariableDeclaration","scope":4702,"src":"838:16:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4677,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"838:6:21","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4678,"length":null,"nodeType":"ArrayTypeName","src":"838:8:21","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"837:18:21"},"payable":false,"returnParameters":{"id":4683,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4682,"name":"majorityOracle","nodeType":"VariableDeclaration","scope":4702,"src":"888:29:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},"typeName":{"contractScope":null,"id":4681,"name":"MajorityOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4652,"src":"888:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"value":null,"visibility":"internal"}],"src":"887:31:21"},"scope":4703,"src":"808:297:21","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4704,"src":"203:904:21"}],"src":"0:1108:21"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracleFactory.sol","exportedSymbols":{"MajorityOracleFactory":[4703]},"id":4704,"nodeType":"SourceUnit","nodes":[{"id":4654,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:21"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","file":"../Oracles/MajorityOracle.sol","id":4655,"nodeType":"ImportDirective","scope":4704,"sourceUnit":4653,"src":"25:39:21","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[4459],"contractKind":"contract","documentation":"@title Majority oracle factory contract - Allows to create majority oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":4703,"linearizedBaseContracts":[4703],"name":"MajorityOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4664,"name":"MajorityOracleCreation","nodeType":"EventDefinition","parameters":{"id":4663,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4657,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":4664,"src":"300:23:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4656,"name":"address","nodeType":"ElementaryTypeName","src":"300:7:21","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4659,"indexed":false,"name":"majorityOracle","nodeType":"VariableDeclaration","scope":4664,"src":"325:29:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},"typeName":{"contractScope":null,"id":4658,"name":"MajorityOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4652,"src":"325:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4662,"indexed":false,"name":"oracles","nodeType":"VariableDeclaration","scope":4664,"src":"356:16:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4660,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"356:6:21","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4661,"length":null,"nodeType":"ArrayTypeName","src":"356:8:21","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"299:74:21"},"src":"271:103:21"},{"constant":false,"id":4666,"name":"majorityOracleMasterCopy","nodeType":"VariableDeclaration","scope":4703,"src":"411:46:21","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},"typeName":{"contractScope":null,"id":4665,"name":"MajorityOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4652,"src":"411:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"value":null,"visibility":"public"},{"body":{"id":4675,"nodeType":"Block","src":"577:69:21","statements":[{"expression":{"argumentTypes":null,"id":4673,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4671,"name":"majorityOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4666,"src":"587:24:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4672,"name":"_majorityOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4668,"src":"614:25:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"src":"587:52:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"id":4674,"nodeType":"ExpressionStatement","src":"587:52:21"}]},"documentation":null,"id":4676,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4669,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4668,"name":"_majorityOracleMasterCopy","nodeType":"VariableDeclaration","scope":4676,"src":"516:40:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},"typeName":{"contractScope":null,"id":4667,"name":"MajorityOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4652,"src":"516:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"value":null,"visibility":"internal"}],"src":"515:42:21"},"payable":false,"returnParameters":{"id":4670,"nodeType":"ParameterList","parameters":[],"src":"577:0:21"},"scope":4703,"src":"504:142:21","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4701,"nodeType":"Block","src":"923:182:21","statements":[{"expression":{"argumentTypes":null,"id":4692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4684,"name":"majorityOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4682,"src":"933:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4688,"name":"majorityOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4666,"src":"989:24:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},{"argumentTypes":null,"id":4689,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4679,"src":"1015:7:21","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}],"id":4687,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"965:23:21","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr_$returns$_t_contract$_MajorityOracleProxy_$4459_$","typeString":"function (address,contract Oracle[] memory) returns (contract MajorityOracleProxy)"},"typeName":{"contractScope":null,"id":4686,"name":"MajorityOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":4459,"src":"969:19:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleProxy_$4459","typeString":"contract MajorityOracleProxy"}}},"id":4690,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"965:58:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleProxy_$4459","typeString":"contract MajorityOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MajorityOracleProxy_$4459","typeString":"contract MajorityOracleProxy"}],"id":4685,"name":"MajorityOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4652,"src":"950:14:21","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_MajorityOracle_$4652_$","typeString":"type(contract MajorityOracle)"}},"id":4691,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"950:74:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"src":"933:91:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"id":4693,"nodeType":"ExpressionStatement","src":"933:91:21"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4695,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1062:3:21","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4696,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1062:10:21","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4697,"name":"majorityOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4682,"src":"1074:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},{"argumentTypes":null,"id":4698,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4679,"src":"1090:7:21","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}],"id":4694,"name":"MajorityOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4664,"src":"1039:22:21","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_MajorityOracle_$4652_$_t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr_$returns$__$","typeString":"function (address,contract MajorityOracle,contract Oracle[] memory)"}},"id":4699,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1039:59:21","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4700,"nodeType":"EmitStatement","src":"1034:64:21"}]},"documentation":"@dev Creates a new majority oracle contract\n @param oracles List of oracles taking part in the majority vote\n @return Oracle contract","id":4702,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createMajorityOracle","nodeType":"FunctionDefinition","parameters":{"id":4680,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4679,"name":"oracles","nodeType":"VariableDeclaration","scope":4702,"src":"838:16:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4677,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"838:6:21","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4678,"length":null,"nodeType":"ArrayTypeName","src":"838:8:21","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"837:18:21"},"payable":false,"returnParameters":{"id":4683,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4682,"name":"majorityOracle","nodeType":"VariableDeclaration","scope":4702,"src":"888:29:21","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"},"typeName":{"contractScope":null,"id":4681,"name":"MajorityOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4652,"src":"888:14:21","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracle_$4652","typeString":"contract MajorityOracle"}},"value":null,"visibility":"internal"}],"src":"887:31:21"},"scope":4703,"src":"808:297:21","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4704,"src":"203:904:21"}],"src":"0:1108:21"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0x01a12760503c5485f7cb15f73783887c3048d036","transactionHash":"0x6efa42ef60f281a8a6d0b7c9fd69040aa28a5158b515ff0a1b8c18c0918c8cd0"},"4":{"address":"0x406d8242f65b9e1c34b23c67457e93fb8ac48ec9","transactionHash":"0x4a2312fd1d2df1e6dd4dd7e2577a64d475dbbcdb4bd155b98c12eb0e335629d9"},"42":{"address":"0x45e8447d8a088786777e2e998ae7b08bc255cf68","transactionHash":"0x1c79da749cc9a8771bae6e9ce964b38d42670a75cd747f29d1be8a13199e5a4a"},"437894314312":{"address":"0x0e696947a06550def604e82c26fd9e493e576337","transactionHash":"0xf5626d3f45669f8f0472da20ac29b9ef246cd27140c0c68f42db86edd8483a7e"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.797Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracleProxy.json": +/*!***************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/MajorityOracleProxy.json ***! + \***************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"MajorityOracleProxy","abi":[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"oracles","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"},{"inputs":[{"name":"proxied","type":"address"},{"name":"_oracles","type":"address[]"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}],"bytecode":"0x608060405234801561001057600080fd5b506040516103f73803806103f7833981018060405281019080805190602001909291908051820192919050505060008260008173ffffffffffffffffffffffffffffffffffffffff161415151561006657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600282511115156100b757600080fd5b600090505b815181101561010f57600082828151811015156100d557fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff161415151561010257600080fd5b80806001019150506100bc565b816001908051906020019061012592919061012e565b505050506101fb565b8280548282559060005260206000209081019282156101a7579160200282015b828111156101a65782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019061014e565b5b5090506101b491906101b8565b5090565b6101f891905b808211156101f457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506001016101be565b5090565b90565b6101ed8061020a6000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635b69a7d81461009a578063a619486e14610107575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610095573d6000f35b3d6000fd5b3480156100a657600080fd5b506100c56004803603810190808035906020019092919050505061015e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011357600080fd5b5061011c61019c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60018181548110151561016d57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820e8c7cc78033038cc2e30057813c9e54039b1e57283ba7c89d2661eecbf601be40029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635b69a7d81461009a578063a619486e14610107575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610095573d6000f35b3d6000fd5b3480156100a657600080fd5b506100c56004803603810190808035906020019092919050505061015e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011357600080fd5b5061011c61019c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60018181548110151561016d57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820e8c7cc78033038cc2e30057813c9e54039b1e57283ba7c89d2661eecbf601be40029","sourceMap":"209:578:20:-;;;430:355;8:9:-1;5:2;;;30:1;27;20:12;5:2;430:355:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;621:6;492:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;604:1:20;586:8;:15;:19;578:28;;;;;;;;630:1;621:10;;616:134;637:8;:15;633:1;:19;616:134;;;748:1;732:8;741:1;732:11;;;;;;;;;;;;;;;;;;724:25;;;;716:34;;;;;;;;654:3;;;;;;;616:134;;;770:8;760:7;:18;;;;;;;;;;;;:::i;:::-;;430:355;;;209:578;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;","deployedSourceMap":"209:578:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;181:23:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;181:23:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;181:23:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract MajorityOracleData {\n\n /*\n * Storage\n */\n Oracle[] public oracles;\n}\n\ncontract MajorityOracleProxy is Proxy, MajorityOracleData {\n\n /// @dev Allows to create an oracle for a majority vote based on other oracles\n /// @param _oracles List of oracles taking part in the majority vote\n constructor(address proxied, Oracle[] _oracles)\n Proxy(proxied)\n public\n {\n // At least 2 oracles should be defined\n require(_oracles.length > 2);\n for (uint i = 0; i < _oracles.length; i++)\n // Oracle address cannot be null\n require(address(_oracles[i]) != 0);\n oracles = _oracles;\n }\n}\n\n/// @title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n/// @author Stefan George - \ncontract MajorityOracle is Proxied, Oracle, MajorityOracleData {\n\n /*\n * Public functions\n */\n /// @dev Allows to registers oracles for a majority vote\n /// @return Is outcome set?\n /// @return Outcome\n function getStatusAndOutcome()\n public\n view\n returns (bool outcomeSet, int outcome)\n {\n uint i;\n int[] memory outcomes = new int[](oracles.length);\n uint[] memory validations = new uint[](oracles.length);\n for (i = 0; i < oracles.length; i++)\n if (oracles[i].isOutcomeSet()) {\n int _outcome = oracles[i].getOutcome();\n for (uint j = 0; j <= i; j++)\n if (_outcome == outcomes[j]) {\n validations[j] += 1;\n break;\n }\n else if (validations[j] == 0) {\n outcomes[j] = _outcome;\n validations[j] = 1;\n break;\n }\n }\n uint outcomeValidations = 0;\n uint outcomeIndex = 0;\n for (i = 0; i < oracles.length; i++)\n if (validations[i] > outcomeValidations) {\n outcomeValidations = validations[i];\n outcomeIndex = i;\n }\n // There is a majority vote\n if (outcomeValidations * 2 > oracles.length) {\n outcomeSet = true;\n outcome = outcomes[outcomeIndex];\n }\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n (bool outcomeSet, ) = getStatusAndOutcome();\n return outcomeSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n (, int winningOutcome) = getStatusAndOutcome();\n return winningOutcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","exportedSymbols":{"MajorityOracle":[4652],"MajorityOracleData":[4409],"MajorityOracleProxy":[4459]},"id":4653,"nodeType":"SourceUnit","nodes":[{"id":4403,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:20"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4404,"nodeType":"ImportDirective","scope":4653,"sourceUnit":4718,"src":"25:31:20","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4405,"nodeType":"ImportDirective","scope":4653,"sourceUnit":6702,"src":"57:55:20","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4409,"linearizedBaseContracts":[4409],"name":"MajorityOracleData","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":4408,"name":"oracles","nodeType":"VariableDeclaration","scope":4409,"src":"181:23:20","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4406,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"181:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4407,"length":null,"nodeType":"ArrayTypeName","src":"181:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"public"}],"scope":4653,"src":"115:92:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4410,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"241:5:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4411,"nodeType":"InheritanceSpecifier","src":"241:5:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4412,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"248:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4413,"nodeType":"InheritanceSpecifier","src":"248:18:20"}],"contractDependencies":[4409,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4459,"linearizedBaseContracts":[4459,4409,6701,6673],"name":"MajorityOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4457,"nodeType":"Block","src":"520:265:20","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4425,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"586:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4426,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"586:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4427,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"604:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"586:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4424,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"578:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4429,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"578:28:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4430,"nodeType":"ExpressionStatement","src":"578:28:20"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4449,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4444,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"732:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4446,"indexExpression":{"argumentTypes":null,"id":4445,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"741:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"732:11:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":4443,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"724:7:20","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"724:20:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4448,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"748:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"724:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4442,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"716:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4450,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"716:34:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4451,"nodeType":"ExpressionStatement","src":"716:34:20"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4435,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"633:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4436,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"637:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"637:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"633:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4452,"initializationExpression":{"assignments":[4432],"declarations":[{"constant":false,"id":4432,"name":"i","nodeType":"VariableDeclaration","scope":4458,"src":"621:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4431,"name":"uint","nodeType":"ElementaryTypeName","src":"621:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4434,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4433,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"630:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"621:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4440,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"654:3:20","subExpression":{"argumentTypes":null,"id":4439,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"654:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4441,"nodeType":"ExpressionStatement","src":"654:3:20"},"nodeType":"ForStatement","src":"616:134:20"},{"expression":{"argumentTypes":null,"id":4455,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4453,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"760:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4454,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"770:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"src":"760:18:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4456,"nodeType":"ExpressionStatement","src":"760:18:20"}]},"documentation":"@dev Allows to create an oracle for a majority vote based on other oracles\n @param _oracles List of oracles taking part in the majority vote","id":4458,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4421,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4415,"src":"492:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4422,"modifierName":{"argumentTypes":null,"id":4420,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"486:5:20","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"486:14:20"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4419,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4415,"name":"proxied","nodeType":"VariableDeclaration","scope":4458,"src":"442:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4414,"name":"address","nodeType":"ElementaryTypeName","src":"442:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4418,"name":"_oracles","nodeType":"VariableDeclaration","scope":4458,"src":"459:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4416,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"459:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4417,"length":null,"nodeType":"ArrayTypeName","src":"459:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"441:36:20"},"payable":false,"returnParameters":{"id":4423,"nodeType":"ParameterList","parameters":[],"src":"520:0:20"},"scope":4459,"src":"430:355:20","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4653,"src":"209:578:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4460,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"973:7:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4461,"nodeType":"InheritanceSpecifier","src":"973:7:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4462,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"982:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4463,"nodeType":"InheritanceSpecifier","src":"982:6:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4464,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"990:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4465,"nodeType":"InheritanceSpecifier","src":"990:18:20"}],"contractDependencies":[4409,4717,6673],"contractKind":"contract","documentation":"@title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n @author Stefan George - ","fullyImplemented":true,"id":4652,"linearizedBaseContracts":[4652,4409,4717,6673],"name":"MajorityOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4624,"nodeType":"Block","src":"1283:1145:20","statements":[{"assignments":[],"declarations":[{"constant":false,"id":4473,"name":"i","nodeType":"VariableDeclaration","scope":4625,"src":"1293:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4472,"name":"uint","nodeType":"ElementaryTypeName","src":"1293:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4474,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"1293:6:20"},{"assignments":[4478],"declarations":[{"constant":false,"id":4478,"name":"outcomes","nodeType":"VariableDeclaration","scope":4625,"src":"1309:21:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":4476,"name":"int","nodeType":"ElementaryTypeName","src":"1309:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4477,"length":null,"nodeType":"ArrayTypeName","src":"1309:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":4485,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4482,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1343:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4483,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1343:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4481,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1333:9:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":4479,"name":"int","nodeType":"ElementaryTypeName","src":"1337:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4480,"length":null,"nodeType":"ArrayTypeName","src":"1337:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":4484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1333:25:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1309:49:20"},{"assignments":[4489],"declarations":[{"constant":false,"id":4489,"name":"validations","nodeType":"VariableDeclaration","scope":4625,"src":"1368:25:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":4487,"name":"uint","nodeType":"ElementaryTypeName","src":"1368:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4488,"length":null,"nodeType":"ArrayTypeName","src":"1368:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"id":4496,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4493,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1407:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4494,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1407:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4492,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1396:10:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":4490,"name":"uint","nodeType":"ElementaryTypeName","src":"1400:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4491,"length":null,"nodeType":"ArrayTypeName","src":"1400:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":4495,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1396:26:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1368:54:20"},{"body":{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4508,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1485:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4510,"indexExpression":{"argumentTypes":null,"id":4509,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1493:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1485:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"1485:23:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4512,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1485:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4567,"nodeType":"IfStatement","src":"1481:494:20","trueBody":{"id":4566,"nodeType":"Block","src":"1512:463:20","statements":[{"assignments":[4514],"declarations":[{"constant":false,"id":4514,"name":"_outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1530:12:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4513,"name":"int","nodeType":"ElementaryTypeName","src":"1530:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4520,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4515,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1545:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4517,"indexExpression":{"argumentTypes":null,"id":4516,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1553:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1545:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4518,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"1545:21:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":4519,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1545:23:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1530:38:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":4535,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4531,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1640:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4532,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1652:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4534,"indexExpression":{"argumentTypes":null,"id":4533,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1661:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1652:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1640:23:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4548,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4544,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1794:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4546,"indexExpression":{"argumentTypes":null,"id":4545,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1806:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4547,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1812:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1794:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4563,"nodeType":"IfStatement","src":"1790:171:20","trueBody":{"id":4562,"nodeType":"Block","src":"1815:146:20","statements":[{"expression":{"argumentTypes":null,"id":4553,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4549,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1841:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4551,"indexExpression":{"argumentTypes":null,"id":4550,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1850:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1841:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4552,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1855:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1841:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4554,"nodeType":"ExpressionStatement","src":"1841:22:20"},{"expression":{"argumentTypes":null,"id":4559,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4555,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1889:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4557,"indexExpression":{"argumentTypes":null,"id":4556,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1901:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1889:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1906:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1889:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4560,"nodeType":"ExpressionStatement","src":"1889:18:20"},{"id":4561,"nodeType":"Break","src":"1933:5:20"}]}},"id":4564,"nodeType":"IfStatement","src":"1636:325:20","trueBody":{"id":4543,"nodeType":"Block","src":"1665:99:20","statements":[{"expression":{"argumentTypes":null,"id":4540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4536,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1691:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4538,"indexExpression":{"argumentTypes":null,"id":4537,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1703:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1691:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1709:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1691:19:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4541,"nodeType":"ExpressionStatement","src":"1691:19:20"},{"id":4542,"nodeType":"Break","src":"1736:5:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4525,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1603:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":4526,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1608:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1603:6:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4565,"initializationExpression":{"assignments":[4522],"declarations":[{"constant":false,"id":4522,"name":"j","nodeType":"VariableDeclaration","scope":4625,"src":"1591:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4521,"name":"uint","nodeType":"ElementaryTypeName","src":"1591:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4524,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4523,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1600:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1591:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1611:3:20","subExpression":{"argumentTypes":null,"id":4528,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1611:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4530,"nodeType":"ExpressionStatement","src":"1611:3:20"},"nodeType":"ForStatement","src":"1586:375:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4501,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1444:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4502,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1448:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4503,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1448:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1444:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4568,"initializationExpression":{"expression":{"argumentTypes":null,"id":4499,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4497,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1437:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4498,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1441:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1437:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4500,"nodeType":"ExpressionStatement","src":"1437:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4506,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1464:3:20","subExpression":{"argumentTypes":null,"id":4505,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1464:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4507,"nodeType":"ExpressionStatement","src":"1464:3:20"},"nodeType":"ForStatement","src":"1432:543:20"},{"assignments":[4570],"declarations":[{"constant":false,"id":4570,"name":"outcomeValidations","nodeType":"VariableDeclaration","scope":4625,"src":"1984:23:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4569,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4572,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4571,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2010:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1984:27:20"},{"assignments":[4574],"declarations":[{"constant":false,"id":4574,"name":"outcomeIndex","nodeType":"VariableDeclaration","scope":4625,"src":"2021:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4573,"name":"uint","nodeType":"ElementaryTypeName","src":"2021:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4576,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4575,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2041:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2021:21:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4592,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4588,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2105:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4590,"indexExpression":{"argumentTypes":null,"id":4589,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2117:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2105:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4591,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2122:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2105:35:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4604,"nodeType":"IfStatement","src":"2101:143:20","trueBody":{"id":4603,"nodeType":"Block","src":"2142:102:20","statements":[{"expression":{"argumentTypes":null,"id":4597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4593,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2160:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4594,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2181:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4596,"indexExpression":{"argumentTypes":null,"id":4595,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2193:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2181:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2160:35:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4598,"nodeType":"ExpressionStatement","src":"2160:35:20"},{"expression":{"argumentTypes":null,"id":4601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4599,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2213:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4600,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2228:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2213:16:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4602,"nodeType":"ExpressionStatement","src":"2213:16:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4581,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2064:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4582,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2068:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4583,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2068:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2064:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4605,"initializationExpression":{"expression":{"argumentTypes":null,"id":4579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4577,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2057:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4578,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2061:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2057:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4580,"nodeType":"ExpressionStatement","src":"2057:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2084:3:20","subExpression":{"argumentTypes":null,"id":4585,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2084:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4587,"nodeType":"ExpressionStatement","src":"2084:3:20"},"nodeType":"ForStatement","src":"2052:192:20"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4608,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4606,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2293:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4607,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2314:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2293:22:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4609,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2318:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4610,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2318:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2293:39:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4623,"nodeType":"IfStatement","src":"2289:133:20","trueBody":{"id":4622,"nodeType":"Block","src":"2334:88:20","statements":[{"expression":{"argumentTypes":null,"id":4614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4612,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4468,"src":"2348:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2361:4:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2348:17:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4615,"nodeType":"ExpressionStatement","src":"2348:17:20"},{"expression":{"argumentTypes":null,"id":4620,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4616,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4470,"src":"2379:7:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4617,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"2389:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4619,"indexExpression":{"argumentTypes":null,"id":4618,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2398:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2389:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2379:32:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4621,"nodeType":"ExpressionStatement","src":"2379:32:20"}]}}]},"documentation":"@dev Allows to registers oracles for a majority vote\n @return Is outcome set?\n @return Outcome","id":4625,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getStatusAndOutcome","nodeType":"FunctionDefinition","parameters":{"id":4466,"nodeType":"ParameterList","parameters":[],"src":"1201:2:20"},"payable":false,"returnParameters":{"id":4471,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4468,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4625,"src":"1249:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4467,"name":"bool","nodeType":"ElementaryTypeName","src":"1249:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},{"constant":false,"id":4470,"name":"outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1266:11:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4469,"name":"int","nodeType":"ElementaryTypeName","src":"1266:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1248:30:20"},"scope":4652,"src":"1173:1255:20","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":4637,"nodeType":"Block","src":"2592:87:20","statements":[{"assignments":[4631,null],"declarations":[{"constant":false,"id":4631,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4638,"src":"2603:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4630,"name":"bool","nodeType":"ElementaryTypeName","src":"2603:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},null],"id":4634,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4632,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2624:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2624:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2602:43:20"},{"expression":{"argumentTypes":null,"id":4635,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4631,"src":"2662:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4629,"id":4636,"nodeType":"Return","src":"2655:17:20"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4638,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4626,"nodeType":"ParameterList","parameters":[],"src":"2534:2:20"},"payable":false,"returnParameters":{"id":4629,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4628,"name":"","nodeType":"VariableDeclaration","scope":4638,"src":"2582:4:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4627,"name":"bool","nodeType":"ElementaryTypeName","src":"2582:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2581:6:20"},"scope":4652,"src":"2513:166:20","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4650,"nodeType":"Block","src":"2822:94:20","statements":[{"assignments":[null,4644],"declarations":[null,{"constant":false,"id":4644,"name":"winningOutcome","nodeType":"VariableDeclaration","scope":4651,"src":"2835:18:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4643,"name":"int","nodeType":"ElementaryTypeName","src":"2835:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4647,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4645,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2857:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4646,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2857:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2832:46:20"},{"expression":{"argumentTypes":null,"id":4648,"name":"winningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4644,"src":"2895:14:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4642,"id":4649,"nodeType":"Return","src":"2888:21:20"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4651,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4639,"nodeType":"ParameterList","parameters":[],"src":"2765:2:20"},"payable":false,"returnParameters":{"id":4642,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4641,"name":"","nodeType":"VariableDeclaration","scope":4651,"src":"2813:3:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4640,"name":"int","nodeType":"ElementaryTypeName","src":"2813:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2812:5:20"},"scope":4652,"src":"2746:170:20","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4653,"src":"946:1972:20"}],"src":"0:2919:20"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/MajorityOracle.sol","exportedSymbols":{"MajorityOracle":[4652],"MajorityOracleData":[4409],"MajorityOracleProxy":[4459]},"id":4653,"nodeType":"SourceUnit","nodes":[{"id":4403,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:20"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4404,"nodeType":"ImportDirective","scope":4653,"sourceUnit":4718,"src":"25:31:20","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4405,"nodeType":"ImportDirective","scope":4653,"sourceUnit":6702,"src":"57:55:20","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4409,"linearizedBaseContracts":[4409],"name":"MajorityOracleData","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":4408,"name":"oracles","nodeType":"VariableDeclaration","scope":4409,"src":"181:23:20","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4406,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"181:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4407,"length":null,"nodeType":"ArrayTypeName","src":"181:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"public"}],"scope":4653,"src":"115:92:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4410,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"241:5:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4411,"nodeType":"InheritanceSpecifier","src":"241:5:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4412,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"248:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4413,"nodeType":"InheritanceSpecifier","src":"248:18:20"}],"contractDependencies":[4409,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4459,"linearizedBaseContracts":[4459,4409,6701,6673],"name":"MajorityOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4457,"nodeType":"Block","src":"520:265:20","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4425,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"586:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4426,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"586:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4427,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"604:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"586:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4424,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"578:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4429,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"578:28:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4430,"nodeType":"ExpressionStatement","src":"578:28:20"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4449,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4444,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"732:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4446,"indexExpression":{"argumentTypes":null,"id":4445,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"741:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"732:11:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":4443,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"724:7:20","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":4447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"724:20:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4448,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"748:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"724:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4442,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"716:7:20","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4450,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"716:34:20","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4451,"nodeType":"ExpressionStatement","src":"716:34:20"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4435,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"633:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4436,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"637:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"id":4437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"637:15:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"633:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4452,"initializationExpression":{"assignments":[4432],"declarations":[{"constant":false,"id":4432,"name":"i","nodeType":"VariableDeclaration","scope":4458,"src":"621:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4431,"name":"uint","nodeType":"ElementaryTypeName","src":"621:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4434,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4433,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"630:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"621:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4440,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"654:3:20","subExpression":{"argumentTypes":null,"id":4439,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4432,"src":"654:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4441,"nodeType":"ExpressionStatement","src":"654:3:20"},"nodeType":"ForStatement","src":"616:134:20"},{"expression":{"argumentTypes":null,"id":4455,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4453,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"760:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4454,"name":"_oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4418,"src":"770:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[] memory"}},"src":"760:18:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4456,"nodeType":"ExpressionStatement","src":"760:18:20"}]},"documentation":"@dev Allows to create an oracle for a majority vote based on other oracles\n @param _oracles List of oracles taking part in the majority vote","id":4458,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4421,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4415,"src":"492:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4422,"modifierName":{"argumentTypes":null,"id":4420,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"486:5:20","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"486:14:20"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4419,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4415,"name":"proxied","nodeType":"VariableDeclaration","scope":4458,"src":"442:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4414,"name":"address","nodeType":"ElementaryTypeName","src":"442:7:20","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4418,"name":"_oracles","nodeType":"VariableDeclaration","scope":4458,"src":"459:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_memory_ptr","typeString":"contract Oracle[]"},"typeName":{"baseType":{"contractScope":null,"id":4416,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"459:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4417,"length":null,"nodeType":"ArrayTypeName","src":"459:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage_ptr","typeString":"contract Oracle[]"}},"value":null,"visibility":"internal"}],"src":"441:36:20"},"payable":false,"returnParameters":{"id":4423,"nodeType":"ParameterList","parameters":[],"src":"520:0:20"},"scope":4459,"src":"430:355:20","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4653,"src":"209:578:20"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4460,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"973:7:20","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4461,"nodeType":"InheritanceSpecifier","src":"973:7:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4462,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"982:6:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4463,"nodeType":"InheritanceSpecifier","src":"982:6:20"},{"arguments":null,"baseName":{"contractScope":null,"id":4464,"name":"MajorityOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4409,"src":"990:18:20","typeDescriptions":{"typeIdentifier":"t_contract$_MajorityOracleData_$4409","typeString":"contract MajorityOracleData"}},"id":4465,"nodeType":"InheritanceSpecifier","src":"990:18:20"}],"contractDependencies":[4409,4717,6673],"contractKind":"contract","documentation":"@title Majority oracle contract - Allows to resolve an event based on multiple oracles with majority vote\n @author Stefan George - ","fullyImplemented":true,"id":4652,"linearizedBaseContracts":[4652,4409,4717,6673],"name":"MajorityOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4624,"nodeType":"Block","src":"1283:1145:20","statements":[{"assignments":[],"declarations":[{"constant":false,"id":4473,"name":"i","nodeType":"VariableDeclaration","scope":4625,"src":"1293:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4472,"name":"uint","nodeType":"ElementaryTypeName","src":"1293:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4474,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"1293:6:20"},{"assignments":[4478],"declarations":[{"constant":false,"id":4478,"name":"outcomes","nodeType":"VariableDeclaration","scope":4625,"src":"1309:21:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":4476,"name":"int","nodeType":"ElementaryTypeName","src":"1309:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4477,"length":null,"nodeType":"ArrayTypeName","src":"1309:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":4485,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4482,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1343:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4483,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1343:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4481,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1333:9:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":4479,"name":"int","nodeType":"ElementaryTypeName","src":"1337:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4480,"length":null,"nodeType":"ArrayTypeName","src":"1337:5:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":4484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1333:25:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1309:49:20"},{"assignments":[4489],"declarations":[{"constant":false,"id":4489,"name":"validations","nodeType":"VariableDeclaration","scope":4625,"src":"1368:25:20","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[]"},"typeName":{"baseType":{"id":4487,"name":"uint","nodeType":"ElementaryTypeName","src":"1368:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4488,"length":null,"nodeType":"ArrayTypeName","src":"1368:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}},"value":null,"visibility":"internal"}],"id":4496,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4493,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1407:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4494,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1407:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":4492,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"1396:10:20","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$","typeString":"function (uint256) pure returns (uint256[] memory)"},"typeName":{"baseType":{"id":4490,"name":"uint","nodeType":"ElementaryTypeName","src":"1400:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4491,"length":null,"nodeType":"ArrayTypeName","src":"1400:6:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_storage_ptr","typeString":"uint256[]"}}},"id":4495,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1396:26:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory","typeString":"uint256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"1368:54:20"},{"body":{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4508,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1485:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4510,"indexExpression":{"argumentTypes":null,"id":4509,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1493:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1485:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"1485:23:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":4512,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1485:25:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4567,"nodeType":"IfStatement","src":"1481:494:20","trueBody":{"id":4566,"nodeType":"Block","src":"1512:463:20","statements":[{"assignments":[4514],"declarations":[{"constant":false,"id":4514,"name":"_outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1530:12:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4513,"name":"int","nodeType":"ElementaryTypeName","src":"1530:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4520,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4515,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1545:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4517,"indexExpression":{"argumentTypes":null,"id":4516,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1553:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1545:10:20","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4518,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"1545:21:20","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":4519,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1545:23:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"1530:38:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":4535,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4531,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1640:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4532,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1652:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4534,"indexExpression":{"argumentTypes":null,"id":4533,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1661:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1652:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1640:23:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4548,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4544,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1794:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4546,"indexExpression":{"argumentTypes":null,"id":4545,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1806:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1794:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":4547,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1812:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1794:19:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4563,"nodeType":"IfStatement","src":"1790:171:20","trueBody":{"id":4562,"nodeType":"Block","src":"1815:146:20","statements":[{"expression":{"argumentTypes":null,"id":4553,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4549,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"1841:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4551,"indexExpression":{"argumentTypes":null,"id":4550,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1850:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1841:11:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4552,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4514,"src":"1855:8:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1841:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4554,"nodeType":"ExpressionStatement","src":"1841:22:20"},{"expression":{"argumentTypes":null,"id":4559,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4555,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1889:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4557,"indexExpression":{"argumentTypes":null,"id":4556,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1901:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1889:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1906:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1889:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4560,"nodeType":"ExpressionStatement","src":"1889:18:20"},{"id":4561,"nodeType":"Break","src":"1933:5:20"}]}},"id":4564,"nodeType":"IfStatement","src":"1636:325:20","trueBody":{"id":4543,"nodeType":"Block","src":"1665:99:20","statements":[{"expression":{"argumentTypes":null,"id":4540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4536,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"1691:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4538,"indexExpression":{"argumentTypes":null,"id":4537,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1703:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1691:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":4539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1709:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1691:19:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4541,"nodeType":"ExpressionStatement","src":"1691:19:20"},{"id":4542,"nodeType":"Break","src":"1736:5:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4525,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1603:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":4526,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1608:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1603:6:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4565,"initializationExpression":{"assignments":[4522],"declarations":[{"constant":false,"id":4522,"name":"j","nodeType":"VariableDeclaration","scope":4625,"src":"1591:6:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4521,"name":"uint","nodeType":"ElementaryTypeName","src":"1591:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4524,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4523,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1600:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1591:10:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1611:3:20","subExpression":{"argumentTypes":null,"id":4528,"name":"j","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4522,"src":"1611:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4530,"nodeType":"ExpressionStatement","src":"1611:3:20"},"nodeType":"ForStatement","src":"1586:375:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4501,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1444:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4502,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"1448:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4503,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1448:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1444:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4568,"initializationExpression":{"expression":{"argumentTypes":null,"id":4499,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4497,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1437:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4498,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1441:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1437:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4500,"nodeType":"ExpressionStatement","src":"1437:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4506,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1464:3:20","subExpression":{"argumentTypes":null,"id":4505,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"1464:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4507,"nodeType":"ExpressionStatement","src":"1464:3:20"},"nodeType":"ForStatement","src":"1432:543:20"},{"assignments":[4570],"declarations":[{"constant":false,"id":4570,"name":"outcomeValidations","nodeType":"VariableDeclaration","scope":4625,"src":"1984:23:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4569,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4572,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4571,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2010:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1984:27:20"},{"assignments":[4574],"declarations":[{"constant":false,"id":4574,"name":"outcomeIndex","nodeType":"VariableDeclaration","scope":4625,"src":"2021:17:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4573,"name":"uint","nodeType":"ElementaryTypeName","src":"2021:4:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":4576,"initialValue":{"argumentTypes":null,"hexValue":"30","id":4575,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2041:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2021:21:20"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4592,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4588,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2105:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4590,"indexExpression":{"argumentTypes":null,"id":4589,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2117:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2105:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4591,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2122:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2105:35:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4604,"nodeType":"IfStatement","src":"2101:143:20","trueBody":{"id":4603,"nodeType":"Block","src":"2142:102:20","statements":[{"expression":{"argumentTypes":null,"id":4597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4593,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2160:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4594,"name":"validations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4489,"src":"2181:11:20","typeDescriptions":{"typeIdentifier":"t_array$_t_uint256_$dyn_memory_ptr","typeString":"uint256[] memory"}},"id":4596,"indexExpression":{"argumentTypes":null,"id":4595,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2193:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2181:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2160:35:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4598,"nodeType":"ExpressionStatement","src":"2160:35:20"},{"expression":{"argumentTypes":null,"id":4601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4599,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2213:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4600,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2228:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2213:16:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4602,"nodeType":"ExpressionStatement","src":"2213:16:20"}]}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4581,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2064:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4582,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2068:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4583,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2068:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2064:18:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4605,"initializationExpression":{"expression":{"argumentTypes":null,"id":4579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4577,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2057:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":4578,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2061:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2057:5:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4580,"nodeType":"ExpressionStatement","src":"2057:5:20"},"loopExpression":{"expression":{"argumentTypes":null,"id":4586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2084:3:20","subExpression":{"argumentTypes":null,"id":4585,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4473,"src":"2084:1:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4587,"nodeType":"ExpressionStatement","src":"2084:3:20"},"nodeType":"ForStatement","src":"2052:192:20"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4608,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4606,"name":"outcomeValidations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4570,"src":"2293:18:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"32","id":4607,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2314:1:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2293:22:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4609,"name":"oracles","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4408,"src":"2318:7:20","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_Oracle_$4717_$dyn_storage","typeString":"contract Oracle[] storage ref"}},"id":4610,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2318:14:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2293:39:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":4623,"nodeType":"IfStatement","src":"2289:133:20","trueBody":{"id":4622,"nodeType":"Block","src":"2334:88:20","statements":[{"expression":{"argumentTypes":null,"id":4614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4612,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4468,"src":"2348:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2361:4:20","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2348:17:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4615,"nodeType":"ExpressionStatement","src":"2348:17:20"},{"expression":{"argumentTypes":null,"id":4620,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4616,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4470,"src":"2379:7:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":4617,"name":"outcomes","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4478,"src":"2389:8:20","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":4619,"indexExpression":{"argumentTypes":null,"id":4618,"name":"outcomeIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4574,"src":"2398:12:20","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2389:22:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2379:32:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4621,"nodeType":"ExpressionStatement","src":"2379:32:20"}]}}]},"documentation":"@dev Allows to registers oracles for a majority vote\n @return Is outcome set?\n @return Outcome","id":4625,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getStatusAndOutcome","nodeType":"FunctionDefinition","parameters":{"id":4466,"nodeType":"ParameterList","parameters":[],"src":"1201:2:20"},"payable":false,"returnParameters":{"id":4471,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4468,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4625,"src":"1249:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4467,"name":"bool","nodeType":"ElementaryTypeName","src":"1249:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},{"constant":false,"id":4470,"name":"outcome","nodeType":"VariableDeclaration","scope":4625,"src":"1266:11:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4469,"name":"int","nodeType":"ElementaryTypeName","src":"1266:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1248:30:20"},"scope":4652,"src":"1173:1255:20","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":4637,"nodeType":"Block","src":"2592:87:20","statements":[{"assignments":[4631,null],"declarations":[{"constant":false,"id":4631,"name":"outcomeSet","nodeType":"VariableDeclaration","scope":4638,"src":"2603:15:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4630,"name":"bool","nodeType":"ElementaryTypeName","src":"2603:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"},null],"id":4634,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4632,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2624:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2624:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2602:43:20"},{"expression":{"argumentTypes":null,"id":4635,"name":"outcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4631,"src":"2662:10:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4629,"id":4636,"nodeType":"Return","src":"2655:17:20"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":4638,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4626,"nodeType":"ParameterList","parameters":[],"src":"2534:2:20"},"payable":false,"returnParameters":{"id":4629,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4628,"name":"","nodeType":"VariableDeclaration","scope":4638,"src":"2582:4:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4627,"name":"bool","nodeType":"ElementaryTypeName","src":"2582:4:20","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2581:6:20"},"scope":4652,"src":"2513:166:20","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4650,"nodeType":"Block","src":"2822:94:20","statements":[{"assignments":[null,4644],"declarations":[null,{"constant":false,"id":4644,"name":"winningOutcome","nodeType":"VariableDeclaration","scope":4651,"src":"2835:18:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4643,"name":"int","nodeType":"ElementaryTypeName","src":"2835:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":4647,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":4645,"name":"getStatusAndOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4625,"src":"2857:19:20","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$_t_int256_$","typeString":"function () view returns (bool,int256)"}},"id":4646,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2857:21:20","typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_int256_$","typeString":"tuple(bool,int256)"}},"nodeType":"VariableDeclarationStatement","src":"2832:46:20"},{"expression":{"argumentTypes":null,"id":4648,"name":"winningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4644,"src":"2895:14:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4642,"id":4649,"nodeType":"Return","src":"2888:21:20"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4651,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4639,"nodeType":"ParameterList","parameters":[],"src":"2765:2:20"},"payable":false,"returnParameters":{"id":4642,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4641,"name":"","nodeType":"VariableDeclaration","scope":4651,"src":"2813:3:20","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4640,"name":"int","nodeType":"ElementaryTypeName","src":"2813:3:20","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2812:5:20"},"scope":4652,"src":"2746:170:20","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4653,"src":"946:1972:20"}],"src":"0:2919:20"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.026Z"}; /***/ }), @@ -319,10 +527,21 @@ module.exports = {"contract_name":"MajorityOracleFactory","abi":[{"constant":fal /*!**************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Market.json ***! \**************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"Market","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"shortSell","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"sell","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdrawFees","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"outcomeTokenCost","type":"uint256"}],"name":"calcMarketFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_funding","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"maxCost","type":"uint256"}],"name":"buy","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263310}; +module.exports = {"contractName":"Market","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"transactor","type":"address"},{"indexed":false,"name":"outcomeTokenAmounts","type":"int256[]"},{"indexed":false,"name":"outcomeTokenNetCost","type":"int256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenTrade","type":"event"},{"constant":false,"inputs":[{"name":"_funding","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFees","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"maxCost","type":"uint256"}],"name":"buy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"sell","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"shortSell","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenAmounts","type":"int256[]"},{"name":"costLimit","type":"int256"}],"name":"trade","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"outcomeTokenCost","type":"uint256"}],"name":"calcMarketFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\nimport \"../Events/Event.sol\";\nimport \"../MarketMakers/MarketMaker.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract MarketData {\n /*\n * Events\n */\n event MarketFunding(uint funding);\n event MarketClosing();\n event FeeWithdrawal(uint fees);\n event OutcomeTokenPurchase(address indexed buyer, uint8 outcomeTokenIndex, uint outcomeTokenCount, uint outcomeTokenCost, uint marketFees);\n event OutcomeTokenSale(address indexed seller, uint8 outcomeTokenIndex, uint outcomeTokenCount, uint outcomeTokenProfit, uint marketFees);\n event OutcomeTokenShortSale(address indexed buyer, uint8 outcomeTokenIndex, uint outcomeTokenCount, uint cost);\n event OutcomeTokenTrade(address indexed transactor, int[] outcomeTokenAmounts, int outcomeTokenNetCost, uint marketFees);\n\n /*\n * Storage\n */\n address public creator;\n uint public createdAtBlock;\n Event public eventContract;\n MarketMaker public marketMaker;\n uint24 public fee;\n uint public funding;\n int[] public netOutcomeTokensSold;\n Stages public stage;\n\n enum Stages {\n MarketCreated,\n MarketFunded,\n MarketClosed\n }\n}\n\n/// @title Abstract market contract - Functions to be implemented by market contracts\ncontract Market is MarketData {\n /*\n * Public functions\n */\n function fund(uint _funding) public;\n function close() public;\n function withdrawFees() public returns (uint);\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost) public returns (uint);\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit) public returns (uint);\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit) public returns (uint);\n function trade(int[] outcomeTokenAmounts, int costLimit) public returns (int);\n function calcMarketFee(uint outcomeTokenCost) public view returns (uint);\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","exportedSymbols":{"Market":[2238],"MarketData":[2172]},"id":2239,"nodeType":"SourceUnit","nodes":[{"id":2092,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:8"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2093,"nodeType":"ImportDirective","scope":2239,"sourceUnit":385,"src":"25:29:8","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2094,"nodeType":"ImportDirective","scope":2239,"sourceUnit":1572,"src":"55:41:8","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":2095,"nodeType":"ImportDirective","scope":2239,"sourceUnit":6702,"src":"97:55:8","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2172,"linearizedBaseContracts":[2172],"name":"MarketData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":2099,"name":"MarketFunding","nodeType":"EventDefinition","parameters":{"id":2098,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2097,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":2099,"src":"231:12:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2096,"name":"uint","nodeType":"ElementaryTypeName","src":"231:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"230:14:8"},"src":"211:34:8"},{"anonymous":false,"documentation":null,"id":2101,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":2100,"nodeType":"ParameterList","parameters":[],"src":"269:2:8"},"src":"250:22:8"},{"anonymous":false,"documentation":null,"id":2105,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":2104,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2103,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":2105,"src":"297:9:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2102,"name":"uint","nodeType":"ElementaryTypeName","src":"297:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"296:11:8"},"src":"277:31:8"},{"anonymous":false,"documentation":null,"id":2117,"name":"OutcomeTokenPurchase","nodeType":"EventDefinition","parameters":{"id":2116,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2107,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":2117,"src":"340:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2106,"name":"address","nodeType":"ElementaryTypeName","src":"340:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2109,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2117,"src":"363:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2108,"name":"uint8","nodeType":"ElementaryTypeName","src":"363:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2111,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2117,"src":"388:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2110,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2113,"indexed":false,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":2117,"src":"412:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2112,"name":"uint","nodeType":"ElementaryTypeName","src":"412:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2115,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2117,"src":"435:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2114,"name":"uint","nodeType":"ElementaryTypeName","src":"435:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"339:112:8"},"src":"313:139:8"},{"anonymous":false,"documentation":null,"id":2129,"name":"OutcomeTokenSale","nodeType":"EventDefinition","parameters":{"id":2128,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2119,"indexed":true,"name":"seller","nodeType":"VariableDeclaration","scope":2129,"src":"480:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2118,"name":"address","nodeType":"ElementaryTypeName","src":"480:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2121,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2129,"src":"504:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2120,"name":"uint8","nodeType":"ElementaryTypeName","src":"504:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2123,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2129,"src":"529:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2122,"name":"uint","nodeType":"ElementaryTypeName","src":"529:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2125,"indexed":false,"name":"outcomeTokenProfit","nodeType":"VariableDeclaration","scope":2129,"src":"553:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2124,"name":"uint","nodeType":"ElementaryTypeName","src":"553:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2127,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2129,"src":"578:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2126,"name":"uint","nodeType":"ElementaryTypeName","src":"578:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"479:115:8"},"src":"457:138:8"},{"anonymous":false,"documentation":null,"id":2139,"name":"OutcomeTokenShortSale","nodeType":"EventDefinition","parameters":{"id":2138,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2131,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":2139,"src":"628:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2130,"name":"address","nodeType":"ElementaryTypeName","src":"628:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2133,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2139,"src":"651:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2132,"name":"uint8","nodeType":"ElementaryTypeName","src":"651:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2135,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2139,"src":"676:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2134,"name":"uint","nodeType":"ElementaryTypeName","src":"676:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2137,"indexed":false,"name":"cost","nodeType":"VariableDeclaration","scope":2139,"src":"700:9:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2136,"name":"uint","nodeType":"ElementaryTypeName","src":"700:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"627:83:8"},"src":"600:111:8"},{"anonymous":false,"documentation":null,"id":2150,"name":"OutcomeTokenTrade","nodeType":"EventDefinition","parameters":{"id":2149,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2141,"indexed":true,"name":"transactor","nodeType":"VariableDeclaration","scope":2150,"src":"740:26:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2140,"name":"address","nodeType":"ElementaryTypeName","src":"740:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2144,"indexed":false,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2150,"src":"768:25:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2142,"name":"int","nodeType":"ElementaryTypeName","src":"768:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2143,"length":null,"nodeType":"ArrayTypeName","src":"768:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2146,"indexed":false,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2150,"src":"795:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2145,"name":"int","nodeType":"ElementaryTypeName","src":"795:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2148,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2150,"src":"820:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2147,"name":"uint","nodeType":"ElementaryTypeName","src":"820:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"739:97:8"},"src":"716:121:8"},{"constant":false,"id":2152,"name":"creator","nodeType":"VariableDeclaration","scope":2172,"src":"874:22:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2151,"name":"address","nodeType":"ElementaryTypeName","src":"874:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":2154,"name":"createdAtBlock","nodeType":"VariableDeclaration","scope":2172,"src":"902:26:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2153,"name":"uint","nodeType":"ElementaryTypeName","src":"902:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":2156,"name":"eventContract","nodeType":"VariableDeclaration","scope":2172,"src":"934:26:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2155,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"934:5:8","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":2158,"name":"marketMaker","nodeType":"VariableDeclaration","scope":2172,"src":"966:30:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2157,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"966:11:8","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":2160,"name":"fee","nodeType":"VariableDeclaration","scope":2172,"src":"1002:17:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2159,"name":"uint24","nodeType":"ElementaryTypeName","src":"1002:6:8","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":2162,"name":"funding","nodeType":"VariableDeclaration","scope":2172,"src":"1025:19:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2161,"name":"uint","nodeType":"ElementaryTypeName","src":"1025:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":2165,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":2172,"src":"1050:33:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[]"},"typeName":{"baseType":{"id":2163,"name":"int","nodeType":"ElementaryTypeName","src":"1050:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2164,"length":null,"nodeType":"ArrayTypeName","src":"1050:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"public"},{"constant":false,"id":2167,"name":"stage","nodeType":"VariableDeclaration","scope":2172,"src":"1089:19:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2166,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1089:6:8","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"MarketData.Stages","id":2171,"members":[{"id":2168,"name":"MarketCreated","nodeType":"EnumValue","src":"1137:13:8"},{"id":2169,"name":"MarketFunded","nodeType":"EnumValue","src":"1160:12:8"},{"id":2170,"name":"MarketClosed","nodeType":"EnumValue","src":"1182:12:8"}],"name":"Stages","nodeType":"EnumDefinition","src":"1115:85:8"}],"scope":2239,"src":"155:1047:8"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2173,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"1309:10:8","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2174,"nodeType":"InheritanceSpecifier","src":"1309:10:8"}],"contractDependencies":[2172],"contractKind":"contract","documentation":"@title Abstract market contract - Functions to be implemented by market contracts","fullyImplemented":false,"id":2238,"linearizedBaseContracts":[2238,2172],"name":"Market","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":2179,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2177,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2176,"name":"_funding","nodeType":"VariableDeclaration","scope":2179,"src":"1380:13:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2175,"name":"uint","nodeType":"ElementaryTypeName","src":"1380:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1379:15:8"},"payable":false,"returnParameters":{"id":2178,"nodeType":"ParameterList","parameters":[],"src":"1401:0:8"},"scope":2238,"src":"1366:36:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2182,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2180,"nodeType":"ParameterList","parameters":[],"src":"1421:2:8"},"payable":false,"returnParameters":{"id":2181,"nodeType":"ParameterList","parameters":[],"src":"1430:0:8"},"scope":2238,"src":"1407:24:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2187,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2183,"nodeType":"ParameterList","parameters":[],"src":"1457:2:8"},"payable":false,"returnParameters":{"id":2186,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2185,"name":"","nodeType":"VariableDeclaration","scope":2187,"src":"1476:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2184,"name":"uint","nodeType":"ElementaryTypeName","src":"1476:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1475:6:8"},"scope":2238,"src":"1436:46:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2198,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2194,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2189,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2198,"src":"1500:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2188,"name":"uint8","nodeType":"ElementaryTypeName","src":"1500:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2191,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2198,"src":"1525:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2190,"name":"uint","nodeType":"ElementaryTypeName","src":"1525:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2193,"name":"maxCost","nodeType":"VariableDeclaration","scope":2198,"src":"1549:12:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2192,"name":"uint","nodeType":"ElementaryTypeName","src":"1549:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1499:63:8"},"payable":false,"returnParameters":{"id":2197,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2196,"name":"","nodeType":"VariableDeclaration","scope":2198,"src":"1579:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2195,"name":"uint","nodeType":"ElementaryTypeName","src":"1579:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1578:6:8"},"scope":2238,"src":"1487:98:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2209,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2205,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2200,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2209,"src":"1604:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2199,"name":"uint8","nodeType":"ElementaryTypeName","src":"1604:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2202,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2209,"src":"1629:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2201,"name":"uint","nodeType":"ElementaryTypeName","src":"1629:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2204,"name":"minProfit","nodeType":"VariableDeclaration","scope":2209,"src":"1653:14:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2203,"name":"uint","nodeType":"ElementaryTypeName","src":"1653:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1603:65:8"},"payable":false,"returnParameters":{"id":2208,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2207,"name":"","nodeType":"VariableDeclaration","scope":2209,"src":"1685:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2206,"name":"uint","nodeType":"ElementaryTypeName","src":"1685:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1684:6:8"},"scope":2238,"src":"1590:101:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2220,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2216,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2211,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2220,"src":"1715:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2210,"name":"uint8","nodeType":"ElementaryTypeName","src":"1715:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2213,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2220,"src":"1740:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2212,"name":"uint","nodeType":"ElementaryTypeName","src":"1740:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2215,"name":"minProfit","nodeType":"VariableDeclaration","scope":2220,"src":"1764:14:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2214,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1714:65:8"},"payable":false,"returnParameters":{"id":2219,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2218,"name":"","nodeType":"VariableDeclaration","scope":2220,"src":"1796:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2217,"name":"uint","nodeType":"ElementaryTypeName","src":"1796:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1795:6:8"},"scope":2238,"src":"1696:106:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2230,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2226,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2223,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2230,"src":"1822:25:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2221,"name":"int","nodeType":"ElementaryTypeName","src":"1822:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2222,"length":null,"nodeType":"ArrayTypeName","src":"1822:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2225,"name":"costLimit","nodeType":"VariableDeclaration","scope":2230,"src":"1849:13:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2224,"name":"int","nodeType":"ElementaryTypeName","src":"1849:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1821:42:8"},"payable":false,"returnParameters":{"id":2229,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2228,"name":"","nodeType":"VariableDeclaration","scope":2230,"src":"1880:3:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2227,"name":"int","nodeType":"ElementaryTypeName","src":"1880:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1879:5:8"},"scope":2238,"src":"1807:78:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2237,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":2233,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2232,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":2237,"src":"1913:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2231,"name":"uint","nodeType":"ElementaryTypeName","src":"1913:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1912:23:8"},"payable":false,"returnParameters":{"id":2236,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2235,"name":"","nodeType":"VariableDeclaration","scope":2237,"src":"1957:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2234,"name":"uint","nodeType":"ElementaryTypeName","src":"1957:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1956:6:8"},"scope":2238,"src":"1890:73:8","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":2239,"src":"1290:675:8"}],"src":"0:1966:8"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","exportedSymbols":{"Market":[2238],"MarketData":[2172]},"id":2239,"nodeType":"SourceUnit","nodes":[{"id":2092,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:8"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2093,"nodeType":"ImportDirective","scope":2239,"sourceUnit":385,"src":"25:29:8","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2094,"nodeType":"ImportDirective","scope":2239,"sourceUnit":1572,"src":"55:41:8","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":2095,"nodeType":"ImportDirective","scope":2239,"sourceUnit":6702,"src":"97:55:8","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2172,"linearizedBaseContracts":[2172],"name":"MarketData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":2099,"name":"MarketFunding","nodeType":"EventDefinition","parameters":{"id":2098,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2097,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":2099,"src":"231:12:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2096,"name":"uint","nodeType":"ElementaryTypeName","src":"231:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"230:14:8"},"src":"211:34:8"},{"anonymous":false,"documentation":null,"id":2101,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":2100,"nodeType":"ParameterList","parameters":[],"src":"269:2:8"},"src":"250:22:8"},{"anonymous":false,"documentation":null,"id":2105,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":2104,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2103,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":2105,"src":"297:9:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2102,"name":"uint","nodeType":"ElementaryTypeName","src":"297:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"296:11:8"},"src":"277:31:8"},{"anonymous":false,"documentation":null,"id":2117,"name":"OutcomeTokenPurchase","nodeType":"EventDefinition","parameters":{"id":2116,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2107,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":2117,"src":"340:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2106,"name":"address","nodeType":"ElementaryTypeName","src":"340:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2109,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2117,"src":"363:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2108,"name":"uint8","nodeType":"ElementaryTypeName","src":"363:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2111,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2117,"src":"388:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2110,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2113,"indexed":false,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":2117,"src":"412:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2112,"name":"uint","nodeType":"ElementaryTypeName","src":"412:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2115,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2117,"src":"435:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2114,"name":"uint","nodeType":"ElementaryTypeName","src":"435:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"339:112:8"},"src":"313:139:8"},{"anonymous":false,"documentation":null,"id":2129,"name":"OutcomeTokenSale","nodeType":"EventDefinition","parameters":{"id":2128,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2119,"indexed":true,"name":"seller","nodeType":"VariableDeclaration","scope":2129,"src":"480:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2118,"name":"address","nodeType":"ElementaryTypeName","src":"480:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2121,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2129,"src":"504:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2120,"name":"uint8","nodeType":"ElementaryTypeName","src":"504:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2123,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2129,"src":"529:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2122,"name":"uint","nodeType":"ElementaryTypeName","src":"529:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2125,"indexed":false,"name":"outcomeTokenProfit","nodeType":"VariableDeclaration","scope":2129,"src":"553:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2124,"name":"uint","nodeType":"ElementaryTypeName","src":"553:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2127,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2129,"src":"578:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2126,"name":"uint","nodeType":"ElementaryTypeName","src":"578:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"479:115:8"},"src":"457:138:8"},{"anonymous":false,"documentation":null,"id":2139,"name":"OutcomeTokenShortSale","nodeType":"EventDefinition","parameters":{"id":2138,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2131,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":2139,"src":"628:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2130,"name":"address","nodeType":"ElementaryTypeName","src":"628:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2133,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2139,"src":"651:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2132,"name":"uint8","nodeType":"ElementaryTypeName","src":"651:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2135,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2139,"src":"676:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2134,"name":"uint","nodeType":"ElementaryTypeName","src":"676:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2137,"indexed":false,"name":"cost","nodeType":"VariableDeclaration","scope":2139,"src":"700:9:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2136,"name":"uint","nodeType":"ElementaryTypeName","src":"700:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"627:83:8"},"src":"600:111:8"},{"anonymous":false,"documentation":null,"id":2150,"name":"OutcomeTokenTrade","nodeType":"EventDefinition","parameters":{"id":2149,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2141,"indexed":true,"name":"transactor","nodeType":"VariableDeclaration","scope":2150,"src":"740:26:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2140,"name":"address","nodeType":"ElementaryTypeName","src":"740:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2144,"indexed":false,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2150,"src":"768:25:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2142,"name":"int","nodeType":"ElementaryTypeName","src":"768:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2143,"length":null,"nodeType":"ArrayTypeName","src":"768:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2146,"indexed":false,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2150,"src":"795:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2145,"name":"int","nodeType":"ElementaryTypeName","src":"795:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2148,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2150,"src":"820:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2147,"name":"uint","nodeType":"ElementaryTypeName","src":"820:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"739:97:8"},"src":"716:121:8"},{"constant":false,"id":2152,"name":"creator","nodeType":"VariableDeclaration","scope":2172,"src":"874:22:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2151,"name":"address","nodeType":"ElementaryTypeName","src":"874:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":2154,"name":"createdAtBlock","nodeType":"VariableDeclaration","scope":2172,"src":"902:26:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2153,"name":"uint","nodeType":"ElementaryTypeName","src":"902:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":2156,"name":"eventContract","nodeType":"VariableDeclaration","scope":2172,"src":"934:26:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2155,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"934:5:8","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":2158,"name":"marketMaker","nodeType":"VariableDeclaration","scope":2172,"src":"966:30:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2157,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"966:11:8","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":2160,"name":"fee","nodeType":"VariableDeclaration","scope":2172,"src":"1002:17:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2159,"name":"uint24","nodeType":"ElementaryTypeName","src":"1002:6:8","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":2162,"name":"funding","nodeType":"VariableDeclaration","scope":2172,"src":"1025:19:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2161,"name":"uint","nodeType":"ElementaryTypeName","src":"1025:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":2165,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":2172,"src":"1050:33:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[]"},"typeName":{"baseType":{"id":2163,"name":"int","nodeType":"ElementaryTypeName","src":"1050:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2164,"length":null,"nodeType":"ArrayTypeName","src":"1050:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"public"},{"constant":false,"id":2167,"name":"stage","nodeType":"VariableDeclaration","scope":2172,"src":"1089:19:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2166,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1089:6:8","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"MarketData.Stages","id":2171,"members":[{"id":2168,"name":"MarketCreated","nodeType":"EnumValue","src":"1137:13:8"},{"id":2169,"name":"MarketFunded","nodeType":"EnumValue","src":"1160:12:8"},{"id":2170,"name":"MarketClosed","nodeType":"EnumValue","src":"1182:12:8"}],"name":"Stages","nodeType":"EnumDefinition","src":"1115:85:8"}],"scope":2239,"src":"155:1047:8"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2173,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"1309:10:8","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2174,"nodeType":"InheritanceSpecifier","src":"1309:10:8"}],"contractDependencies":[2172],"contractKind":"contract","documentation":"@title Abstract market contract - Functions to be implemented by market contracts","fullyImplemented":false,"id":2238,"linearizedBaseContracts":[2238,2172],"name":"Market","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":2179,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2177,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2176,"name":"_funding","nodeType":"VariableDeclaration","scope":2179,"src":"1380:13:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2175,"name":"uint","nodeType":"ElementaryTypeName","src":"1380:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1379:15:8"},"payable":false,"returnParameters":{"id":2178,"nodeType":"ParameterList","parameters":[],"src":"1401:0:8"},"scope":2238,"src":"1366:36:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2182,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2180,"nodeType":"ParameterList","parameters":[],"src":"1421:2:8"},"payable":false,"returnParameters":{"id":2181,"nodeType":"ParameterList","parameters":[],"src":"1430:0:8"},"scope":2238,"src":"1407:24:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2187,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2183,"nodeType":"ParameterList","parameters":[],"src":"1457:2:8"},"payable":false,"returnParameters":{"id":2186,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2185,"name":"","nodeType":"VariableDeclaration","scope":2187,"src":"1476:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2184,"name":"uint","nodeType":"ElementaryTypeName","src":"1476:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1475:6:8"},"scope":2238,"src":"1436:46:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2198,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2194,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2189,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2198,"src":"1500:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2188,"name":"uint8","nodeType":"ElementaryTypeName","src":"1500:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2191,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2198,"src":"1525:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2190,"name":"uint","nodeType":"ElementaryTypeName","src":"1525:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2193,"name":"maxCost","nodeType":"VariableDeclaration","scope":2198,"src":"1549:12:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2192,"name":"uint","nodeType":"ElementaryTypeName","src":"1549:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1499:63:8"},"payable":false,"returnParameters":{"id":2197,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2196,"name":"","nodeType":"VariableDeclaration","scope":2198,"src":"1579:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2195,"name":"uint","nodeType":"ElementaryTypeName","src":"1579:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1578:6:8"},"scope":2238,"src":"1487:98:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2209,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2205,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2200,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2209,"src":"1604:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2199,"name":"uint8","nodeType":"ElementaryTypeName","src":"1604:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2202,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2209,"src":"1629:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2201,"name":"uint","nodeType":"ElementaryTypeName","src":"1629:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2204,"name":"minProfit","nodeType":"VariableDeclaration","scope":2209,"src":"1653:14:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2203,"name":"uint","nodeType":"ElementaryTypeName","src":"1653:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1603:65:8"},"payable":false,"returnParameters":{"id":2208,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2207,"name":"","nodeType":"VariableDeclaration","scope":2209,"src":"1685:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2206,"name":"uint","nodeType":"ElementaryTypeName","src":"1685:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1684:6:8"},"scope":2238,"src":"1590:101:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2220,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2216,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2211,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2220,"src":"1715:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2210,"name":"uint8","nodeType":"ElementaryTypeName","src":"1715:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2213,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2220,"src":"1740:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2212,"name":"uint","nodeType":"ElementaryTypeName","src":"1740:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2215,"name":"minProfit","nodeType":"VariableDeclaration","scope":2220,"src":"1764:14:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2214,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1714:65:8"},"payable":false,"returnParameters":{"id":2219,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2218,"name":"","nodeType":"VariableDeclaration","scope":2220,"src":"1796:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2217,"name":"uint","nodeType":"ElementaryTypeName","src":"1796:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1795:6:8"},"scope":2238,"src":"1696:106:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2230,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2226,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2223,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2230,"src":"1822:25:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2221,"name":"int","nodeType":"ElementaryTypeName","src":"1822:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2222,"length":null,"nodeType":"ArrayTypeName","src":"1822:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2225,"name":"costLimit","nodeType":"VariableDeclaration","scope":2230,"src":"1849:13:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2224,"name":"int","nodeType":"ElementaryTypeName","src":"1849:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1821:42:8"},"payable":false,"returnParameters":{"id":2229,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2228,"name":"","nodeType":"VariableDeclaration","scope":2230,"src":"1880:3:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2227,"name":"int","nodeType":"ElementaryTypeName","src":"1880:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1879:5:8"},"scope":2238,"src":"1807:78:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2237,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":2233,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2232,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":2237,"src":"1913:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2231,"name":"uint","nodeType":"ElementaryTypeName","src":"1913:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1912:23:8"},"payable":false,"returnParameters":{"id":2236,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2235,"name":"","nodeType":"VariableDeclaration","scope":2237,"src":"1957:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2234,"name":"uint","nodeType":"ElementaryTypeName","src":"1957:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1956:6:8"},"scope":2238,"src":"1890:73:8","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":2239,"src":"1290:675:8"}],"src":"0:1966:8"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.997Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/MarketData.json": +/*!******************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/MarketData.json ***! + \******************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"MarketData","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"transactor","type":"address"},{"indexed":false,"name":"outcomeTokenAmounts","type":"int256[]"},{"indexed":false,"name":"outcomeTokenNetCost","type":"int256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenTrade","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b50610391806100206000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100935780631f21f9af146100ea57806359acb42c14610141578063a157979c1461016c578063c040e6b8146101ad578063cb4c86b7146101e6578063ddca3f4314610211578063e274fd2414610246575b600080fd5b34801561009f57600080fd5b506100a861029d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100f657600080fd5b506100ff6102c2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014d57600080fd5b506101566102e8565b6040518082815260200191505060405180910390f35b34801561017857600080fd5b50610197600480360381019080803590602001909291905050506102ee565b6040518082815260200191505060405180910390f35b3480156101b957600080fd5b506101c2610311565b604051808260028111156101d257fe5b60ff16815260200191505060405180910390f35b3480156101f257600080fd5b506101fb610324565b6040518082815260200191505060405180910390f35b34801561021d57600080fd5b5061022661032a565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561025257600080fd5b5061025b61033f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6005818154811015156102fd57fe5b906000526020600020016000915090505481565b600660009054906101000a900460ff1681565b60045481565b600360149054906101000a900462ffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058202b1dbab3b58681bd13430c280cfb6701d6078c936f98e40fd1c3a2a7f241f50f0029","deployedBytecode":"0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100935780631f21f9af146100ea57806359acb42c14610141578063a157979c1461016c578063c040e6b8146101ad578063cb4c86b7146101e6578063ddca3f4314610211578063e274fd2414610246575b600080fd5b34801561009f57600080fd5b506100a861029d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100f657600080fd5b506100ff6102c2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014d57600080fd5b506101566102e8565b6040518082815260200191505060405180910390f35b34801561017857600080fd5b50610197600480360381019080803590602001909291905050506102ee565b6040518082815260200191505060405180910390f35b3480156101b957600080fd5b506101c2610311565b604051808260028111156101d257fe5b60ff16815260200191505060405180910390f35b3480156101f257600080fd5b506101fb610324565b6040518082815260200191505060405180910390f35b34801561021d57600080fd5b5061022661032a565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561025257600080fd5b5061025b61033f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6005818154811015156102fd57fe5b906000526020600020016000915090505481565b600660009054906101000a900460ff1681565b60045481565b600360149054906101000a900462ffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058202b1dbab3b58681bd13430c280cfb6701d6078c936f98e40fd1c3a2a7f241f50f0029","sourceMap":"155:1047:8:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;155:1047:8;;;;;;;","deployedSourceMap":"155:1047:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;874:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;874:22:8;;;;;;;;;;;;;;;;;;;;;;;;;;;966:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;966:30:8;;;;;;;;;;;;;;;;;;;;;;;;;;;902:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;902:26:8;;;;;;;;;;;;;;;;;;;;;;;1050:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1050:33:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1089:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:19:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1025;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1025:19:8;;;;;;;;;;;;;;;;;;;;;;;1002:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1002:17:8;;;;;;;;;;;;;;;;;;;;;;;;;;;934:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;934:26:8;;;;;;;;;;;;;;;;;;;;;;;;;;;874:22;;;;;;;;;;;;;:::o;966:30::-;;;;;;;;;;;;;:::o;902:26::-;;;;:::o;1050:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1089:19::-;;;;;;;;;;;;;:::o;1025:::-;;;;:::o;1002:17::-;;;;;;;;;;;;;:::o;934:26::-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Events/Event.sol\";\nimport \"../MarketMakers/MarketMaker.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract MarketData {\n /*\n * Events\n */\n event MarketFunding(uint funding);\n event MarketClosing();\n event FeeWithdrawal(uint fees);\n event OutcomeTokenPurchase(address indexed buyer, uint8 outcomeTokenIndex, uint outcomeTokenCount, uint outcomeTokenCost, uint marketFees);\n event OutcomeTokenSale(address indexed seller, uint8 outcomeTokenIndex, uint outcomeTokenCount, uint outcomeTokenProfit, uint marketFees);\n event OutcomeTokenShortSale(address indexed buyer, uint8 outcomeTokenIndex, uint outcomeTokenCount, uint cost);\n event OutcomeTokenTrade(address indexed transactor, int[] outcomeTokenAmounts, int outcomeTokenNetCost, uint marketFees);\n\n /*\n * Storage\n */\n address public creator;\n uint public createdAtBlock;\n Event public eventContract;\n MarketMaker public marketMaker;\n uint24 public fee;\n uint public funding;\n int[] public netOutcomeTokensSold;\n Stages public stage;\n\n enum Stages {\n MarketCreated,\n MarketFunded,\n MarketClosed\n }\n}\n\n/// @title Abstract market contract - Functions to be implemented by market contracts\ncontract Market is MarketData {\n /*\n * Public functions\n */\n function fund(uint _funding) public;\n function close() public;\n function withdrawFees() public returns (uint);\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost) public returns (uint);\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit) public returns (uint);\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit) public returns (uint);\n function trade(int[] outcomeTokenAmounts, int costLimit) public returns (int);\n function calcMarketFee(uint outcomeTokenCost) public view returns (uint);\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","exportedSymbols":{"Market":[2238],"MarketData":[2172]},"id":2239,"nodeType":"SourceUnit","nodes":[{"id":2092,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:8"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2093,"nodeType":"ImportDirective","scope":2239,"sourceUnit":385,"src":"25:29:8","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2094,"nodeType":"ImportDirective","scope":2239,"sourceUnit":1572,"src":"55:41:8","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":2095,"nodeType":"ImportDirective","scope":2239,"sourceUnit":6702,"src":"97:55:8","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2172,"linearizedBaseContracts":[2172],"name":"MarketData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":2099,"name":"MarketFunding","nodeType":"EventDefinition","parameters":{"id":2098,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2097,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":2099,"src":"231:12:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2096,"name":"uint","nodeType":"ElementaryTypeName","src":"231:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"230:14:8"},"src":"211:34:8"},{"anonymous":false,"documentation":null,"id":2101,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":2100,"nodeType":"ParameterList","parameters":[],"src":"269:2:8"},"src":"250:22:8"},{"anonymous":false,"documentation":null,"id":2105,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":2104,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2103,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":2105,"src":"297:9:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2102,"name":"uint","nodeType":"ElementaryTypeName","src":"297:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"296:11:8"},"src":"277:31:8"},{"anonymous":false,"documentation":null,"id":2117,"name":"OutcomeTokenPurchase","nodeType":"EventDefinition","parameters":{"id":2116,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2107,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":2117,"src":"340:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2106,"name":"address","nodeType":"ElementaryTypeName","src":"340:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2109,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2117,"src":"363:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2108,"name":"uint8","nodeType":"ElementaryTypeName","src":"363:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2111,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2117,"src":"388:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2110,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2113,"indexed":false,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":2117,"src":"412:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2112,"name":"uint","nodeType":"ElementaryTypeName","src":"412:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2115,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2117,"src":"435:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2114,"name":"uint","nodeType":"ElementaryTypeName","src":"435:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"339:112:8"},"src":"313:139:8"},{"anonymous":false,"documentation":null,"id":2129,"name":"OutcomeTokenSale","nodeType":"EventDefinition","parameters":{"id":2128,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2119,"indexed":true,"name":"seller","nodeType":"VariableDeclaration","scope":2129,"src":"480:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2118,"name":"address","nodeType":"ElementaryTypeName","src":"480:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2121,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2129,"src":"504:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2120,"name":"uint8","nodeType":"ElementaryTypeName","src":"504:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2123,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2129,"src":"529:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2122,"name":"uint","nodeType":"ElementaryTypeName","src":"529:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2125,"indexed":false,"name":"outcomeTokenProfit","nodeType":"VariableDeclaration","scope":2129,"src":"553:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2124,"name":"uint","nodeType":"ElementaryTypeName","src":"553:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2127,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2129,"src":"578:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2126,"name":"uint","nodeType":"ElementaryTypeName","src":"578:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"479:115:8"},"src":"457:138:8"},{"anonymous":false,"documentation":null,"id":2139,"name":"OutcomeTokenShortSale","nodeType":"EventDefinition","parameters":{"id":2138,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2131,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":2139,"src":"628:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2130,"name":"address","nodeType":"ElementaryTypeName","src":"628:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2133,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2139,"src":"651:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2132,"name":"uint8","nodeType":"ElementaryTypeName","src":"651:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2135,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2139,"src":"676:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2134,"name":"uint","nodeType":"ElementaryTypeName","src":"676:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2137,"indexed":false,"name":"cost","nodeType":"VariableDeclaration","scope":2139,"src":"700:9:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2136,"name":"uint","nodeType":"ElementaryTypeName","src":"700:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"627:83:8"},"src":"600:111:8"},{"anonymous":false,"documentation":null,"id":2150,"name":"OutcomeTokenTrade","nodeType":"EventDefinition","parameters":{"id":2149,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2141,"indexed":true,"name":"transactor","nodeType":"VariableDeclaration","scope":2150,"src":"740:26:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2140,"name":"address","nodeType":"ElementaryTypeName","src":"740:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2144,"indexed":false,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2150,"src":"768:25:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2142,"name":"int","nodeType":"ElementaryTypeName","src":"768:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2143,"length":null,"nodeType":"ArrayTypeName","src":"768:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2146,"indexed":false,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2150,"src":"795:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2145,"name":"int","nodeType":"ElementaryTypeName","src":"795:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2148,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2150,"src":"820:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2147,"name":"uint","nodeType":"ElementaryTypeName","src":"820:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"739:97:8"},"src":"716:121:8"},{"constant":false,"id":2152,"name":"creator","nodeType":"VariableDeclaration","scope":2172,"src":"874:22:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2151,"name":"address","nodeType":"ElementaryTypeName","src":"874:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":2154,"name":"createdAtBlock","nodeType":"VariableDeclaration","scope":2172,"src":"902:26:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2153,"name":"uint","nodeType":"ElementaryTypeName","src":"902:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":2156,"name":"eventContract","nodeType":"VariableDeclaration","scope":2172,"src":"934:26:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2155,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"934:5:8","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":2158,"name":"marketMaker","nodeType":"VariableDeclaration","scope":2172,"src":"966:30:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2157,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"966:11:8","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":2160,"name":"fee","nodeType":"VariableDeclaration","scope":2172,"src":"1002:17:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2159,"name":"uint24","nodeType":"ElementaryTypeName","src":"1002:6:8","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":2162,"name":"funding","nodeType":"VariableDeclaration","scope":2172,"src":"1025:19:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2161,"name":"uint","nodeType":"ElementaryTypeName","src":"1025:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":2165,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":2172,"src":"1050:33:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[]"},"typeName":{"baseType":{"id":2163,"name":"int","nodeType":"ElementaryTypeName","src":"1050:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2164,"length":null,"nodeType":"ArrayTypeName","src":"1050:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"public"},{"constant":false,"id":2167,"name":"stage","nodeType":"VariableDeclaration","scope":2172,"src":"1089:19:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2166,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1089:6:8","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"MarketData.Stages","id":2171,"members":[{"id":2168,"name":"MarketCreated","nodeType":"EnumValue","src":"1137:13:8"},{"id":2169,"name":"MarketFunded","nodeType":"EnumValue","src":"1160:12:8"},{"id":2170,"name":"MarketClosed","nodeType":"EnumValue","src":"1182:12:8"}],"name":"Stages","nodeType":"EnumDefinition","src":"1115:85:8"}],"scope":2239,"src":"155:1047:8"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2173,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"1309:10:8","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2174,"nodeType":"InheritanceSpecifier","src":"1309:10:8"}],"contractDependencies":[2172],"contractKind":"contract","documentation":"@title Abstract market contract - Functions to be implemented by market contracts","fullyImplemented":false,"id":2238,"linearizedBaseContracts":[2238,2172],"name":"Market","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":2179,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2177,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2176,"name":"_funding","nodeType":"VariableDeclaration","scope":2179,"src":"1380:13:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2175,"name":"uint","nodeType":"ElementaryTypeName","src":"1380:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1379:15:8"},"payable":false,"returnParameters":{"id":2178,"nodeType":"ParameterList","parameters":[],"src":"1401:0:8"},"scope":2238,"src":"1366:36:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2182,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2180,"nodeType":"ParameterList","parameters":[],"src":"1421:2:8"},"payable":false,"returnParameters":{"id":2181,"nodeType":"ParameterList","parameters":[],"src":"1430:0:8"},"scope":2238,"src":"1407:24:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2187,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2183,"nodeType":"ParameterList","parameters":[],"src":"1457:2:8"},"payable":false,"returnParameters":{"id":2186,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2185,"name":"","nodeType":"VariableDeclaration","scope":2187,"src":"1476:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2184,"name":"uint","nodeType":"ElementaryTypeName","src":"1476:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1475:6:8"},"scope":2238,"src":"1436:46:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2198,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2194,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2189,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2198,"src":"1500:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2188,"name":"uint8","nodeType":"ElementaryTypeName","src":"1500:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2191,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2198,"src":"1525:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2190,"name":"uint","nodeType":"ElementaryTypeName","src":"1525:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2193,"name":"maxCost","nodeType":"VariableDeclaration","scope":2198,"src":"1549:12:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2192,"name":"uint","nodeType":"ElementaryTypeName","src":"1549:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1499:63:8"},"payable":false,"returnParameters":{"id":2197,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2196,"name":"","nodeType":"VariableDeclaration","scope":2198,"src":"1579:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2195,"name":"uint","nodeType":"ElementaryTypeName","src":"1579:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1578:6:8"},"scope":2238,"src":"1487:98:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2209,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2205,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2200,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2209,"src":"1604:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2199,"name":"uint8","nodeType":"ElementaryTypeName","src":"1604:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2202,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2209,"src":"1629:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2201,"name":"uint","nodeType":"ElementaryTypeName","src":"1629:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2204,"name":"minProfit","nodeType":"VariableDeclaration","scope":2209,"src":"1653:14:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2203,"name":"uint","nodeType":"ElementaryTypeName","src":"1653:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1603:65:8"},"payable":false,"returnParameters":{"id":2208,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2207,"name":"","nodeType":"VariableDeclaration","scope":2209,"src":"1685:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2206,"name":"uint","nodeType":"ElementaryTypeName","src":"1685:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1684:6:8"},"scope":2238,"src":"1590:101:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2220,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2216,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2211,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2220,"src":"1715:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2210,"name":"uint8","nodeType":"ElementaryTypeName","src":"1715:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2213,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2220,"src":"1740:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2212,"name":"uint","nodeType":"ElementaryTypeName","src":"1740:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2215,"name":"minProfit","nodeType":"VariableDeclaration","scope":2220,"src":"1764:14:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2214,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1714:65:8"},"payable":false,"returnParameters":{"id":2219,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2218,"name":"","nodeType":"VariableDeclaration","scope":2220,"src":"1796:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2217,"name":"uint","nodeType":"ElementaryTypeName","src":"1796:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1795:6:8"},"scope":2238,"src":"1696:106:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2230,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2226,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2223,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2230,"src":"1822:25:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2221,"name":"int","nodeType":"ElementaryTypeName","src":"1822:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2222,"length":null,"nodeType":"ArrayTypeName","src":"1822:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2225,"name":"costLimit","nodeType":"VariableDeclaration","scope":2230,"src":"1849:13:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2224,"name":"int","nodeType":"ElementaryTypeName","src":"1849:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1821:42:8"},"payable":false,"returnParameters":{"id":2229,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2228,"name":"","nodeType":"VariableDeclaration","scope":2230,"src":"1880:3:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2227,"name":"int","nodeType":"ElementaryTypeName","src":"1880:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1879:5:8"},"scope":2238,"src":"1807:78:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2237,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":2233,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2232,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":2237,"src":"1913:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2231,"name":"uint","nodeType":"ElementaryTypeName","src":"1913:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1912:23:8"},"payable":false,"returnParameters":{"id":2236,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2235,"name":"","nodeType":"VariableDeclaration","scope":2237,"src":"1957:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2234,"name":"uint","nodeType":"ElementaryTypeName","src":"1957:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1956:6:8"},"scope":2238,"src":"1890:73:8","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":2239,"src":"1290:675:8"}],"src":"0:1966:8"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","exportedSymbols":{"Market":[2238],"MarketData":[2172]},"id":2239,"nodeType":"SourceUnit","nodes":[{"id":2092,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:8"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2093,"nodeType":"ImportDirective","scope":2239,"sourceUnit":385,"src":"25:29:8","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2094,"nodeType":"ImportDirective","scope":2239,"sourceUnit":1572,"src":"55:41:8","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":2095,"nodeType":"ImportDirective","scope":2239,"sourceUnit":6702,"src":"97:55:8","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2172,"linearizedBaseContracts":[2172],"name":"MarketData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":2099,"name":"MarketFunding","nodeType":"EventDefinition","parameters":{"id":2098,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2097,"indexed":false,"name":"funding","nodeType":"VariableDeclaration","scope":2099,"src":"231:12:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2096,"name":"uint","nodeType":"ElementaryTypeName","src":"231:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"230:14:8"},"src":"211:34:8"},{"anonymous":false,"documentation":null,"id":2101,"name":"MarketClosing","nodeType":"EventDefinition","parameters":{"id":2100,"nodeType":"ParameterList","parameters":[],"src":"269:2:8"},"src":"250:22:8"},{"anonymous":false,"documentation":null,"id":2105,"name":"FeeWithdrawal","nodeType":"EventDefinition","parameters":{"id":2104,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2103,"indexed":false,"name":"fees","nodeType":"VariableDeclaration","scope":2105,"src":"297:9:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2102,"name":"uint","nodeType":"ElementaryTypeName","src":"297:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"296:11:8"},"src":"277:31:8"},{"anonymous":false,"documentation":null,"id":2117,"name":"OutcomeTokenPurchase","nodeType":"EventDefinition","parameters":{"id":2116,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2107,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":2117,"src":"340:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2106,"name":"address","nodeType":"ElementaryTypeName","src":"340:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2109,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2117,"src":"363:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2108,"name":"uint8","nodeType":"ElementaryTypeName","src":"363:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2111,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2117,"src":"388:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2110,"name":"uint","nodeType":"ElementaryTypeName","src":"388:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2113,"indexed":false,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":2117,"src":"412:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2112,"name":"uint","nodeType":"ElementaryTypeName","src":"412:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2115,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2117,"src":"435:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2114,"name":"uint","nodeType":"ElementaryTypeName","src":"435:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"339:112:8"},"src":"313:139:8"},{"anonymous":false,"documentation":null,"id":2129,"name":"OutcomeTokenSale","nodeType":"EventDefinition","parameters":{"id":2128,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2119,"indexed":true,"name":"seller","nodeType":"VariableDeclaration","scope":2129,"src":"480:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2118,"name":"address","nodeType":"ElementaryTypeName","src":"480:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2121,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2129,"src":"504:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2120,"name":"uint8","nodeType":"ElementaryTypeName","src":"504:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2123,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2129,"src":"529:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2122,"name":"uint","nodeType":"ElementaryTypeName","src":"529:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2125,"indexed":false,"name":"outcomeTokenProfit","nodeType":"VariableDeclaration","scope":2129,"src":"553:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2124,"name":"uint","nodeType":"ElementaryTypeName","src":"553:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2127,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2129,"src":"578:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2126,"name":"uint","nodeType":"ElementaryTypeName","src":"578:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"479:115:8"},"src":"457:138:8"},{"anonymous":false,"documentation":null,"id":2139,"name":"OutcomeTokenShortSale","nodeType":"EventDefinition","parameters":{"id":2138,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2131,"indexed":true,"name":"buyer","nodeType":"VariableDeclaration","scope":2139,"src":"628:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2130,"name":"address","nodeType":"ElementaryTypeName","src":"628:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2133,"indexed":false,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2139,"src":"651:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2132,"name":"uint8","nodeType":"ElementaryTypeName","src":"651:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2135,"indexed":false,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2139,"src":"676:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2134,"name":"uint","nodeType":"ElementaryTypeName","src":"676:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2137,"indexed":false,"name":"cost","nodeType":"VariableDeclaration","scope":2139,"src":"700:9:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2136,"name":"uint","nodeType":"ElementaryTypeName","src":"700:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"627:83:8"},"src":"600:111:8"},{"anonymous":false,"documentation":null,"id":2150,"name":"OutcomeTokenTrade","nodeType":"EventDefinition","parameters":{"id":2149,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2141,"indexed":true,"name":"transactor","nodeType":"VariableDeclaration","scope":2150,"src":"740:26:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2140,"name":"address","nodeType":"ElementaryTypeName","src":"740:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2144,"indexed":false,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2150,"src":"768:25:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2142,"name":"int","nodeType":"ElementaryTypeName","src":"768:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2143,"length":null,"nodeType":"ArrayTypeName","src":"768:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2146,"indexed":false,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2150,"src":"795:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2145,"name":"int","nodeType":"ElementaryTypeName","src":"795:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2148,"indexed":false,"name":"marketFees","nodeType":"VariableDeclaration","scope":2150,"src":"820:15:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2147,"name":"uint","nodeType":"ElementaryTypeName","src":"820:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"739:97:8"},"src":"716:121:8"},{"constant":false,"id":2152,"name":"creator","nodeType":"VariableDeclaration","scope":2172,"src":"874:22:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2151,"name":"address","nodeType":"ElementaryTypeName","src":"874:7:8","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":2154,"name":"createdAtBlock","nodeType":"VariableDeclaration","scope":2172,"src":"902:26:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2153,"name":"uint","nodeType":"ElementaryTypeName","src":"902:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":2156,"name":"eventContract","nodeType":"VariableDeclaration","scope":2172,"src":"934:26:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2155,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"934:5:8","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"public"},{"constant":false,"id":2158,"name":"marketMaker","nodeType":"VariableDeclaration","scope":2172,"src":"966:30:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2157,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"966:11:8","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"public"},{"constant":false,"id":2160,"name":"fee","nodeType":"VariableDeclaration","scope":2172,"src":"1002:17:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2159,"name":"uint24","nodeType":"ElementaryTypeName","src":"1002:6:8","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"public"},{"constant":false,"id":2162,"name":"funding","nodeType":"VariableDeclaration","scope":2172,"src":"1025:19:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2161,"name":"uint","nodeType":"ElementaryTypeName","src":"1025:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":2165,"name":"netOutcomeTokensSold","nodeType":"VariableDeclaration","scope":2172,"src":"1050:33:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[]"},"typeName":{"baseType":{"id":2163,"name":"int","nodeType":"ElementaryTypeName","src":"1050:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2164,"length":null,"nodeType":"ArrayTypeName","src":"1050:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"public"},{"constant":false,"id":2167,"name":"stage","nodeType":"VariableDeclaration","scope":2172,"src":"1089:19:8","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2166,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1089:6:8","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"public"},{"canonicalName":"MarketData.Stages","id":2171,"members":[{"id":2168,"name":"MarketCreated","nodeType":"EnumValue","src":"1137:13:8"},{"id":2169,"name":"MarketFunded","nodeType":"EnumValue","src":"1160:12:8"},{"id":2170,"name":"MarketClosed","nodeType":"EnumValue","src":"1182:12:8"}],"name":"Stages","nodeType":"EnumDefinition","src":"1115:85:8"}],"scope":2239,"src":"155:1047:8"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2173,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"1309:10:8","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2174,"nodeType":"InheritanceSpecifier","src":"1309:10:8"}],"contractDependencies":[2172],"contractKind":"contract","documentation":"@title Abstract market contract - Functions to be implemented by market contracts","fullyImplemented":false,"id":2238,"linearizedBaseContracts":[2238,2172],"name":"Market","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":2179,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2177,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2176,"name":"_funding","nodeType":"VariableDeclaration","scope":2179,"src":"1380:13:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2175,"name":"uint","nodeType":"ElementaryTypeName","src":"1380:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1379:15:8"},"payable":false,"returnParameters":{"id":2178,"nodeType":"ParameterList","parameters":[],"src":"1401:0:8"},"scope":2238,"src":"1366:36:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2182,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2180,"nodeType":"ParameterList","parameters":[],"src":"1421:2:8"},"payable":false,"returnParameters":{"id":2181,"nodeType":"ParameterList","parameters":[],"src":"1430:0:8"},"scope":2238,"src":"1407:24:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2187,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2183,"nodeType":"ParameterList","parameters":[],"src":"1457:2:8"},"payable":false,"returnParameters":{"id":2186,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2185,"name":"","nodeType":"VariableDeclaration","scope":2187,"src":"1476:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2184,"name":"uint","nodeType":"ElementaryTypeName","src":"1476:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1475:6:8"},"scope":2238,"src":"1436:46:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2198,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2194,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2189,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2198,"src":"1500:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2188,"name":"uint8","nodeType":"ElementaryTypeName","src":"1500:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2191,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2198,"src":"1525:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2190,"name":"uint","nodeType":"ElementaryTypeName","src":"1525:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2193,"name":"maxCost","nodeType":"VariableDeclaration","scope":2198,"src":"1549:12:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2192,"name":"uint","nodeType":"ElementaryTypeName","src":"1549:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1499:63:8"},"payable":false,"returnParameters":{"id":2197,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2196,"name":"","nodeType":"VariableDeclaration","scope":2198,"src":"1579:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2195,"name":"uint","nodeType":"ElementaryTypeName","src":"1579:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1578:6:8"},"scope":2238,"src":"1487:98:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2209,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2205,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2200,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2209,"src":"1604:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2199,"name":"uint8","nodeType":"ElementaryTypeName","src":"1604:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2202,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2209,"src":"1629:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2201,"name":"uint","nodeType":"ElementaryTypeName","src":"1629:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2204,"name":"minProfit","nodeType":"VariableDeclaration","scope":2209,"src":"1653:14:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2203,"name":"uint","nodeType":"ElementaryTypeName","src":"1653:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1603:65:8"},"payable":false,"returnParameters":{"id":2208,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2207,"name":"","nodeType":"VariableDeclaration","scope":2209,"src":"1685:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2206,"name":"uint","nodeType":"ElementaryTypeName","src":"1685:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1684:6:8"},"scope":2238,"src":"1590:101:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2220,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2216,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2211,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2220,"src":"1715:23:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2210,"name":"uint8","nodeType":"ElementaryTypeName","src":"1715:5:8","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2213,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2220,"src":"1740:22:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2212,"name":"uint","nodeType":"ElementaryTypeName","src":"1740:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2215,"name":"minProfit","nodeType":"VariableDeclaration","scope":2220,"src":"1764:14:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2214,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1714:65:8"},"payable":false,"returnParameters":{"id":2219,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2218,"name":"","nodeType":"VariableDeclaration","scope":2220,"src":"1796:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2217,"name":"uint","nodeType":"ElementaryTypeName","src":"1796:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1795:6:8"},"scope":2238,"src":"1696:106:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2230,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2226,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2223,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2230,"src":"1822:25:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2221,"name":"int","nodeType":"ElementaryTypeName","src":"1822:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2222,"length":null,"nodeType":"ArrayTypeName","src":"1822:5:8","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2225,"name":"costLimit","nodeType":"VariableDeclaration","scope":2230,"src":"1849:13:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2224,"name":"int","nodeType":"ElementaryTypeName","src":"1849:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1821:42:8"},"payable":false,"returnParameters":{"id":2229,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2228,"name":"","nodeType":"VariableDeclaration","scope":2230,"src":"1880:3:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2227,"name":"int","nodeType":"ElementaryTypeName","src":"1880:3:8","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1879:5:8"},"scope":2238,"src":"1807:78:8","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":2237,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":2233,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2232,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":2237,"src":"1913:21:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2231,"name":"uint","nodeType":"ElementaryTypeName","src":"1913:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1912:23:8"},"payable":false,"returnParameters":{"id":2236,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2235,"name":"","nodeType":"VariableDeclaration","scope":2237,"src":"1957:4:8","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2234,"name":"uint","nodeType":"ElementaryTypeName","src":"1957:4:8","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1956:6:8"},"scope":2238,"src":"1890:73:8","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":2239,"src":"1290:675:8"}],"src":"0:1966:8"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.998Z"}; /***/ }), @@ -330,10 +549,10 @@ module.exports = {"contract_name":"Market","abi":[{"constant":true,"inputs":[]," /*!*******************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/MarketMaker.json ***! \*******************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"MarketMaker","abi":[{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"calcProfit","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"calcCost","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"}],"name":"calcMarginalPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263310}; +module.exports = {"contractName":"MarketMaker","abi":[{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"calcCost","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"calcProfit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenAmounts","type":"int256[]"}],"name":"calcNetCost","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"market","type":"address"},{"name":"outcomeTokenIndex","type":"uint8"}],"name":"calcMarginalPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\nimport \"../Markets/Market.sol\";\n\n\n/// @title Abstract market maker contract - Functions to be implemented by market maker contracts\ncontract MarketMaker {\n\n /*\n * Public functions\n */\n function calcCost(Market market, uint8 outcomeTokenIndex, uint outcomeTokenCount) public view returns (uint);\n function calcProfit(Market market, uint8 outcomeTokenIndex, uint outcomeTokenCount) public view returns (uint);\n function calcNetCost(Market market, int[] outcomeTokenAmounts) public view returns (int);\n function calcMarginalPrice(Market market, uint8 outcomeTokenIndex) public view returns (uint);\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","exportedSymbols":{"MarketMaker":[1571]},"id":1572,"nodeType":"SourceUnit","nodes":[{"id":1528,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:5"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","file":"../Markets/Market.sol","id":1529,"nodeType":"ImportDirective","scope":1572,"sourceUnit":2239,"src":"25:31:5","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title Abstract market maker contract - Functions to be implemented by market maker contracts","fullyImplemented":false,"id":1571,"linearizedBaseContracts":[1571],"name":"MarketMaker","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":1540,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcCost","nodeType":"FunctionDefinition","parameters":{"id":1536,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1531,"name":"market","nodeType":"VariableDeclaration","scope":1540,"src":"243:13:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1530,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"243:6:5","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1533,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1540,"src":"258:23:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1532,"name":"uint8","nodeType":"ElementaryTypeName","src":"258:5:5","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1535,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":1540,"src":"283:22:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1534,"name":"uint","nodeType":"ElementaryTypeName","src":"283:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"242:64:5"},"payable":false,"returnParameters":{"id":1539,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1538,"name":"","nodeType":"VariableDeclaration","scope":1540,"src":"328:4:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1537,"name":"uint","nodeType":"ElementaryTypeName","src":"328:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"327:6:5"},"scope":1571,"src":"225:109:5","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":1551,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcProfit","nodeType":"FunctionDefinition","parameters":{"id":1547,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1542,"name":"market","nodeType":"VariableDeclaration","scope":1551,"src":"359:13:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1541,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"359:6:5","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1544,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1551,"src":"374:23:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1543,"name":"uint8","nodeType":"ElementaryTypeName","src":"374:5:5","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1546,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":1551,"src":"399:22:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1545,"name":"uint","nodeType":"ElementaryTypeName","src":"399:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"358:64:5"},"payable":false,"returnParameters":{"id":1550,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1549,"name":"","nodeType":"VariableDeclaration","scope":1551,"src":"444:4:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1548,"name":"uint","nodeType":"ElementaryTypeName","src":"444:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"443:6:5"},"scope":1571,"src":"339:111:5","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":1561,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcNetCost","nodeType":"FunctionDefinition","parameters":{"id":1557,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1553,"name":"market","nodeType":"VariableDeclaration","scope":1561,"src":"476:13:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1552,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"476:6:5","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1556,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":1561,"src":"491:25:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1554,"name":"int","nodeType":"ElementaryTypeName","src":"491:3:5","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1555,"length":null,"nodeType":"ArrayTypeName","src":"491:5:5","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"475:42:5"},"payable":false,"returnParameters":{"id":1560,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1559,"name":"","nodeType":"VariableDeclaration","scope":1561,"src":"539:3:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1558,"name":"int","nodeType":"ElementaryTypeName","src":"539:3:5","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"538:5:5"},"scope":1571,"src":"455:89:5","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":1570,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarginalPrice","nodeType":"FunctionDefinition","parameters":{"id":1566,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1563,"name":"market","nodeType":"VariableDeclaration","scope":1570,"src":"576:13:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1562,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"576:6:5","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1565,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1570,"src":"591:23:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1564,"name":"uint8","nodeType":"ElementaryTypeName","src":"591:5:5","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"575:40:5"},"payable":false,"returnParameters":{"id":1569,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1568,"name":"","nodeType":"VariableDeclaration","scope":1570,"src":"637:4:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1567,"name":"uint","nodeType":"ElementaryTypeName","src":"637:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"636:6:5"},"scope":1571,"src":"549:94:5","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":1572,"src":"157:488:5"}],"src":"0:646:5"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","exportedSymbols":{"MarketMaker":[1571]},"id":1572,"nodeType":"SourceUnit","nodes":[{"id":1528,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:5"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","file":"../Markets/Market.sol","id":1529,"nodeType":"ImportDirective","scope":1572,"sourceUnit":2239,"src":"25:31:5","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title Abstract market maker contract - Functions to be implemented by market maker contracts","fullyImplemented":false,"id":1571,"linearizedBaseContracts":[1571],"name":"MarketMaker","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":1540,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcCost","nodeType":"FunctionDefinition","parameters":{"id":1536,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1531,"name":"market","nodeType":"VariableDeclaration","scope":1540,"src":"243:13:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1530,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"243:6:5","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1533,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1540,"src":"258:23:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1532,"name":"uint8","nodeType":"ElementaryTypeName","src":"258:5:5","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1535,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":1540,"src":"283:22:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1534,"name":"uint","nodeType":"ElementaryTypeName","src":"283:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"242:64:5"},"payable":false,"returnParameters":{"id":1539,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1538,"name":"","nodeType":"VariableDeclaration","scope":1540,"src":"328:4:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1537,"name":"uint","nodeType":"ElementaryTypeName","src":"328:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"327:6:5"},"scope":1571,"src":"225:109:5","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":1551,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcProfit","nodeType":"FunctionDefinition","parameters":{"id":1547,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1542,"name":"market","nodeType":"VariableDeclaration","scope":1551,"src":"359:13:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1541,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"359:6:5","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1544,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1551,"src":"374:23:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1543,"name":"uint8","nodeType":"ElementaryTypeName","src":"374:5:5","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":1546,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":1551,"src":"399:22:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1545,"name":"uint","nodeType":"ElementaryTypeName","src":"399:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"358:64:5"},"payable":false,"returnParameters":{"id":1550,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1549,"name":"","nodeType":"VariableDeclaration","scope":1551,"src":"444:4:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1548,"name":"uint","nodeType":"ElementaryTypeName","src":"444:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"443:6:5"},"scope":1571,"src":"339:111:5","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":1561,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcNetCost","nodeType":"FunctionDefinition","parameters":{"id":1557,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1553,"name":"market","nodeType":"VariableDeclaration","scope":1561,"src":"476:13:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1552,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"476:6:5","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1556,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":1561,"src":"491:25:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":1554,"name":"int","nodeType":"ElementaryTypeName","src":"491:3:5","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":1555,"length":null,"nodeType":"ArrayTypeName","src":"491:5:5","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"475:42:5"},"payable":false,"returnParameters":{"id":1560,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1559,"name":"","nodeType":"VariableDeclaration","scope":1561,"src":"539:3:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":1558,"name":"int","nodeType":"ElementaryTypeName","src":"539:3:5","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"538:5:5"},"scope":1571,"src":"455:89:5","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":1570,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarginalPrice","nodeType":"FunctionDefinition","parameters":{"id":1566,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1563,"name":"market","nodeType":"VariableDeclaration","scope":1570,"src":"576:13:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":1562,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"576:6:5","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":1565,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":1570,"src":"591:23:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":1564,"name":"uint8","nodeType":"ElementaryTypeName","src":"591:5:5","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"src":"575:40:5"},"payable":false,"returnParameters":{"id":1569,"nodeType":"ParameterList","parameters":[{"constant":false,"id":1568,"name":"","nodeType":"VariableDeclaration","scope":1570,"src":"637:4:5","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1567,"name":"uint","nodeType":"ElementaryTypeName","src":"637:4:5","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"636:6:5"},"scope":1571,"src":"549:94:5","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":1572,"src":"157:488:5"}],"src":"0:646:5"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.992Z"}; /***/ }), @@ -341,10 +560,10 @@ module.exports = {"contract_name":"MarketMaker","abi":[{"constant":true,"inputs" /*!************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Math.json ***! \************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"Math","abi":[{"constant":true,"inputs":[],"name":"LN2","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"int256"},{"name":"b","type":"int256"}],"name":"safeToMul","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"LOG2_E","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"ln","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"floorLog2","outputs":[{"name":"lo","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"safeToAdd","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"add","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"int256"},{"name":"b","type":"int256"}],"name":"safeToSub","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"int256"},{"name":"b","type":"int256"}],"name":"add","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"int256"},{"name":"b","type":"int256"}],"name":"sub","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"sub","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"int256"},{"name":"b","type":"int256"}],"name":"mul","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ONE","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"mul","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"safeToMul","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"nums","type":"int256[]"}],"name":"max","outputs":[{"name":"max","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"int256"},{"name":"b","type":"int256"}],"name":"safeToAdd","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"safeToSub","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"}],"name":"exp","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"}],"networks":{"1":{"address":"0x62f4074655d8f888e9293c59d2a5faa5156f2275","updated_at":1513984936000},"3":{"address":"0xc55c643d9084df9372c43fc2f4f6cd3f7446d00d","updated_at":1503605014183},"4":{"address":"0x472099767cc73a371c1848cbc0d17357e9bba52a","updated_at":1503603856229},"42":{"address":"0x0dd253f644e702346ec67839088ae5954d51e76b","updated_at":1503602339882},"437894314312":{"address":"0x5b1869d9a4c187f2eaa108f3062412ecf0526b24","updated_at":1507361155400}},"schema_version":"0.0.5","updated_at":1543915159048}; +module.exports = {"contractName":"Fixed192x64Math","abi":[{"constant":true,"inputs":[],"name":"LN2","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LOG2_E","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ONE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"}],"name":"exp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"estimationMode","type":"Fixed192x64Math.EstimationMode"}],"name":"pow2","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"}],"name":"pow2Bounds","outputs":[{"name":"lower","type":"uint256"},{"name":"upper","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"ln","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"},{"name":"estimationMode","type":"Fixed192x64Math.EstimationMode"}],"name":"binaryLog","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"log2Bounds","outputs":[{"name":"lower","type":"int256"},{"name":"upper","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"floorLog2","outputs":[{"name":"lo","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"nums","type":"int256[]"}],"name":"max","outputs":[{"name":"maxNum","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"}],"bytecode":"0x610d1c610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106100c6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302780677146100cb578063137bf798146100e95780631427f1681461012a5780631d5801231461016557806324902e24146101a657806324d4e90a146101c457806345b8bafc146101f8578063c12662271461022c578063c2ee3a0814610267578063ccc1381414610285578063e46751e3146102f2575b600080fd5b6100d3610326565b6040518082815260200191505060405180910390f35b61011460048036038101908080359060200190929190803560ff169060200190929190505050610332565b6040518082815260200191505060405180910390f35b610148600480360381019080803590602001909291905050506103d5565b604051808381526020018281526020019250505060405180910390f35b61019060048036038101908080359060200190929190803560ff1690602001909291905050506104c8565b6040518082815260200191505060405180910390f35b6101ae61056b565b6040518082815260200191505060405180910390f35b6101e260048036038101908080359060200190929190505050610578565b6040518082815260200191505060405180910390f35b610216600480360381019080803590602001909291905050506105c3565b6040518082815260200191505060405180910390f35b61024a6004803603810190808035906020019092919050505061067a565b604051808381526020018281526020019250505060405180910390f35b61026f610bbd565b6040518082815260200191505060405180910390f35b6102dc60048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610bca565b6040518082815260200191505060405180910390f35b61031060048036038101908080359060200190929190505050610c5b565b6040518082815260200191505060405180910390f35b67b17217f7d1cf79ac81565b6000806000610340856103d5565b915091506000600281111561035157fe5b84600281111561035d57fe5b141561036b578192506103cd565b6001600281111561037857fe5b84600281111561038457fe5b1415610392578092506103cd565b60028081111561039e57fe5b8460028111156103aa57fe5b14156103c8578160028383038115156103bf57fe5b050192506103cd565b600080fd5b505092915050565b6000806000806000851115156103ea57600080fd5b6103f3856105c3565b9350600084121561040f5783600003859060020a02915061041a565b83859060020a900491505b6801000000000000000084029350600190505b6040811315156104b8576801000000000000000082141561044d576104b8565b6801000000000000000082830281151561046357fe5b04915068010000000000000000600202821015156104ab578068010000000000000000600082121561049157fe5b9060020a9004840193506002828115156104a757fe5b0491505b808060010191505061042d565b8360048501935093505050915091565b60008060006104d68561067a565b91509150600060028111156104e757fe5b8460028111156104f357fe5b141561050157819250610563565b6001600281111561050e57fe5b84600281111561051a57fe5b141561052857809250610563565b60028081111561053457fe5b84600281111561054057fe5b141561055e5781600283830381151561055557fe5b04019250610563565b600080fd5b505092915050565b680171547652b82fe17781565b6000806000610586846103d5565b91509150680171547652b82fe177680100000000000000008360028585038115156105ad57fe5b0501028115156105b957fe5b0592505050919050565b60008060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0925060c1915060018383019060020a900590505b816001840112156106735760008112801561062957506801000000000000000081600003859060020a02105b8061065057506000811215801561064f57506801000000000000000081859060020a9004105b5b1561065d57809150610661565b8092505b60018383019060020a900590506105fd565b5050919050565b60008060008060008068bfffffffffffffffff871315151561069b57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc000000000000000008712156106d6576000600181915080905095509550610bb4565b6000871215156107135768010000000000000000878115156106f457fe5b059350680100000000000000008781151561070b57fe5b079250610741565b6001680100000000000000006001890181151561072c57fe5b05039350836801000000000000000002870392505b6000831215151561074e57fe5b6040680100000000000000009060020a0291508290508067b17217f7d1cf79ab02820191506801000000000000000083820281151561078957fe5b05905060028167f5fdeffc162c7543029060020a900582019150680100000000000000008382028115156107b957fe5b05905060048167e35846b82505fc59029060020a900582019150680100000000000000008382028115156107e957fe5b059050600681679d955b7dd273b94e029060020a9005820191506801000000000000000083820281151561081957fe5b05905060098167aec3ff3c53398883029060020a9005820191506801000000000000000083820281151561084957fe5b059050600c8167a184897c363c3b7a029060020a9005820191506801000000000000000083820281151561087957fe5b05905060108167ffe5fe2c45863435029060020a900582019150680100000000000000008382028115156108a957fe5b05905060138167b160111d2e411fec029060020a900582019150680100000000000000008382028115156108d957fe5b05905060178167da929e9caf3e1ed2029060020a9005820191506801000000000000000083820281151561090957fe5b059050601b8167f267a8ac5c764fb7029060020a9005820191506801000000000000000083820281151561093957fe5b059050601f8167f465639a8dd92607029060020a9005820191506801000000000000000083820281151561096957fe5b05905060238167e1deb287e14c2f15029060020a9005820191506801000000000000000083820281151561099957fe5b05905060278167c0b0c98b3687cb14029060020a900582019150680100000000000000008382028115156109c957fe5b059050602b816798a4b26ac3c54b9f029060020a900582019150680100000000000000008382028115156109f957fe5b05905060308167e1b7421d82010f33029060020a90058201915068010000000000000000838202811515610a2957fe5b059050603481679c744d73cfc59c91029060020a90058201915068010000000000000000838202811515610a5957fe5b05905060398167cc2225a0e12d3eab029060020a90058201915068010000000000000000838202811515610a8957fe5b059050603e8167fb8bb5eda1b4aeb9029060020a900590508082019150680100000000000000006008029050604084039350600084121515610b7b5760008461010003836000821215610ad857fe5b9060020a90051415610b4a5783826000821215610af157fe5b9060020a02955083816000821215610b0557fe5b9060020a02905085818701101515610b21578086019450610b45565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b610bb4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8081915080905095509550610bb4565b600184600003826000821215610b8d57fe5b9060020a900501905083600003826000821215610ba657fe5b9060020a9004955080860194505b50505050915091565b6801000000000000000081565b60008060008351111515610bdd57600080fd5b7f80000000000000000000000000000000000000000000000000000000000000009150600090505b8251811015610c5557818382815181101515610c1d57fe5b906020019060200201511315610c48578281815181101515610c3b57fe5b9060200190602002015191505b8080600101915050610c05565b50919050565b600080600068851591f9dd5b9b40d78413151515610c7857600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffd3a37a020b8c21950d84131515610caa5760009250610ce9565b610cd167b17217f7d1cf79ac680100000000000000008602811515610ccb57fe5b0561067a565b91509150816002838303811515610ce457fe5b040192505b50509190505600a165627a7a72305820cc0c2c6cd58b2bcf001d1f1e4c01f5c9eaa32c8faf012b613903b317bf630b070029","deployedBytecode":"0x73000000000000000000000000000000000000000030146080604052600436106100c6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302780677146100cb578063137bf798146100e95780631427f1681461012a5780631d5801231461016557806324902e24146101a657806324d4e90a146101c457806345b8bafc146101f8578063c12662271461022c578063c2ee3a0814610267578063ccc1381414610285578063e46751e3146102f2575b600080fd5b6100d3610326565b6040518082815260200191505060405180910390f35b61011460048036038101908080359060200190929190803560ff169060200190929190505050610332565b6040518082815260200191505060405180910390f35b610148600480360381019080803590602001909291905050506103d5565b604051808381526020018281526020019250505060405180910390f35b61019060048036038101908080359060200190929190803560ff1690602001909291905050506104c8565b6040518082815260200191505060405180910390f35b6101ae61056b565b6040518082815260200191505060405180910390f35b6101e260048036038101908080359060200190929190505050610578565b6040518082815260200191505060405180910390f35b610216600480360381019080803590602001909291905050506105c3565b6040518082815260200191505060405180910390f35b61024a6004803603810190808035906020019092919050505061067a565b604051808381526020018281526020019250505060405180910390f35b61026f610bbd565b6040518082815260200191505060405180910390f35b6102dc60048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610bca565b6040518082815260200191505060405180910390f35b61031060048036038101908080359060200190929190505050610c5b565b6040518082815260200191505060405180910390f35b67b17217f7d1cf79ac81565b6000806000610340856103d5565b915091506000600281111561035157fe5b84600281111561035d57fe5b141561036b578192506103cd565b6001600281111561037857fe5b84600281111561038457fe5b1415610392578092506103cd565b60028081111561039e57fe5b8460028111156103aa57fe5b14156103c8578160028383038115156103bf57fe5b050192506103cd565b600080fd5b505092915050565b6000806000806000851115156103ea57600080fd5b6103f3856105c3565b9350600084121561040f5783600003859060020a02915061041a565b83859060020a900491505b6801000000000000000084029350600190505b6040811315156104b8576801000000000000000082141561044d576104b8565b6801000000000000000082830281151561046357fe5b04915068010000000000000000600202821015156104ab578068010000000000000000600082121561049157fe5b9060020a9004840193506002828115156104a757fe5b0491505b808060010191505061042d565b8360048501935093505050915091565b60008060006104d68561067a565b91509150600060028111156104e757fe5b8460028111156104f357fe5b141561050157819250610563565b6001600281111561050e57fe5b84600281111561051a57fe5b141561052857809250610563565b60028081111561053457fe5b84600281111561054057fe5b141561055e5781600283830381151561055557fe5b04019250610563565b600080fd5b505092915050565b680171547652b82fe17781565b6000806000610586846103d5565b91509150680171547652b82fe177680100000000000000008360028585038115156105ad57fe5b0501028115156105b957fe5b0592505050919050565b60008060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0925060c1915060018383019060020a900590505b816001840112156106735760008112801561062957506801000000000000000081600003859060020a02105b8061065057506000811215801561064f57506801000000000000000081859060020a9004105b5b1561065d57809150610661565b8092505b60018383019060020a900590506105fd565b5050919050565b60008060008060008068bfffffffffffffffff871315151561069b57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc000000000000000008712156106d6576000600181915080905095509550610bb4565b6000871215156107135768010000000000000000878115156106f457fe5b059350680100000000000000008781151561070b57fe5b079250610741565b6001680100000000000000006001890181151561072c57fe5b05039350836801000000000000000002870392505b6000831215151561074e57fe5b6040680100000000000000009060020a0291508290508067b17217f7d1cf79ab02820191506801000000000000000083820281151561078957fe5b05905060028167f5fdeffc162c7543029060020a900582019150680100000000000000008382028115156107b957fe5b05905060048167e35846b82505fc59029060020a900582019150680100000000000000008382028115156107e957fe5b059050600681679d955b7dd273b94e029060020a9005820191506801000000000000000083820281151561081957fe5b05905060098167aec3ff3c53398883029060020a9005820191506801000000000000000083820281151561084957fe5b059050600c8167a184897c363c3b7a029060020a9005820191506801000000000000000083820281151561087957fe5b05905060108167ffe5fe2c45863435029060020a900582019150680100000000000000008382028115156108a957fe5b05905060138167b160111d2e411fec029060020a900582019150680100000000000000008382028115156108d957fe5b05905060178167da929e9caf3e1ed2029060020a9005820191506801000000000000000083820281151561090957fe5b059050601b8167f267a8ac5c764fb7029060020a9005820191506801000000000000000083820281151561093957fe5b059050601f8167f465639a8dd92607029060020a9005820191506801000000000000000083820281151561096957fe5b05905060238167e1deb287e14c2f15029060020a9005820191506801000000000000000083820281151561099957fe5b05905060278167c0b0c98b3687cb14029060020a900582019150680100000000000000008382028115156109c957fe5b059050602b816798a4b26ac3c54b9f029060020a900582019150680100000000000000008382028115156109f957fe5b05905060308167e1b7421d82010f33029060020a90058201915068010000000000000000838202811515610a2957fe5b059050603481679c744d73cfc59c91029060020a90058201915068010000000000000000838202811515610a5957fe5b05905060398167cc2225a0e12d3eab029060020a90058201915068010000000000000000838202811515610a8957fe5b059050603e8167fb8bb5eda1b4aeb9029060020a900590508082019150680100000000000000006008029050604084039350600084121515610b7b5760008461010003836000821215610ad857fe5b9060020a90051415610b4a5783826000821215610af157fe5b9060020a02955083816000821215610b0557fe5b9060020a02905085818701101515610b21578086019450610b45565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b610bb4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8081915080905095509550610bb4565b600184600003826000821215610b8d57fe5b9060020a900501905083600003826000821215610ba657fe5b9060020a9004955080860194505b50505050915091565b6801000000000000000081565b60008060008351111515610bdd57600080fd5b7f80000000000000000000000000000000000000000000000000000000000000009150600090505b8251811015610c5557818382815181101515610c1d57fe5b906020019060200201511315610c48578281815181101515610c3b57fe5b9060200190602002015191505b8080600101915050610c05565b50919050565b600080600068851591f9dd5b9b40d78413151515610c7857600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffd3a37a020b8c21950d84131515610caa5760009250610ce9565b610cd167b17217f7d1cf79ac680100000000000000008602811515610ccb57fe5b0561067a565b91509150816002838303811515610ce457fe5b040192505b50509190505600a165627a7a72305820cc0c2c6cd58b2bcf001d1f1e4c01f5c9eaa32c8faf012b613903b317bf630b070029","sourceMap":"213:8767:28:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24","deployedSourceMap":"213:8767:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;438:45;;;;;;;;;;;;;;;;;;;;;;;6479:487;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7242:744;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1500:484;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;489:49;;;;;;;;;;;;;;;;;;;;;;;6022:200;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8100:488;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2226:3693;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;385:47;;;;;;;;;;;;;;;;;;;;;;;8710:268;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:577;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;438:45;465:18;438:45;:::o;6479:487::-;6582:3;6602:9;6613;6626:13;6637:1;6626:10;:13::i;:::-;6601:38;;;;6670:25;6652:43;;;;;;;;:14;:43;;;;;;;;;6649:85;;;6718:5;6711:12;;;;6649:85;6764:25;6746:43;;;;;;;;:14;:43;;;;;;;;;6743:85;;;6812:5;6805:12;;;;6743:85;6858:23;6840:41;;;;;;;;:14;:41;;;;;;;;;6837:105;;;6926:5;6922:1;6913:5;6905;:13;6904:19;;;;;;;;:27;6897:34;;;;6837:105;6951:8;;;6479:487;;;;;;;:::o;7242:744::-;7315:9;7326;7439:6;7706:5;7363:1;7359;:5;7351:14;;;;;;;;7416:12;7426:1;7416:9;:12::i;:::-;7408:20;;7467:1;7459:5;:9;7455:95;;;7497:5;7496:6;;7486:1;:17;;;;7482:21;;7455:95;;;7544:5;7534:1;:16;;;;;7530:20;;7455:95;413:19;7561:17;;;;7714:1;7706:9;;7701:243;7722:2;7717:1;:7;;7701:243;;;413:19;7748:1;:8;7745:51;;;7776:5;;7745:51;413:19;7817:1;7813;:5;:11;;;;;;;;7809:15;;413:19;7846:1;:7;7841:1;:12;;7838:96;;;7893:1;413:19;7886:8;;;;;;;;;;;;;7873:22;;;;7918:1;7913:6;;;;;;;;;;;7838:96;7726:3;;;;;;;7701:243;;;7962:5;7977:1;7969:5;:9;7954:25;;;;7242:744;;;;;:::o;1500:484::-;1597:4;1618:10;1630;1644:13;1655:1;1644:10;:13::i;:::-;1617:40;;;;1688:25;1670:43;;;;;;;;:14;:43;;;;;;;;;1667:85;;;1736:5;1729:12;;;;1667:85;1782:25;1764:43;;;;;;;;:14;:43;;;;;;;;;1761:85;;;1830:5;1823:12;;;;1761:85;1876:23;1858:41;;;;;;;;:14;:41;;;;;;;;;1855:105;;;1944:5;1940:1;1931:5;1923;:13;1922:19;;;;;;;;:27;1915:34;;;;1855:105;1969:8;;;1500:484;;;;;;;:::o;489:49::-;519:19;489:49;:::o;6022:200::-;6087:3;6107:9;6118;6131:13;6142:1;6131:10;:13::i;:::-;6106:38;;;;519:19;413;6184:5;6180:1;6171:5;6163;:13;6162:19;;;;;;;;:27;6161:40;:54;;;;;;;;6154:61;;6022:200;;;;;:::o;8100:488::-;8172:6;8212;8327:7;8199:3;8194:8;;8221:3;8212:12;;8350:1;8343:2;8338;:7;8337:14;;;;;8327:24;;8361:221;8378:2;8373:1;8368:2;:6;8367:13;8361:221;;;8406:1;8400:3;:7;:32;;;;;413:19;8422:3;8421:4;;8411:1;:15;;;;:21;8400:32;:68;;;;8443:1;8436:3;:8;;:32;;;;;413:19;8458:3;8448:1;:14;;;;;:20;8436:32;8400:68;8396:141;;;8491:3;8486:8;;8396:141;;;8534:3;8529:8;;8396:141;8570:1;8563:2;8558;:7;8557:14;;;;;8551:20;;8361:221;;;8100:488;;;;;:::o;2226:3693::-;2298:10;2310;2850:9;2869:5;3569:10;3606:8;2471:22;2466:1;:27;;2458:36;;;;;;;;2625:23;2621:1;:27;2617:58;;;2670:1;2673;2662:13;;;;;;;;;;;;2617:58;2893:1;2888;:6;;2884:194;;;413:19;2918:1;:12;;;;;;;;2910:20;;413:19;2948:1;:12;;;;;;;;2944:16;;2884:194;;;3026:1;413:19;3010:1;3008;:3;3007:16;;;;;;;;:20;2999:28;;3061:5;413:19;3050:16;3045:1;:22;3041:26;;2884:194;3099:1;3094;:6;;3087:14;;;;;;3594:2;413:19;3582:14;;;;3569:27;;3617:1;3606:12;;3659:4;3638:18;:25;3628:35;;;;413:19;3687:1;3680:4;:8;:19;;;;;;;;3673:26;;3749:7;3740:4;3719:18;:25;:38;;;;;3709:48;;;;413:19;3781:1;3774:4;:8;:19;;;;;;;;3767:26;;3843:7;3834:4;3813:18;:25;:38;;;;;3803:48;;;;413:19;3875:1;3868:4;:8;:19;;;;;;;;3861:26;;3937:7;3928:4;3907:18;:25;:38;;;;;3897:48;;;;413:19;3969:1;3962:4;:8;:19;;;;;;;;3955:26;;4031:7;4022:4;4001:18;:25;:38;;;;;3991:48;;;;413:19;4063:1;4056:4;:8;:19;;;;;;;;4049:26;;4125:7;4116:4;4095:18;:25;:38;;;;;4085:48;;;;413:19;4157:1;4150:4;:8;:19;;;;;;;;4143:26;;4219:7;4210:4;4189:18;:25;:38;;;;;4179:48;;;;413:19;4251:1;4244:4;:8;:19;;;;;;;;4237:26;;4313:7;4304:4;4283:18;:25;:38;;;;;4273:48;;;;413:19;4345:1;4338:4;:8;:19;;;;;;;;4331:26;;4407:7;4398:4;4377:18;:25;:38;;;;;4367:48;;;;413:19;4439:1;4432:4;:8;:19;;;;;;;;4425:26;;4501:7;4492:4;4471:18;:25;:38;;;;;4461:48;;;;413:19;4533:1;4526:4;:8;:19;;;;;;;;4519:26;;4595:7;4586:4;4565:18;:25;:38;;;;;4555:48;;;;413:19;4627:1;4620:4;:8;:19;;;;;;;;4613:26;;4689:7;4680:4;4659:18;:25;:38;;;;;4649:48;;;;413:19;4721:1;4714:4;:8;:19;;;;;;;;4707:26;;4783:8;4774:4;4753:18;:25;:39;;;;;4743:49;;;;413:19;4816:1;4809:4;:8;:19;;;;;;;;4802:26;;4878:8;4869:4;4848:18;:25;:39;;;;;4838:49;;;;413:19;4911:1;4904:4;:8;:19;;;;;;;;4897:26;;4973:8;4964:4;4943:18;:25;:39;;;;;4933:49;;;;413:19;5006:1;4999:4;:8;:19;;;;;;;;4992:26;;5068:8;5059:4;5038:18;:25;:39;;;;;5028:49;;;;413:19;5101:1;5094:4;:8;:19;;;;;;;;5087:26;;5163:8;5154:4;5133:18;:25;:39;;;;;5123:49;;;;413:19;5196:1;5189:4;:8;:19;;;;;;;;5182:26;;5255:8;5246:4;5225:18;:25;:39;;;;;5218:46;;5284:4;5274:14;;;;413:19;5309:1;:7;5298:19;;5337:2;5328:11;;;;5362:1;5353:5;:10;;5349:431;;;5408:1;5398:5;5394:3;:9;5383:6;:21;;;;;;;;;;;;;:26;5379:390;;;5453:5;5442:6;5437:21;;;;;;;;;;;;5429:29;;5485:5;5476:14;;;;;;;;;;;;;;;5557:5;5548:4;5535:5;:18;:27;;5531:138;;;5605:4;5592:5;:18;5584:26;;5531:138;;;5661:8;5653:16;;5531:138;5687:7;;5379:390;5750:8;5760;5742:27;;;;;;;;;;;;5349:431;5817:1;5807:5;5806:6;;5797:4;:16;;;;;;;;;;;;;5796:22;5789:29;;5854:5;5853:6;;5841;5836:24;;;;;;;;;;;;;5828:32;;5891:4;5878:5;:18;5870:26;;2226:3693;;;;;;;;:::o;385:47::-;413:19;385:47;:::o;8710:268::-;8780:10;8871:6;8828:1;8814:4;:11;:15;8806:24;;;;;;;;8849:7;8840:16;;8880:1;8871:10;;8866:105;8887:4;:11;8883:1;:15;8866:105;;;8931:6;8921:4;8926:1;8921:7;;;;;;;;;;;;;;;;;;:16;8917:54;;;8964:4;8969:1;8964:7;;;;;;;;;;;;;;;;;;8955:16;;8917:54;8900:3;;;;;;;8866:105;;;8710:268;;;;:::o;692:577::-;757:4;1157:10;1169;909:22;904:1;:27;;896:36;;;;;;;;1061:22;1056:1;:27;;1052:53;;;1104:1;1097:8;;;;1052:53;1183:35;465:18;413:19;1194:1;:12;:23;;;;;;;;1183:10;:35::i;:::-;1156:62;;;;1257:5;1253:1;1244:5;1236;:13;1235:19;;;;;;;;:27;1228:34;;692:577;;;;;;:::o","source":"pragma solidity ^0.4.24;\n\n\n/// @title Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\n/// @author Alan Lu - \n/// @author Stefan George - \nlibrary Fixed192x64Math {\n\n enum EstimationMode { LowerBound, UpperBound, Midpoint }\n\n /*\n * Constants\n */\n // This is equal to 1 in our calculations\n uint public constant ONE = 0x10000000000000000;\n uint public constant LN2 = 0xb17217f7d1cf79ac;\n uint public constant LOG2_E = 0x171547652b82fe177;\n\n /*\n * Public functions\n */\n /// @dev Returns natural exponential function value of given x\n /// @param x x\n /// @return e**x\n function exp(int x)\n public\n pure\n returns (uint)\n {\n // revert if x is > MAX_POWER, where\n // MAX_POWER = int(mp.floor(mp.log(mpf(2**256 - 1) / ONE) * ONE))\n require(x <= 2454971259878909886679);\n // return 0 if exp(x) is tiny, using\n // MIN_POWER = int(mp.floor(mp.log(mpf(1) / ONE) * ONE))\n if (x <= -818323753292969962227)\n return 0;\n\n // Transform so that e^x -> 2^x\n (uint lower, uint upper) = pow2Bounds(x * int(ONE) / int(LN2));\n return (upper - lower) / 2 + lower;\n }\n\n /// @dev Returns estimate of 2**x given x\n /// @param x exponent in fixed point\n /// @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n /// @return estimate of 2**x in fixed point\n function pow2(int x, EstimationMode estimationMode)\n public\n pure\n returns (uint)\n {\n (uint lower, uint upper) = pow2Bounds(x);\n if(estimationMode == EstimationMode.LowerBound) {\n return lower;\n }\n if(estimationMode == EstimationMode.UpperBound) {\n return upper;\n }\n if(estimationMode == EstimationMode.Midpoint) {\n return (upper - lower) / 2 + lower;\n }\n revert();\n }\n\n /// @dev Returns bounds for value of 2**x given x\n /// @param x exponent in fixed point\n /// @return {\n /// \"lower\": \"lower bound of 2**x in fixed point\",\n /// \"upper\": \"upper bound of 2**x in fixed point\"\n /// }\n function pow2Bounds(int x)\n public\n pure\n returns (uint lower, uint upper)\n {\n // revert if x is > MAX_POWER, where\n // MAX_POWER = int(mp.floor(mp.log(mpf(2**256 - 1) / ONE, 2) * ONE))\n require(x <= 3541774862152233910271);\n // return 0 if exp(x) is tiny, using\n // MIN_POWER = int(mp.floor(mp.log(mpf(1) / ONE, 2) * ONE))\n if (x < -1180591620717411303424)\n return (0, 1);\n\n // 2^x = 2^(floor(x)) * 2^(x-floor(x))\n // ^^^^^^^^^^^^^^ is a bit shift of ceil(x)\n // so Taylor expand on z = x-floor(x), z in [0, 1)\n int shift;\n int z;\n if (x >= 0) {\n shift = x / int(ONE);\n z = x % int(ONE);\n }\n else {\n shift = (x+1) / int(ONE) - 1;\n z = x - (int(ONE) * shift);\n }\n assert(z >= 0);\n // 2^x = 1 + (ln 2) x + (ln 2)^2/2! x^2 + ...\n //\n // Can generate the z coefficients using mpmath and the following lines\n // >>> from mpmath import mp\n // >>> mp.dps = 100\n // >>> coeffs = [mp.log(2)**i / mp.factorial(i) for i in range(1, 21)]\n // >>> shifts = [64 - int(mp.log(c, 2)) for c in coeffs]\n // >>> print('\\n'.join(hex(int(c * (1 << s))) + ', ' + str(s) for c, s in zip(coeffs, shifts)))\n int result = int(ONE) << 64;\n int zpow = z;\n result += 0xb17217f7d1cf79ab * zpow;\n zpow = zpow * z / int(ONE);\n result += 0xf5fdeffc162c7543 * zpow >> (66 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe35846b82505fc59 * zpow >> (68 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x9d955b7dd273b94e * zpow >> (70 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xaec3ff3c53398883 * zpow >> (73 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xa184897c363c3b7a * zpow >> (76 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xffe5fe2c45863435 * zpow >> (80 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xb160111d2e411fec * zpow >> (83 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xda929e9caf3e1ed2 * zpow >> (87 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xf267a8ac5c764fb7 * zpow >> (91 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xf465639a8dd92607 * zpow >> (95 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe1deb287e14c2f15 * zpow >> (99 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xc0b0c98b3687cb14 * zpow >> (103 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x98a4b26ac3c54b9f * zpow >> (107 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe1b7421d82010f33 * zpow >> (112 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x9c744d73cfc59c91 * zpow >> (116 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xcc2225a0e12d3eab * zpow >> (121 - 64);\n zpow = zpow * z / int(ONE);\n zpow = 0xfb8bb5eda1b4aeb9 * zpow >> (126 - 64);\n result += zpow;\n zpow = int(8 * ONE);\n\n shift -= 64;\n if (shift >= 0) {\n if (result >> (256-shift) == 0) {\n lower = uint(result) << shift;\n zpow <<= shift; // todo: is this safe?\n if (lower + uint(zpow) >= lower)\n upper = lower + uint(zpow);\n else\n upper = 2**256-1;\n return;\n }\n else\n return (2**256-1, 2**256-1);\n }\n zpow = (zpow >> (-shift)) + 1;\n lower = uint(result) >> (-shift);\n upper = lower + uint(zpow);\n return;\n }\n\n /// @dev Returns natural logarithm value of given x\n /// @param x x\n /// @return ln(x)\n function ln(uint x)\n public\n pure\n returns (int)\n {\n (int lower, int upper) = log2Bounds(x);\n return ((upper - lower) / 2 + lower) * int(ONE) / int(LOG2_E);\n }\n\n /// @dev Returns estimate of binaryLog(x) given x\n /// @param x logarithm argument in fixed point\n /// @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n /// @return estimate of binaryLog(x) in fixed point\n function binaryLog(uint x, EstimationMode estimationMode)\n public\n pure\n returns (int)\n {\n (int lower, int upper) = log2Bounds(x);\n if(estimationMode == EstimationMode.LowerBound) {\n return lower;\n }\n if(estimationMode == EstimationMode.UpperBound) {\n return upper;\n }\n if(estimationMode == EstimationMode.Midpoint) {\n return (upper - lower) / 2 + lower;\n }\n revert();\n }\n\n /// @dev Returns bounds for value of binaryLog(x) given x\n /// @param x logarithm argument in fixed point\n /// @return {\n /// \"lower\": \"lower bound of binaryLog(x) in fixed point\",\n /// \"upper\": \"upper bound of binaryLog(x) in fixed point\"\n /// }\n function log2Bounds(uint x)\n public\n pure\n returns (int lower, int upper)\n {\n require(x > 0);\n // compute ⌊log₂x⌋\n lower = floorLog2(x);\n\n uint y;\n if (lower < 0)\n y = x << uint(-lower);\n else\n y = x >> uint(lower);\n\n lower *= int(ONE);\n\n // y = x * 2^(-⌊log₂x⌋)\n // so 1 <= y < 2\n // and log₂x = ⌊log₂x⌋ + log₂y\n for (int m = 1; m <= 64; m++) {\n if(y == ONE) {\n break;\n }\n y = y * y / ONE;\n if(y >= 2 * ONE) {\n lower += int(ONE >> m);\n y /= 2;\n }\n }\n\n return (lower, lower + 4);\n }\n\n /// @dev Returns base 2 logarithm value of given x\n /// @param x x\n /// @return logarithmic value\n function floorLog2(uint x)\n public\n pure\n returns (int lo)\n {\n lo = -64;\n int hi = 193;\n // I use a shift here instead of / 2 because it floors instead of rounding towards 0\n int mid = (hi + lo) >> 1;\n while((lo + 1) < hi) {\n if (mid < 0 && x << uint(-mid) < ONE || mid >= 0 && x >> uint(mid) < ONE)\n hi = mid;\n else\n lo = mid;\n mid = (hi + lo) >> 1;\n }\n }\n\n /// @dev Returns maximum of an array\n /// @param nums Numbers to look through\n /// @return Maximum number\n function max(int[] nums)\n public\n pure\n returns (int maxNum)\n {\n require(nums.length > 0);\n maxNum = -2**255;\n for (uint i = 0; i < nums.length; i++)\n if (nums[i] > maxNum)\n maxNum = nums[i];\n }\n}\n","sourcePath":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","ast":{"absolutePath":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","exportedSymbols":{"Fixed192x64Math":[6668]},"id":6669,"nodeType":"SourceUnit","nodes":[{"id":5676,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:28"},{"baseContracts":[],"contractDependencies":[],"contractKind":"library","documentation":"@title Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - \n @author Stefan George - ","fullyImplemented":true,"id":6668,"linearizedBaseContracts":[6668],"name":"Fixed192x64Math","nodeType":"ContractDefinition","nodes":[{"canonicalName":"Fixed192x64Math.EstimationMode","id":5680,"members":[{"id":5677,"name":"LowerBound","nodeType":"EnumValue","src":"266:10:28"},{"id":5678,"name":"UpperBound","nodeType":"EnumValue","src":"278:10:28"},{"id":5679,"name":"Midpoint","nodeType":"EnumValue","src":"290:8:28"}],"name":"EstimationMode","nodeType":"EnumDefinition","src":"244:56:28"},{"constant":true,"id":5683,"name":"ONE","nodeType":"VariableDeclaration","scope":6668,"src":"385:47:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5681,"name":"uint","nodeType":"ElementaryTypeName","src":"385:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":5682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"413:19:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"public"},{"constant":true,"id":5686,"name":"LN2","nodeType":"VariableDeclaration","scope":6668,"src":"438:45:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5684,"name":"uint","nodeType":"ElementaryTypeName","src":"438:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"307862313732313766376431636637396163","id":5685,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"465:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12786308645202655660_by_1","typeString":"int_const 12786308645202655660"},"value":"0xb17217f7d1cf79ac"},"visibility":"public"},{"constant":true,"id":5689,"name":"LOG2_E","nodeType":"VariableDeclaration","scope":6668,"src":"489:49:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5687,"name":"uint","nodeType":"ElementaryTypeName","src":"489:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783137313534373635326238326665313737","id":5688,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"519:19:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_26613026195688644983_by_1","typeString":"int_const 26613026195688644983"},"value":"0x171547652b82fe177"},"visibility":"public"},{"body":{"id":5734,"nodeType":"Block","src":"767:502:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5699,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5697,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"904:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"32343534393731323539383738393039383836363739","id":5698,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"909:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2454971259878909886679_by_1","typeString":"int_const 2454971259878909886679"},"value":"2454971259878909886679"},"src":"904:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5696,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"896:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5700,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"896:36:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5701,"nodeType":"ExpressionStatement","src":"896:36:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5705,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5702,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"1056:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":5704,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"1061:22:28","subExpression":{"argumentTypes":null,"hexValue":"383138333233373533323932393639393632323237","id":5703,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1062:21:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_818323753292969962227_by_1","typeString":"int_const 818323753292969962227"},"value":"818323753292969962227"},"typeDescriptions":{"typeIdentifier":"t_rational_-818323753292969962227_by_1","typeString":"int_const -818323753292969962227"}},"src":"1056:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5708,"nodeType":"IfStatement","src":"1052:53:28","trueBody":{"expression":{"argumentTypes":null,"hexValue":"30","id":5706,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1104:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"functionReturnParameters":5695,"id":5707,"nodeType":"Return","src":"1097:8:28"}},{"assignments":[5710,5712],"declarations":[{"constant":false,"id":5710,"name":"lower","nodeType":"VariableDeclaration","scope":5735,"src":"1157:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5709,"name":"uint","nodeType":"ElementaryTypeName","src":"1157:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5712,"name":"upper","nodeType":"VariableDeclaration","scope":5735,"src":"1169:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5711,"name":"uint","nodeType":"ElementaryTypeName","src":"1169:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5724,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5718,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5714,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"1194:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5716,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"1202:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5715,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1198:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5717,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1198:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1194:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5720,"name":"LN2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5686,"src":"1213:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5719,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1209:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5721,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1209:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1194:23:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5713,"name":"pow2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6355,"src":"1183:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$returns$_t_uint256_$_t_uint256_$","typeString":"function (int256) pure returns (uint256,uint256)"}},"id":5723,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1183:35:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"1156:62:28"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5732,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5730,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5727,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5725,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5712,"src":"1236:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":5726,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5710,"src":"1244:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1236:13:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5728,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1235:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5729,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1253:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1235:19:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":5731,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5710,"src":"1257:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1235:27:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5695,"id":5733,"nodeType":"Return","src":"1228:34:28"}]},"documentation":"@dev Returns natural exponential function value of given x\n @param x x\n @return e**x","id":5735,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"exp","nodeType":"FunctionDefinition","parameters":{"id":5692,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5691,"name":"x","nodeType":"VariableDeclaration","scope":5735,"src":"705:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5690,"name":"int","nodeType":"ElementaryTypeName","src":"705:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"704:7:28"},"payable":false,"returnParameters":{"id":5695,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5694,"name":"","nodeType":"VariableDeclaration","scope":5735,"src":"757:4:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5693,"name":"uint","nodeType":"ElementaryTypeName","src":"757:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"756:6:28"},"scope":6668,"src":"692:577:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":5786,"nodeType":"Block","src":"1607:377:28","statements":[{"assignments":[5745,5747],"declarations":[{"constant":false,"id":5745,"name":"lower","nodeType":"VariableDeclaration","scope":5787,"src":"1618:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5744,"name":"uint","nodeType":"ElementaryTypeName","src":"1618:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5747,"name":"upper","nodeType":"VariableDeclaration","scope":5787,"src":"1630:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5746,"name":"uint","nodeType":"ElementaryTypeName","src":"1630:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5751,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5749,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5737,"src":"1655:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5748,"name":"pow2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6355,"src":"1644:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$returns$_t_uint256_$_t_uint256_$","typeString":"function (int256) pure returns (uint256,uint256)"}},"id":5750,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1644:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"1617:40:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5755,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5752,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1670:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5753,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1688:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5754,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1688:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1670:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5759,"nodeType":"IfStatement","src":"1667:85:28","trueBody":{"id":5758,"nodeType":"Block","src":"1715:37:28","statements":[{"expression":{"argumentTypes":null,"id":5756,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1736:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5757,"nodeType":"Return","src":"1729:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5763,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5760,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1764:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5761,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1782:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5762,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1782:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1764:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5767,"nodeType":"IfStatement","src":"1761:85:28","trueBody":{"id":5766,"nodeType":"Block","src":"1809:37:28","statements":[{"expression":{"argumentTypes":null,"id":5764,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5747,"src":"1830:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5765,"nodeType":"Return","src":"1823:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5768,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1858:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5769,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1876:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5770,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1876:23:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1858:41:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5782,"nodeType":"IfStatement","src":"1855:105:28","trueBody":{"id":5781,"nodeType":"Block","src":"1901:59:28","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5777,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5772,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5747,"src":"1923:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":5773,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1931:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1923:13:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5775,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1922:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5776,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1940:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1922:19:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":5778,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1944:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1922:27:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5780,"nodeType":"Return","src":"1915:34:28"}]}},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5783,"name":"revert","nodeType":"Identifier","overloadedDeclarations":[7627,7628],"referencedDeclaration":7627,"src":"1969:6:28","typeDescriptions":{"typeIdentifier":"t_function_revert_pure$__$returns$__$","typeString":"function () pure"}},"id":5784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1969:8:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5785,"nodeType":"ExpressionStatement","src":"1969:8:28"}]},"documentation":"@dev Returns estimate of 2**x given x\n @param x exponent in fixed point\n @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n @return estimate of 2**x in fixed point","id":5787,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"pow2","nodeType":"FunctionDefinition","parameters":{"id":5740,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5737,"name":"x","nodeType":"VariableDeclaration","scope":5787,"src":"1514:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5736,"name":"int","nodeType":"ElementaryTypeName","src":"1514:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5739,"name":"estimationMode","nodeType":"VariableDeclaration","scope":5787,"src":"1521:29:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":5738,"name":"EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"1521:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"1513:38:28"},"payable":false,"returnParameters":{"id":5743,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5742,"name":"","nodeType":"VariableDeclaration","scope":5787,"src":"1597:4:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5741,"name":"uint","nodeType":"ElementaryTypeName","src":"1597:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1596:6:28"},"scope":6668,"src":"1500:484:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6354,"nodeType":"Block","src":"2326:3593:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5799,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5797,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2466:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"33353431373734383632313532323333393130323731","id":5798,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2471:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3541774862152233910271_by_1","typeString":"int_const 3541774862152233910271"},"value":"3541774862152233910271"},"src":"2466:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5796,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2458:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5800,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2458:36:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5801,"nodeType":"ExpressionStatement","src":"2458:36:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5805,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5802,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2621:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":5804,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"2625:23:28","subExpression":{"argumentTypes":null,"hexValue":"31313830353931363230373137343131333033343234","id":5803,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2626:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1180591620717411303424_by_1","typeString":"int_const 1180591620717411303424"},"value":"1180591620717411303424"},"typeDescriptions":{"typeIdentifier":"t_rational_-1180591620717411303424_by_1","typeString":"int_const -1180591620717411303424"}},"src":"2621:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5810,"nodeType":"IfStatement","src":"2617:58:28","trueBody":{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"hexValue":"30","id":5806,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2670:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"argumentTypes":null,"hexValue":"31","id":5807,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2673:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"id":5808,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"2669:6:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_0_by_1_$_t_rational_1_by_1_$","typeString":"tuple(int_const 0,int_const 1)"}},"functionReturnParameters":5795,"id":5809,"nodeType":"Return","src":"2662:13:28"}},{"assignments":[],"declarations":[{"constant":false,"id":5812,"name":"shift","nodeType":"VariableDeclaration","scope":6355,"src":"2850:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5811,"name":"int","nodeType":"ElementaryTypeName","src":"2850:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5813,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2850:9:28"},{"assignments":[],"declarations":[{"constant":false,"id":5815,"name":"z","nodeType":"VariableDeclaration","scope":6355,"src":"2869:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5814,"name":"int","nodeType":"ElementaryTypeName","src":"2869:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5816,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2869:5:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5819,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5817,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2888:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5818,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2893:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2888:6:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":5861,"nodeType":"Block","src":"2985:93:28","statements":[{"expression":{"argumentTypes":null,"id":5848,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5837,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"2999:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5845,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5840,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5838,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"3008:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":5839,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3010:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3008:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":5841,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3007:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5843,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3019:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5842,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3015:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5844,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3015:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3007:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":5846,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3026:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3007:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2999:28:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5849,"nodeType":"ExpressionStatement","src":"2999:28:28"},{"expression":{"argumentTypes":null,"id":5859,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5850,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3041:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5851,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"3045:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5853,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3054:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5852,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3050:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5854,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3050:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5855,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"3061:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3050:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":5857,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3049:18:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3045:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3041:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5860,"nodeType":"ExpressionStatement","src":"3041:26:28"}]},"id":5862,"nodeType":"IfStatement","src":"2884:194:28","trueBody":{"id":5836,"nodeType":"Block","src":"2896:75:28","statements":[{"expression":{"argumentTypes":null,"id":5826,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5820,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"2910:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5825,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5821,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2918:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5823,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"2926:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5822,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2922:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5824,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2922:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2918:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2910:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5827,"nodeType":"ExpressionStatement","src":"2910:20:28"},{"expression":{"argumentTypes":null,"id":5834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5828,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"2944:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5833,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5829,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2948:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5831,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"2956:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2952:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5832,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2952:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2948:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2944:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5835,"nodeType":"ExpressionStatement","src":"2944:16:28"}]}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5866,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5864,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3094:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5865,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3099:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3094:6:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5863,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"3087:6:28","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3087:14:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5868,"nodeType":"ExpressionStatement","src":"3087:14:28"},{"assignments":[5870],"declarations":[{"constant":false,"id":5870,"name":"result","nodeType":"VariableDeclaration","scope":6355,"src":"3569:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5869,"name":"int","nodeType":"ElementaryTypeName","src":"3569:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5876,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5875,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5872,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3586:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5871,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3582:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5873,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3582:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5874,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3594:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3582:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3569:27:28"},{"assignments":[5878],"declarations":[{"constant":false,"id":5878,"name":"zpow","nodeType":"VariableDeclaration","scope":6355,"src":"3606:8:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5877,"name":"int","nodeType":"ElementaryTypeName","src":"3606:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5880,"initialValue":{"argumentTypes":null,"id":5879,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3617:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3606:12:28"},{"expression":{"argumentTypes":null,"id":5885,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5881,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3628:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5884,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307862313732313766376431636637396162","id":5882,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3638:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12786308645202655659_by_1","typeString":"int_const 12786308645202655659"},"value":"0xb17217f7d1cf79ab"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5883,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3659:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3638:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3628:35:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5886,"nodeType":"ExpressionStatement","src":"3628:35:28"},{"expression":{"argumentTypes":null,"id":5895,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5887,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3673:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5890,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5888,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3680:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5889,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3687:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3680:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5892,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3695:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5891,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3691:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5893,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3691:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3680:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3673:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5896,"nodeType":"ExpressionStatement","src":"3673:26:28"},{"expression":{"argumentTypes":null,"id":5906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5897,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3709:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5905,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5900,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866356664656666633136326337353433","id":5898,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3719:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17725587574382949699_by_1","typeString":"int_const 17725587574382949699"},"value":"0xf5fdeffc162c7543"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5899,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3740:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3719:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"id":5903,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3636","id":5901,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3749:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_66_by_1","typeString":"int_const 66"},"value":"66"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5902,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3754:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3749:7:28","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"}}],"id":5904,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3748:9:28","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"}},"src":"3719:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3709:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5907,"nodeType":"ExpressionStatement","src":"3709:48:28"},{"expression":{"argumentTypes":null,"id":5916,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5908,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3767:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5911,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5909,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3774:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5910,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3781:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3774:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5913,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3789:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5912,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3785:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5914,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3785:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3774:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3767:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5917,"nodeType":"ExpressionStatement","src":"3767:26:28"},{"expression":{"argumentTypes":null,"id":5927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5918,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3803:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5926,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5921,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865333538343662383235303566633539","id":5919,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3813:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16381921401269255257_by_1","typeString":"int_const 16381921401269255257"},"value":"0xe35846b82505fc59"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5920,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3834:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3813:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"id":5924,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3638","id":5922,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3843:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_68_by_1","typeString":"int_const 68"},"value":"68"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5923,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3848:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3843:7:28","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"}}],"id":5925,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3842:9:28","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"}},"src":"3813:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3803:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5928,"nodeType":"ExpressionStatement","src":"3803:48:28"},{"expression":{"argumentTypes":null,"id":5937,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5929,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3861:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5936,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5932,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5930,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3868:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5931,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3875:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3868:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5934,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3883:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5933,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3879:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5935,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3879:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3868:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3861:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5938,"nodeType":"ExpressionStatement","src":"3861:26:28"},{"expression":{"argumentTypes":null,"id":5948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5939,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3897:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5947,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5942,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839643935356237646432373362393465","id":5940,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3907:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11355082631444412750_by_1","typeString":"int_const 11355082631444412750"},"value":"0x9d955b7dd273b94e"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5941,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3928:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3907:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"},"id":5945,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3730","id":5943,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3937:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_70_by_1","typeString":"int_const 70"},"value":"70"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5944,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3942:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3937:7:28","typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"}}],"id":5946,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3936:9:28","typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"}},"src":"3907:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3897:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5949,"nodeType":"ExpressionStatement","src":"3897:48:28"},{"expression":{"argumentTypes":null,"id":5958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5950,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3955:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5951,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3962:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5952,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3969:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3962:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5955,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3977:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5954,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3973:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5956,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3973:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3962:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3955:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5959,"nodeType":"ExpressionStatement","src":"3955:26:28"},{"expression":{"argumentTypes":null,"id":5969,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5960,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3991:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5963,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307861656333666633633533333938383833","id":5961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4001:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12593189617617438851_by_1","typeString":"int_const 12593189617617438851"},"value":"0xaec3ff3c53398883"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5962,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4022:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4001:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"},"id":5966,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3733","id":5964,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4031:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_73_by_1","typeString":"int_const 73"},"value":"73"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5965,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4036:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4031:7:28","typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"}}],"id":5967,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4030:9:28","typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"}},"src":"4001:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3991:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5970,"nodeType":"ExpressionStatement","src":"3991:48:28"},{"expression":{"argumentTypes":null,"id":5979,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5971,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4049:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5972,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4056:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5973,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4063:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4056:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5976,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4071:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5975,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4067:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5977,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4067:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4056:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4049:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5980,"nodeType":"ExpressionStatement","src":"4049:26:28"},{"expression":{"argumentTypes":null,"id":5990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5981,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4085:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5989,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307861313834383937633336336333623761","id":5982,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4095:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11638578503611071354_by_1","typeString":"int_const 11638578503611071354"},"value":"0xa184897c363c3b7a"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5983,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4116:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4095:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"},"id":5987,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3736","id":5985,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4125:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_76_by_1","typeString":"int_const 76"},"value":"76"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5986,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4130:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4125:7:28","typeDescriptions":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"}}],"id":5988,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4124:9:28","typeDescriptions":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"}},"src":"4095:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4085:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5991,"nodeType":"ExpressionStatement","src":"4085:48:28"},{"expression":{"argumentTypes":null,"id":6000,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5992,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4143:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5999,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5993,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4150:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5994,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4157:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4150:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5997,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4165:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5996,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4161:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5998,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4161:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4150:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4143:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6001,"nodeType":"ExpressionStatement","src":"4143:26:28"},{"expression":{"argumentTypes":null,"id":6011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6002,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4179:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6010,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866666535666532633435383633343335","id":6003,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4189:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18439423715436803125_by_1","typeString":"int_const 18439423715436803125"},"value":"0xffe5fe2c45863435"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6004,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4210:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4189:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"},"id":6008,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3830","id":6006,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4219:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_80_by_1","typeString":"int_const 80"},"value":"80"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4224:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4219:7:28","typeDescriptions":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"}}],"id":6009,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4218:9:28","typeDescriptions":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"}},"src":"4189:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4179:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6012,"nodeType":"ExpressionStatement","src":"4179:48:28"},{"expression":{"argumentTypes":null,"id":6021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6013,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4237:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6020,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6014,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4244:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6015,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4251:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4244:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6018,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4259:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6017,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4255:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6019,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4255:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4244:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4237:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6022,"nodeType":"ExpressionStatement","src":"4237:26:28"},{"expression":{"argumentTypes":null,"id":6032,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6023,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4273:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6031,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6026,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307862313630313131643265343131666563","id":6024,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4283:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12781234559505211372_by_1","typeString":"int_const 12781234559505211372"},"value":"0xb160111d2e411fec"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6025,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4304:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4283:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"},"id":6029,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3833","id":6027,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4313:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_83_by_1","typeString":"int_const 83"},"value":"83"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6028,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4318:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4313:7:28","typeDescriptions":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"}}],"id":6030,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4312:9:28","typeDescriptions":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"}},"src":"4283:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4273:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6033,"nodeType":"ExpressionStatement","src":"4273:48:28"},{"expression":{"argumentTypes":null,"id":6042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6034,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4331:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6041,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6037,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6035,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4338:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6036,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4345:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4338:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6039,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4353:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6038,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4349:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6040,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4349:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4338:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4331:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6043,"nodeType":"ExpressionStatement","src":"4331:26:28"},{"expression":{"argumentTypes":null,"id":6053,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6044,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4367:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6047,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307864613932396539636166336531656432","id":6045,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4377:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_15749825242660216530_by_1","typeString":"int_const 15749825242660216530"},"value":"0xda929e9caf3e1ed2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6046,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4398:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4377:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"},"id":6050,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3837","id":6048,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4407:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_87_by_1","typeString":"int_const 87"},"value":"87"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6049,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4412:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4407:7:28","typeDescriptions":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"}}],"id":6051,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4406:9:28","typeDescriptions":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"}},"src":"4377:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4367:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6054,"nodeType":"ExpressionStatement","src":"4367:48:28"},{"expression":{"argumentTypes":null,"id":6063,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6055,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4425:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6062,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6058,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6056,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4432:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6057,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4439:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4432:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6060,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4447:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6059,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4443:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6061,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4443:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4432:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4425:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6064,"nodeType":"ExpressionStatement","src":"4425:26:28"},{"expression":{"argumentTypes":null,"id":6074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6065,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4461:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6073,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866323637613861633563373634666237","id":6066,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4471:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17467115138018856887_by_1","typeString":"int_const 17467115138018856887"},"value":"0xf267a8ac5c764fb7"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6067,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4492:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4471:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"},"id":6071,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3931","id":6069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4501:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_91_by_1","typeString":"int_const 91"},"value":"91"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6070,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4506:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4501:7:28","typeDescriptions":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"}}],"id":6072,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4500:9:28","typeDescriptions":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"}},"src":"4471:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4461:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6075,"nodeType":"ExpressionStatement","src":"4461:48:28"},{"expression":{"argumentTypes":null,"id":6084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6076,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4519:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6077,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4526:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6078,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4533:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4526:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6081,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4541:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6080,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4537:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6082,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4537:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4526:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4519:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6085,"nodeType":"ExpressionStatement","src":"4519:26:28"},{"expression":{"argumentTypes":null,"id":6095,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6086,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4555:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6094,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6089,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866343635363339613864643932363037","id":6087,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4565:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17610591433358124551_by_1","typeString":"int_const 17610591433358124551"},"value":"0xf465639a8dd92607"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6088,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4586:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4565:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"},"id":6092,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3935","id":6090,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4595:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_95_by_1","typeString":"int_const 95"},"value":"95"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6091,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4600:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4595:7:28","typeDescriptions":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"}}],"id":6093,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4594:9:28","typeDescriptions":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"}},"src":"4565:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4555:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6096,"nodeType":"ExpressionStatement","src":"4555:48:28"},{"expression":{"argumentTypes":null,"id":6105,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6097,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4613:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6098,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4620:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6099,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4627:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4620:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6102,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4635:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6101,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4631:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6103,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4620:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4613:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6106,"nodeType":"ExpressionStatement","src":"4613:26:28"},{"expression":{"argumentTypes":null,"id":6116,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6107,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4649:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6115,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6110,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865316465623238376531346332663135","id":6108,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4659:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16275642400033746709_by_1","typeString":"int_const 16275642400033746709"},"value":"0xe1deb287e14c2f15"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6109,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4680:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4659:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"},"id":6113,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3939","id":6111,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4689:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_99_by_1","typeString":"int_const 99"},"value":"99"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6112,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4694:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4689:7:28","typeDescriptions":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"}}],"id":6114,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4688:9:28","typeDescriptions":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"}},"src":"4659:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4649:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6117,"nodeType":"ExpressionStatement","src":"4649:48:28"},{"expression":{"argumentTypes":null,"id":6126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6118,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4707:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6125,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6119,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4714:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6120,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4721:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4714:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6123,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4729:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6122,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4725:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6124,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4725:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4714:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4707:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6127,"nodeType":"ExpressionStatement","src":"4707:26:28"},{"expression":{"argumentTypes":null,"id":6137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6128,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4743:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6131,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307863306230633938623336383763623134","id":6129,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4753:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_13884819250935745300_by_1","typeString":"int_const 13884819250935745300"},"value":"0xc0b0c98b3687cb14"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6130,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4774:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4753:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"},"id":6134,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313033","id":6132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4783:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_103_by_1","typeString":"int_const 103"},"value":"103"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6133,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4789:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4783:8:28","typeDescriptions":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"}}],"id":6135,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4782:10:28","typeDescriptions":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"}},"src":"4753:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4743:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6138,"nodeType":"ExpressionStatement","src":"4743:49:28"},{"expression":{"argumentTypes":null,"id":6147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6139,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4802:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6146,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6140,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4809:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6141,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4816:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4809:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6144,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4824:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6143,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6145,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4809:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4802:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6148,"nodeType":"ExpressionStatement","src":"4802:26:28"},{"expression":{"argumentTypes":null,"id":6158,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6149,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4838:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839386134623236616333633534623966","id":6150,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4848:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_10999112361566358431_by_1","typeString":"int_const 10999112361566358431"},"value":"0x98a4b26ac3c54b9f"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6151,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4869:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4848:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"},"id":6155,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313037","id":6153,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4878:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_107_by_1","typeString":"int_const 107"},"value":"107"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6154,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4884:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4878:8:28","typeDescriptions":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"}}],"id":6156,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4877:10:28","typeDescriptions":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"}},"src":"4848:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4838:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6159,"nodeType":"ExpressionStatement","src":"4838:49:28"},{"expression":{"argumentTypes":null,"id":6168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6160,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4897:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6163,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6161,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4904:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6162,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4911:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4904:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6165,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4919:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6164,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4915:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6166,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4915:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4904:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4897:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6169,"nodeType":"ExpressionStatement","src":"4897:26:28"},{"expression":{"argumentTypes":null,"id":6179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6170,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4933:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6178,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6173,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865316237343231643832303130663333","id":6171,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4943:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16264541273774427955_by_1","typeString":"int_const 16264541273774427955"},"value":"0xe1b7421d82010f33"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6172,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4964:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4943:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"},"id":6176,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313132","id":6174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4973:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_112_by_1","typeString":"int_const 112"},"value":"112"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6175,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4979:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4973:8:28","typeDescriptions":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"}}],"id":6177,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4972:10:28","typeDescriptions":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"}},"src":"4943:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4933:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6180,"nodeType":"ExpressionStatement","src":"4933:49:28"},{"expression":{"argumentTypes":null,"id":6189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6181,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4992:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6184,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6182,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4999:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6183,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5006:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4999:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6186,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5014:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6185,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5010:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6187,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5010:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4999:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4992:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6190,"nodeType":"ExpressionStatement","src":"4992:26:28"},{"expression":{"argumentTypes":null,"id":6200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6191,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5028:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6199,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6194,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839633734346437336366633539633931","id":6192,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5038:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11273720927017606289_by_1","typeString":"int_const 11273720927017606289"},"value":"0x9c744d73cfc59c91"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6193,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5059:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5038:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"},"id":6197,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313136","id":6195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5068:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_116_by_1","typeString":"int_const 116"},"value":"116"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6196,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5074:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5068:8:28","typeDescriptions":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"}}],"id":6198,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5067:10:28","typeDescriptions":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"}},"src":"5038:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5028:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6201,"nodeType":"ExpressionStatement","src":"5028:49:28"},{"expression":{"argumentTypes":null,"id":6210,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6202,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5087:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6205,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6203,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5094:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6204,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5101:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5094:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6207,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5109:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6206,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5105:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6208,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5105:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5094:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6211,"nodeType":"ExpressionStatement","src":"5087:26:28"},{"expression":{"argumentTypes":null,"id":6221,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6212,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5123:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6215,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307863633232323561306531326433656162","id":6213,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5133:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_14709360705848295083_by_1","typeString":"int_const 14709360705848295083"},"value":"0xcc2225a0e12d3eab"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6214,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5154:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5133:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"},"id":6218,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313231","id":6216,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5163:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_121_by_1","typeString":"int_const 121"},"value":"121"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6217,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5169:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5163:8:28","typeDescriptions":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"}}],"id":6219,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5162:10:28","typeDescriptions":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"}},"src":"5133:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5123:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6222,"nodeType":"ExpressionStatement","src":"5123:49:28"},{"expression":{"argumentTypes":null,"id":6231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6223,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5182:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6230,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6224,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5189:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6225,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5196:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5189:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6228,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5204:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6227,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5200:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6229,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5200:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5189:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5182:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6232,"nodeType":"ExpressionStatement","src":"5182:26:28"},{"expression":{"argumentTypes":null,"id":6242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6233,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5218:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866623862623565646131623461656239","id":6234,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5225:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18125781157507542713_by_1","typeString":"int_const 18125781157507542713"},"value":"0xfb8bb5eda1b4aeb9"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6235,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5246:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5225:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"},"id":6239,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313236","id":6237,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5255:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_126_by_1","typeString":"int_const 126"},"value":"126"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6238,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5261:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5255:8:28","typeDescriptions":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"}}],"id":6240,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5254:10:28","typeDescriptions":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"}},"src":"5225:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5218:46:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6243,"nodeType":"ExpressionStatement","src":"5218:46:28"},{"expression":{"argumentTypes":null,"id":6246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6244,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5274:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"id":6245,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5284:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5274:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6247,"nodeType":"ExpressionStatement","src":"5274:14:28"},{"expression":{"argumentTypes":null,"id":6254,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6248,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5298:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6252,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"38","id":6250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5309:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_8_by_1","typeString":"int_const 8"},"value":"8"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6251,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5313:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5309:7:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6249,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5305:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6253,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5305:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5298:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6255,"nodeType":"ExpressionStatement","src":"5298:19:28"},{"expression":{"argumentTypes":null,"id":6258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6256,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5328:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"hexValue":"3634","id":6257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5337:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5328:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6259,"nodeType":"ExpressionStatement","src":"5328:11:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6260,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5353:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6261,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5362:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5353:10:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6323,"nodeType":"IfStatement","src":"5349:431:28","trueBody":{"id":6322,"nodeType":"Block","src":"5365:415:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6263,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5383:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"323536","id":6264,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5394:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6265,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5398:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5394:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6267,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5393:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5383:21:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6269,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5408:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5383:26:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6313,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6311,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6309,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5750:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6310,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5753:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5750:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6312,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5757:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5750:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}},{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6318,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6316,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6314,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5760:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6315,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5763:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5760:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6317,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5767:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5760:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}}],"id":6319,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5749:20:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_$_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_$","typeString":"tuple(int_const 1157...(70 digits omitted)...9935,int_const 1157...(70 digits omitted)...9935)"}},"functionReturnParameters":5795,"id":6320,"nodeType":"Return","src":"5742:27:28"},"id":6321,"nodeType":"IfStatement","src":"5379:390:28","trueBody":{"id":6308,"nodeType":"Block","src":"5411:297:28","statements":[{"expression":{"argumentTypes":null,"id":6277,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6271,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5429:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6273,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5442:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6272,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5437:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6274,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5437:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"id":6275,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5453:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5437:21:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5429:29:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6278,"nodeType":"ExpressionStatement","src":"5429:29:28"},{"expression":{"argumentTypes":null,"id":6281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6279,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5476:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"<<=","rightHandSide":{"argumentTypes":null,"id":6280,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5485:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5476:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6282,"nodeType":"ExpressionStatement","src":"5476:14:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6289,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6287,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6283,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5535:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6285,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5548:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6284,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5543:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5535:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":6288,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5557:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5535:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6304,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6298,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5653:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6303,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6301,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6299,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5661:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6300,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5664:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5661:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6302,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5668:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5661:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}},"src":"5653:16:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6305,"nodeType":"ExpressionStatement","src":"5653:16:28"},"id":6306,"nodeType":"IfStatement","src":"5531:138:28","trueBody":{"expression":{"argumentTypes":null,"id":6296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6290,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5584:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6291,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5592:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6293,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5605:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6292,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5600:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6294,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5600:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5592:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5584:26:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6297,"nodeType":"ExpressionStatement","src":"5584:26:28"}},{"expression":null,"functionReturnParameters":5795,"id":6307,"nodeType":"Return","src":"5687:7:28"}]}}]}},{"expression":{"argumentTypes":null,"id":6333,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6324,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5789:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6332,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6329,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6325,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5797:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6327,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5806:6:28","subExpression":{"argumentTypes":null,"id":6326,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5807:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6328,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5805:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5797:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6330,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5796:18:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6331,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5817:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5796:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5789:29:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6334,"nodeType":"ExpressionStatement","src":"5789:29:28"},{"expression":{"argumentTypes":null,"id":6343,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6335,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5828:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6342,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6337,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5841:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6336,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5836:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5836:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5853:6:28","subExpression":{"argumentTypes":null,"id":6339,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5854:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6341,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5852:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5836:24:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5828:32:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6344,"nodeType":"ExpressionStatement","src":"5828:32:28"},{"expression":{"argumentTypes":null,"id":6351,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6345,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5870:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6350,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6346,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5878:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6348,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5891:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6347,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5886:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6349,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5886:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5878:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5870:26:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6352,"nodeType":"ExpressionStatement","src":"5870:26:28"},{"expression":null,"functionReturnParameters":5795,"id":6353,"nodeType":"Return","src":"5906:7:28"}]},"documentation":"@dev Returns bounds for value of 2**x given x\n @param x exponent in fixed point\n @return {\n \"lower\": \"lower bound of 2**x in fixed point\",\n \"upper\": \"upper bound of 2**x in fixed point\"\n }","id":6355,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"pow2Bounds","nodeType":"FunctionDefinition","parameters":{"id":5790,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5789,"name":"x","nodeType":"VariableDeclaration","scope":6355,"src":"2246:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5788,"name":"int","nodeType":"ElementaryTypeName","src":"2246:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2245:7:28"},"payable":false,"returnParameters":{"id":5795,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5792,"name":"lower","nodeType":"VariableDeclaration","scope":6355,"src":"2298:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5791,"name":"uint","nodeType":"ElementaryTypeName","src":"2298:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5794,"name":"upper","nodeType":"VariableDeclaration","scope":6355,"src":"2310:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5793,"name":"uint","nodeType":"ElementaryTypeName","src":"2310:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2297:24:28"},"scope":6668,"src":"2226:3693:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6388,"nodeType":"Block","src":"6096:126:28","statements":[{"assignments":[6363,6365],"declarations":[{"constant":false,"id":6363,"name":"lower","nodeType":"VariableDeclaration","scope":6389,"src":"6107:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6362,"name":"int","nodeType":"ElementaryTypeName","src":"6107:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6365,"name":"upper","nodeType":"VariableDeclaration","scope":6389,"src":"6118:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6364,"name":"int","nodeType":"ElementaryTypeName","src":"6118:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6369,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6367,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6357,"src":"6142:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6366,"name":"log2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6544,"src":"6131:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$_t_int256_$","typeString":"function (uint256) pure returns (int256,int256)"}},"id":6368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6131:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"6106:38:28"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6386,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6382,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6377,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6370,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6365,"src":"6163:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6371,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6363,"src":"6171:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6163:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6373,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6162:15:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":6374,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6180:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"6162:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6376,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6363,"src":"6184:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6162:27:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6378,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6161:29:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6380,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"6197:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6379,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6193:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6381,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6193:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6161:40:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6384,"name":"LOG2_E","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5689,"src":"6208:6:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6383,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6204:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6385,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6204:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6161:54:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6361,"id":6387,"nodeType":"Return","src":"6154:61:28"}]},"documentation":"@dev Returns natural logarithm value of given x\n @param x x\n @return ln(x)","id":6389,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"ln","nodeType":"FunctionDefinition","parameters":{"id":6358,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6357,"name":"x","nodeType":"VariableDeclaration","scope":6389,"src":"6034:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6356,"name":"uint","nodeType":"ElementaryTypeName","src":"6034:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6033:8:28"},"payable":false,"returnParameters":{"id":6361,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6360,"name":"","nodeType":"VariableDeclaration","scope":6389,"src":"6087:3:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6359,"name":"int","nodeType":"ElementaryTypeName","src":"6087:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"6086:5:28"},"scope":6668,"src":"6022:200:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6440,"nodeType":"Block","src":"6591:375:28","statements":[{"assignments":[6399,6401],"declarations":[{"constant":false,"id":6399,"name":"lower","nodeType":"VariableDeclaration","scope":6441,"src":"6602:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6398,"name":"int","nodeType":"ElementaryTypeName","src":"6602:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6401,"name":"upper","nodeType":"VariableDeclaration","scope":6441,"src":"6613:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6400,"name":"int","nodeType":"ElementaryTypeName","src":"6613:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6405,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6403,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6391,"src":"6637:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6402,"name":"log2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6544,"src":"6626:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$_t_int256_$","typeString":"function (uint256) pure returns (int256,int256)"}},"id":6404,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6626:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"6601:38:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6409,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6406,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6652:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6407,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6670:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6408,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6670:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6652:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6413,"nodeType":"IfStatement","src":"6649:85:28","trueBody":{"id":6412,"nodeType":"Block","src":"6697:37:28","statements":[{"expression":{"argumentTypes":null,"id":6410,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6718:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6411,"nodeType":"Return","src":"6711:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6417,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6414,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6746:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6415,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6764:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6416,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6764:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6746:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6421,"nodeType":"IfStatement","src":"6743:85:28","trueBody":{"id":6420,"nodeType":"Block","src":"6791:37:28","statements":[{"expression":{"argumentTypes":null,"id":6418,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6401,"src":"6812:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6419,"nodeType":"Return","src":"6805:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6425,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6422,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6840:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6423,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6858:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6424,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6858:23:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6840:41:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6436,"nodeType":"IfStatement","src":"6837:105:28","trueBody":{"id":6435,"nodeType":"Block","src":"6883:59:28","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6426,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6401,"src":"6905:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6427,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6913:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6905:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6429,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6904:15:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":6430,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6922:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"6904:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6432,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6926:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6904:27:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6434,"nodeType":"Return","src":"6897:34:28"}]}},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":6437,"name":"revert","nodeType":"Identifier","overloadedDeclarations":[7627,7628],"referencedDeclaration":7627,"src":"6951:6:28","typeDescriptions":{"typeIdentifier":"t_function_revert_pure$__$returns$__$","typeString":"function () pure"}},"id":6438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6951:8:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6439,"nodeType":"ExpressionStatement","src":"6951:8:28"}]},"documentation":"@dev Returns estimate of binaryLog(x) given x\n @param x logarithm argument in fixed point\n @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n @return estimate of binaryLog(x) in fixed point","id":6441,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"binaryLog","nodeType":"FunctionDefinition","parameters":{"id":6394,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6391,"name":"x","nodeType":"VariableDeclaration","scope":6441,"src":"6498:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6390,"name":"uint","nodeType":"ElementaryTypeName","src":"6498:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6393,"name":"estimationMode","nodeType":"VariableDeclaration","scope":6441,"src":"6506:29:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":6392,"name":"EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"6506:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"6497:39:28"},"payable":false,"returnParameters":{"id":6397,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6396,"name":"","nodeType":"VariableDeclaration","scope":6441,"src":"6582:3:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6395,"name":"int","nodeType":"ElementaryTypeName","src":"6582:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"6581:5:28"},"scope":6668,"src":"6479:487:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6543,"nodeType":"Block","src":"7341:645:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6453,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6451,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7359:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6452,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7363:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"7359:5:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6450,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"7351:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7351:14:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6455,"nodeType":"ExpressionStatement","src":"7351:14:28"},{"expression":{"argumentTypes":null,"id":6460,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6456,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7408:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6458,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7426:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6457,"name":"floorLog2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6620,"src":"7416:9:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$","typeString":"function (uint256) pure returns (int256)"}},"id":6459,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7416:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7408:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6461,"nodeType":"ExpressionStatement","src":"7408:20:28"},{"assignments":[],"declarations":[{"constant":false,"id":6463,"name":"y","nodeType":"VariableDeclaration","scope":6544,"src":"7439:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6462,"name":"uint","nodeType":"ElementaryTypeName","src":"7439:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":6464,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"7439:6:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6467,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6465,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7459:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6466,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7467:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"7459:9:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6483,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6477,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7530:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6482,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6478,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7534:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6480,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7544:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6479,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7539:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6481,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7539:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7534:16:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7530:20:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6484,"nodeType":"ExpressionStatement","src":"7530:20:28"},"id":6485,"nodeType":"IfStatement","src":"7455:95:28","trueBody":{"expression":{"argumentTypes":null,"id":6475,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6468,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7482:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6469,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7486:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6472,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"7496:6:28","subExpression":{"argumentTypes":null,"id":6471,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7497:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6470,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7491:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7491:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7486:17:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7482:21:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6476,"nodeType":"ExpressionStatement","src":"7482:21:28"}},{"expression":{"argumentTypes":null,"id":6490,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6486,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7561:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"*=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6488,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7574:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6487,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7570:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6489,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7570:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7561:17:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6491,"nodeType":"ExpressionStatement","src":"7561:17:28"},{"body":{"id":6535,"nodeType":"Block","src":"7731:213:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6502,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7748:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":6503,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7753:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7748:8:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6507,"nodeType":"IfStatement","src":"7745:51:28","trueBody":{"id":6506,"nodeType":"Block","src":"7758:38:28","statements":[{"id":6505,"nodeType":"Break","src":"7776:5:28"}]}},{"expression":{"argumentTypes":null,"id":6514,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6508,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7809:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6513,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6509,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7813:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6510,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7817:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7813:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":6512,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7821:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7813:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7809:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6515,"nodeType":"ExpressionStatement","src":"7809:15:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6520,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6516,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7841:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6519,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6517,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7846:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6518,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7850:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7846:7:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7841:12:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6534,"nodeType":"IfStatement","src":"7838:96:28","trueBody":{"id":6533,"nodeType":"Block","src":"7855:79:28","statements":[{"expression":{"argumentTypes":null,"id":6527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6521,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7873:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6525,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6523,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7886:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"id":6524,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7893:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7886:8:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6522,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7882:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6526,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7882:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7873:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6528,"nodeType":"ExpressionStatement","src":"7873:22:28"},{"expression":{"argumentTypes":null,"id":6531,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6529,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7913:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"/=","rightHandSide":{"argumentTypes":null,"hexValue":"32","id":6530,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7918:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"7913:6:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6532,"nodeType":"ExpressionStatement","src":"7913:6:28"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6498,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6496,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7717:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6497,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7722:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"7717:7:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6536,"initializationExpression":{"assignments":[6493],"declarations":[{"constant":false,"id":6493,"name":"m","nodeType":"VariableDeclaration","scope":6544,"src":"7706:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6492,"name":"int","nodeType":"ElementaryTypeName","src":"7706:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6495,"initialValue":{"argumentTypes":null,"hexValue":"31","id":6494,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7714:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"7706:9:28"},"loopExpression":{"expression":{"argumentTypes":null,"id":6500,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"7726:3:28","subExpression":{"argumentTypes":null,"id":6499,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7726:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6501,"nodeType":"ExpressionStatement","src":"7726:3:28"},"nodeType":"ForStatement","src":"7701:243:28"},{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6537,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7962:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6538,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7969:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"34","id":6539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7977:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"7969:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6541,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"7961:18:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"functionReturnParameters":6449,"id":6542,"nodeType":"Return","src":"7954:25:28"}]},"documentation":"@dev Returns bounds for value of binaryLog(x) given x\n @param x logarithm argument in fixed point\n @return {\n \"lower\": \"lower bound of binaryLog(x) in fixed point\",\n \"upper\": \"upper bound of binaryLog(x) in fixed point\"\n }","id":6544,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"log2Bounds","nodeType":"FunctionDefinition","parameters":{"id":6444,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6443,"name":"x","nodeType":"VariableDeclaration","scope":6544,"src":"7262:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6442,"name":"uint","nodeType":"ElementaryTypeName","src":"7262:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"7261:8:28"},"payable":false,"returnParameters":{"id":6449,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6446,"name":"lower","nodeType":"VariableDeclaration","scope":6544,"src":"7315:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6445,"name":"int","nodeType":"ElementaryTypeName","src":"7315:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6448,"name":"upper","nodeType":"VariableDeclaration","scope":6544,"src":"7326:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6447,"name":"int","nodeType":"ElementaryTypeName","src":"7326:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7314:22:28"},"scope":6668,"src":"7242:744:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6619,"nodeType":"Block","src":"8184:404:28","statements":[{"expression":{"argumentTypes":null,"id":6554,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6551,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8194:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6553,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8199:3:28","subExpression":{"argumentTypes":null,"hexValue":"3634","id":6552,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8200:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"typeDescriptions":{"typeIdentifier":"t_rational_-64_by_1","typeString":"int_const -64"}},"src":"8194:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6555,"nodeType":"ExpressionStatement","src":"8194:8:28"},{"assignments":[6557],"declarations":[{"constant":false,"id":6557,"name":"hi","nodeType":"VariableDeclaration","scope":6620,"src":"8212:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6556,"name":"int","nodeType":"ElementaryTypeName","src":"8212:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6559,"initialValue":{"argumentTypes":null,"hexValue":"313933","id":6558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8221:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_193_by_1","typeString":"int_const 193"},"value":"193"},"nodeType":"VariableDeclarationStatement","src":"8212:12:28"},{"assignments":[6561],"declarations":[{"constant":false,"id":6561,"name":"mid","nodeType":"VariableDeclaration","scope":6620,"src":"8327:7:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6560,"name":"int","nodeType":"ElementaryTypeName","src":"8327:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6568,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6567,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6564,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6562,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8338:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6563,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8343:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8338:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6565,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8337:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6566,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8350:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8337:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"8327:24:28"},{"body":{"id":6617,"nodeType":"Block","src":"8382:200:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6598,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6577,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6575,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8400:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6576,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8406:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8400:7:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6585,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6583,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6578,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6546,"src":"8411:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6581,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8421:4:28","subExpression":{"argumentTypes":null,"id":6580,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8422:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8416:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6582,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8416:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8411:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6584,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"8429:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8411:21:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8400:32:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6589,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6587,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8436:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6588,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8443:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8436:8:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6596,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6594,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6590,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6546,"src":"8448:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6592,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8458:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6591,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8453:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8453:9:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8448:14:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6595,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"8465:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8448:20:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8436:32:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8400:68:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6605,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6603,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8529:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6604,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8534:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8529:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6606,"nodeType":"ExpressionStatement","src":"8529:8:28"},"id":6607,"nodeType":"IfStatement","src":"8396:141:28","trueBody":{"expression":{"argumentTypes":null,"id":6601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6599,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8486:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6600,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8491:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8486:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6602,"nodeType":"ExpressionStatement","src":"8486:8:28"}},{"expression":{"argumentTypes":null,"id":6615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6608,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8551:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6609,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8558:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6610,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8563:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8558:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6612,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8557:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8570:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8557:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8551:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6616,"nodeType":"ExpressionStatement","src":"8551:20:28"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6569,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8368:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8373:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8368:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6572,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8367:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6573,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8378:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8367:13:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6618,"nodeType":"WhileStatement","src":"8361:221:28"}]},"documentation":"@dev Returns base 2 logarithm value of given x\n @param x x\n @return logarithmic value","id":6620,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"floorLog2","nodeType":"FunctionDefinition","parameters":{"id":6547,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6546,"name":"x","nodeType":"VariableDeclaration","scope":6620,"src":"8119:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6545,"name":"uint","nodeType":"ElementaryTypeName","src":"8119:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8118:8:28"},"payable":false,"returnParameters":{"id":6550,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6549,"name":"lo","nodeType":"VariableDeclaration","scope":6620,"src":"8172:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6548,"name":"int","nodeType":"ElementaryTypeName","src":"8172:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8171:8:28"},"scope":6668,"src":"8100:488:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6666,"nodeType":"Block","src":"8796:182:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6629,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8814:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8814:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6631,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8828:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8814:15:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6628,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8806:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8806:24:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6634,"nodeType":"ExpressionStatement","src":"8806:24:28"},{"expression":{"argumentTypes":null,"id":6640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6635,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8840:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_-57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1","typeString":"int_const -578...(70 digits omitted)...9968"},"id":6639,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6637,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8849:2:28","subExpression":{"argumentTypes":null,"hexValue":"32","id":6636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8850:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"typeDescriptions":{"typeIdentifier":"t_rational_-2_by_1","typeString":"int_const -2"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323535","id":6638,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8853:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_255_by_1","typeString":"int_const 255"},"value":"255"},"src":"8849:7:28","typeDescriptions":{"typeIdentifier":"t_rational_-57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1","typeString":"int_const -578...(70 digits omitted)...9968"}},"src":"8840:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6641,"nodeType":"ExpressionStatement","src":"8840:16:28"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":6653,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8921:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6655,"indexExpression":{"argumentTypes":null,"id":6654,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8926:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8921:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":6656,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8931:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8921:16:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6664,"nodeType":"IfStatement","src":"8917:54:28","trueBody":{"expression":{"argumentTypes":null,"id":6662,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6658,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8955:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":6659,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8964:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6661,"indexExpression":{"argumentTypes":null,"id":6660,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8969:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8964:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8955:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6663,"nodeType":"ExpressionStatement","src":"8955:16:28"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8883:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6647,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8887:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8887:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8883:15:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6665,"initializationExpression":{"assignments":[6643],"declarations":[{"constant":false,"id":6643,"name":"i","nodeType":"VariableDeclaration","scope":6667,"src":"8871:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6642,"name":"uint","nodeType":"ElementaryTypeName","src":"8871:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":6645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":6644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8880:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"8871:10:28"},"loopExpression":{"expression":{"argumentTypes":null,"id":6651,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"8900:3:28","subExpression":{"argumentTypes":null,"id":6650,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8900:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6652,"nodeType":"ExpressionStatement","src":"8900:3:28"},"nodeType":"ForStatement","src":"8866:105:28"}]},"documentation":"@dev Returns maximum of an array\n @param nums Numbers to look through\n @return Maximum number","id":6667,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"max","nodeType":"FunctionDefinition","parameters":{"id":6624,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6623,"name":"nums","nodeType":"VariableDeclaration","scope":6667,"src":"8723:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":6621,"name":"int","nodeType":"ElementaryTypeName","src":"8723:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6622,"length":null,"nodeType":"ArrayTypeName","src":"8723:5:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"8722:12:28"},"payable":false,"returnParameters":{"id":6627,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6626,"name":"maxNum","nodeType":"VariableDeclaration","scope":6667,"src":"8780:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6625,"name":"int","nodeType":"ElementaryTypeName","src":"8780:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8779:12:28"},"scope":6668,"src":"8710:268:28","stateMutability":"pure","superFunction":null,"visibility":"public"}],"scope":6669,"src":"213:8767:28"}],"src":"0:8981:28"},"legacyAST":{"absolutePath":"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol","exportedSymbols":{"Fixed192x64Math":[6668]},"id":6669,"nodeType":"SourceUnit","nodes":[{"id":5676,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:28"},{"baseContracts":[],"contractDependencies":[],"contractKind":"library","documentation":"@title Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - \n @author Stefan George - ","fullyImplemented":true,"id":6668,"linearizedBaseContracts":[6668],"name":"Fixed192x64Math","nodeType":"ContractDefinition","nodes":[{"canonicalName":"Fixed192x64Math.EstimationMode","id":5680,"members":[{"id":5677,"name":"LowerBound","nodeType":"EnumValue","src":"266:10:28"},{"id":5678,"name":"UpperBound","nodeType":"EnumValue","src":"278:10:28"},{"id":5679,"name":"Midpoint","nodeType":"EnumValue","src":"290:8:28"}],"name":"EstimationMode","nodeType":"EnumDefinition","src":"244:56:28"},{"constant":true,"id":5683,"name":"ONE","nodeType":"VariableDeclaration","scope":6668,"src":"385:47:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5681,"name":"uint","nodeType":"ElementaryTypeName","src":"385:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":5682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"413:19:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"public"},{"constant":true,"id":5686,"name":"LN2","nodeType":"VariableDeclaration","scope":6668,"src":"438:45:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5684,"name":"uint","nodeType":"ElementaryTypeName","src":"438:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"307862313732313766376431636637396163","id":5685,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"465:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12786308645202655660_by_1","typeString":"int_const 12786308645202655660"},"value":"0xb17217f7d1cf79ac"},"visibility":"public"},{"constant":true,"id":5689,"name":"LOG2_E","nodeType":"VariableDeclaration","scope":6668,"src":"489:49:28","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5687,"name":"uint","nodeType":"ElementaryTypeName","src":"489:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783137313534373635326238326665313737","id":5688,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"519:19:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_26613026195688644983_by_1","typeString":"int_const 26613026195688644983"},"value":"0x171547652b82fe177"},"visibility":"public"},{"body":{"id":5734,"nodeType":"Block","src":"767:502:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5699,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5697,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"904:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"32343534393731323539383738393039383836363739","id":5698,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"909:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2454971259878909886679_by_1","typeString":"int_const 2454971259878909886679"},"value":"2454971259878909886679"},"src":"904:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5696,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"896:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5700,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"896:36:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5701,"nodeType":"ExpressionStatement","src":"896:36:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5705,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5702,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"1056:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":5704,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"1061:22:28","subExpression":{"argumentTypes":null,"hexValue":"383138333233373533323932393639393632323237","id":5703,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1062:21:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_818323753292969962227_by_1","typeString":"int_const 818323753292969962227"},"value":"818323753292969962227"},"typeDescriptions":{"typeIdentifier":"t_rational_-818323753292969962227_by_1","typeString":"int_const -818323753292969962227"}},"src":"1056:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5708,"nodeType":"IfStatement","src":"1052:53:28","trueBody":{"expression":{"argumentTypes":null,"hexValue":"30","id":5706,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1104:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"functionReturnParameters":5695,"id":5707,"nodeType":"Return","src":"1097:8:28"}},{"assignments":[5710,5712],"declarations":[{"constant":false,"id":5710,"name":"lower","nodeType":"VariableDeclaration","scope":5735,"src":"1157:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5709,"name":"uint","nodeType":"ElementaryTypeName","src":"1157:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5712,"name":"upper","nodeType":"VariableDeclaration","scope":5735,"src":"1169:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5711,"name":"uint","nodeType":"ElementaryTypeName","src":"1169:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5724,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5718,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5714,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5691,"src":"1194:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5716,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"1202:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5715,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1198:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5717,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1198:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1194:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5720,"name":"LN2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5686,"src":"1213:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5719,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1209:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5721,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1209:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1194:23:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5713,"name":"pow2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6355,"src":"1183:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$returns$_t_uint256_$_t_uint256_$","typeString":"function (int256) pure returns (uint256,uint256)"}},"id":5723,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1183:35:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"1156:62:28"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5732,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5730,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5727,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5725,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5712,"src":"1236:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":5726,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5710,"src":"1244:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1236:13:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5728,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1235:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5729,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1253:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1235:19:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":5731,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5710,"src":"1257:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1235:27:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5695,"id":5733,"nodeType":"Return","src":"1228:34:28"}]},"documentation":"@dev Returns natural exponential function value of given x\n @param x x\n @return e**x","id":5735,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"exp","nodeType":"FunctionDefinition","parameters":{"id":5692,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5691,"name":"x","nodeType":"VariableDeclaration","scope":5735,"src":"705:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5690,"name":"int","nodeType":"ElementaryTypeName","src":"705:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"704:7:28"},"payable":false,"returnParameters":{"id":5695,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5694,"name":"","nodeType":"VariableDeclaration","scope":5735,"src":"757:4:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5693,"name":"uint","nodeType":"ElementaryTypeName","src":"757:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"756:6:28"},"scope":6668,"src":"692:577:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":5786,"nodeType":"Block","src":"1607:377:28","statements":[{"assignments":[5745,5747],"declarations":[{"constant":false,"id":5745,"name":"lower","nodeType":"VariableDeclaration","scope":5787,"src":"1618:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5744,"name":"uint","nodeType":"ElementaryTypeName","src":"1618:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5747,"name":"upper","nodeType":"VariableDeclaration","scope":5787,"src":"1630:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5746,"name":"uint","nodeType":"ElementaryTypeName","src":"1630:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5751,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5749,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5737,"src":"1655:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5748,"name":"pow2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6355,"src":"1644:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$returns$_t_uint256_$_t_uint256_$","typeString":"function (int256) pure returns (uint256,uint256)"}},"id":5750,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1644:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint256_$_t_uint256_$","typeString":"tuple(uint256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"1617:40:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5755,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5752,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1670:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5753,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1688:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5754,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1688:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1670:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5759,"nodeType":"IfStatement","src":"1667:85:28","trueBody":{"id":5758,"nodeType":"Block","src":"1715:37:28","statements":[{"expression":{"argumentTypes":null,"id":5756,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1736:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5757,"nodeType":"Return","src":"1729:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5763,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5760,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1764:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5761,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1782:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5762,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1782:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1764:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5767,"nodeType":"IfStatement","src":"1761:85:28","trueBody":{"id":5766,"nodeType":"Block","src":"1809:37:28","statements":[{"expression":{"argumentTypes":null,"id":5764,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5747,"src":"1830:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5765,"nodeType":"Return","src":"1823:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":5771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5768,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5739,"src":"1858:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5769,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"1876:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":5770,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1876:23:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"1858:41:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5782,"nodeType":"IfStatement","src":"1855:105:28","trueBody":{"id":5781,"nodeType":"Block","src":"1901:59:28","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5777,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5774,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5772,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5747,"src":"1923:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":5773,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1931:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1923:13:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5775,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1922:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5776,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1940:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1922:19:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":5778,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5745,"src":"1944:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1922:27:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":5743,"id":5780,"nodeType":"Return","src":"1915:34:28"}]}},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5783,"name":"revert","nodeType":"Identifier","overloadedDeclarations":[7627,7628],"referencedDeclaration":7627,"src":"1969:6:28","typeDescriptions":{"typeIdentifier":"t_function_revert_pure$__$returns$__$","typeString":"function () pure"}},"id":5784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1969:8:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5785,"nodeType":"ExpressionStatement","src":"1969:8:28"}]},"documentation":"@dev Returns estimate of 2**x given x\n @param x exponent in fixed point\n @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n @return estimate of 2**x in fixed point","id":5787,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"pow2","nodeType":"FunctionDefinition","parameters":{"id":5740,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5737,"name":"x","nodeType":"VariableDeclaration","scope":5787,"src":"1514:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5736,"name":"int","nodeType":"ElementaryTypeName","src":"1514:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5739,"name":"estimationMode","nodeType":"VariableDeclaration","scope":5787,"src":"1521:29:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":5738,"name":"EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"1521:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"1513:38:28"},"payable":false,"returnParameters":{"id":5743,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5742,"name":"","nodeType":"VariableDeclaration","scope":5787,"src":"1597:4:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5741,"name":"uint","nodeType":"ElementaryTypeName","src":"1597:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1596:6:28"},"scope":6668,"src":"1500:484:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6354,"nodeType":"Block","src":"2326:3593:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5799,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5797,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2466:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"33353431373734383632313532323333393130323731","id":5798,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2471:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3541774862152233910271_by_1","typeString":"int_const 3541774862152233910271"},"value":"3541774862152233910271"},"src":"2466:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5796,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2458:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5800,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2458:36:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5801,"nodeType":"ExpressionStatement","src":"2458:36:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5805,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5802,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2621:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":5804,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"2625:23:28","subExpression":{"argumentTypes":null,"hexValue":"31313830353931363230373137343131333033343234","id":5803,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2626:22:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1180591620717411303424_by_1","typeString":"int_const 1180591620717411303424"},"value":"1180591620717411303424"},"typeDescriptions":{"typeIdentifier":"t_rational_-1180591620717411303424_by_1","typeString":"int_const -1180591620717411303424"}},"src":"2621:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5810,"nodeType":"IfStatement","src":"2617:58:28","trueBody":{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"hexValue":"30","id":5806,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2670:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"argumentTypes":null,"hexValue":"31","id":5807,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2673:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"id":5808,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"2669:6:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_0_by_1_$_t_rational_1_by_1_$","typeString":"tuple(int_const 0,int_const 1)"}},"functionReturnParameters":5795,"id":5809,"nodeType":"Return","src":"2662:13:28"}},{"assignments":[],"declarations":[{"constant":false,"id":5812,"name":"shift","nodeType":"VariableDeclaration","scope":6355,"src":"2850:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5811,"name":"int","nodeType":"ElementaryTypeName","src":"2850:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5813,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2850:9:28"},{"assignments":[],"declarations":[{"constant":false,"id":5815,"name":"z","nodeType":"VariableDeclaration","scope":6355,"src":"2869:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5814,"name":"int","nodeType":"ElementaryTypeName","src":"2869:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5816,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2869:5:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5819,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5817,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2888:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5818,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2893:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2888:6:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":5861,"nodeType":"Block","src":"2985:93:28","statements":[{"expression":{"argumentTypes":null,"id":5848,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5837,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"2999:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5847,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5845,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5840,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5838,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"3008:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":5839,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3010:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3008:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":5841,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3007:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5843,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3019:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5842,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3015:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5844,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3015:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3007:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":5846,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3026:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"3007:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2999:28:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5849,"nodeType":"ExpressionStatement","src":"2999:28:28"},{"expression":{"argumentTypes":null,"id":5859,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5850,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3041:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5851,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"3045:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5856,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5853,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3054:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5852,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3050:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5854,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3050:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5855,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"3061:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3050:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":5857,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3049:18:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3045:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3041:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5860,"nodeType":"ExpressionStatement","src":"3041:26:28"}]},"id":5862,"nodeType":"IfStatement","src":"2884:194:28","trueBody":{"id":5836,"nodeType":"Block","src":"2896:75:28","statements":[{"expression":{"argumentTypes":null,"id":5826,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5820,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"2910:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5825,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5821,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2918:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5823,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"2926:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5822,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2922:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5824,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2922:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2918:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2910:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5827,"nodeType":"ExpressionStatement","src":"2910:20:28"},{"expression":{"argumentTypes":null,"id":5834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5828,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"2944:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5833,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5829,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5789,"src":"2948:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5831,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"2956:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2952:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5832,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2952:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2948:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2944:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5835,"nodeType":"ExpressionStatement","src":"2944:16:28"}]}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5866,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5864,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3094:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5865,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3099:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3094:6:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5863,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"3087:6:28","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3087:14:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5868,"nodeType":"ExpressionStatement","src":"3087:14:28"},{"assignments":[5870],"declarations":[{"constant":false,"id":5870,"name":"result","nodeType":"VariableDeclaration","scope":6355,"src":"3569:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5869,"name":"int","nodeType":"ElementaryTypeName","src":"3569:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5876,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5875,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5872,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3586:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5871,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3582:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5873,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3582:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5874,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3594:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3582:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3569:27:28"},{"assignments":[5878],"declarations":[{"constant":false,"id":5878,"name":"zpow","nodeType":"VariableDeclaration","scope":6355,"src":"3606:8:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5877,"name":"int","nodeType":"ElementaryTypeName","src":"3606:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":5880,"initialValue":{"argumentTypes":null,"id":5879,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3617:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"3606:12:28"},{"expression":{"argumentTypes":null,"id":5885,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5881,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3628:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5884,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307862313732313766376431636637396162","id":5882,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3638:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12786308645202655659_by_1","typeString":"int_const 12786308645202655659"},"value":"0xb17217f7d1cf79ab"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5883,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3659:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3638:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3628:35:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5886,"nodeType":"ExpressionStatement","src":"3628:35:28"},{"expression":{"argumentTypes":null,"id":5895,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5887,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3673:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5894,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5890,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5888,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3680:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5889,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3687:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3680:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5892,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3695:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5891,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3691:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5893,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3691:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3680:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3673:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5896,"nodeType":"ExpressionStatement","src":"3673:26:28"},{"expression":{"argumentTypes":null,"id":5906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5897,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3709:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5905,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5900,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866356664656666633136326337353433","id":5898,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3719:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17725587574382949699_by_1","typeString":"int_const 17725587574382949699"},"value":"0xf5fdeffc162c7543"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5899,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3740:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3719:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"id":5903,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3636","id":5901,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3749:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_66_by_1","typeString":"int_const 66"},"value":"66"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5902,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3754:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3749:7:28","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"}}],"id":5904,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3748:9:28","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"}},"src":"3719:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3709:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5907,"nodeType":"ExpressionStatement","src":"3709:48:28"},{"expression":{"argumentTypes":null,"id":5916,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5908,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3767:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5915,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5911,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5909,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3774:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5910,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3781:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3774:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5913,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3789:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5912,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3785:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5914,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3785:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3774:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3767:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5917,"nodeType":"ExpressionStatement","src":"3767:26:28"},{"expression":{"argumentTypes":null,"id":5927,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5918,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3803:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5926,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5921,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865333538343662383235303566633539","id":5919,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3813:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16381921401269255257_by_1","typeString":"int_const 16381921401269255257"},"value":"0xe35846b82505fc59"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5920,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3834:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3813:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"id":5924,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3638","id":5922,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3843:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_68_by_1","typeString":"int_const 68"},"value":"68"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5923,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3848:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3843:7:28","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"}}],"id":5925,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3842:9:28","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"}},"src":"3813:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3803:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5928,"nodeType":"ExpressionStatement","src":"3803:48:28"},{"expression":{"argumentTypes":null,"id":5937,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5929,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3861:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5936,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5932,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5930,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3868:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5931,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3875:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3868:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5934,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3883:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5933,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3879:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5935,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3879:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3868:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3861:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5938,"nodeType":"ExpressionStatement","src":"3861:26:28"},{"expression":{"argumentTypes":null,"id":5948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5939,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3897:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5947,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5942,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839643935356237646432373362393465","id":5940,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3907:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11355082631444412750_by_1","typeString":"int_const 11355082631444412750"},"value":"0x9d955b7dd273b94e"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5941,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3928:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3907:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"},"id":5945,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3730","id":5943,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3937:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_70_by_1","typeString":"int_const 70"},"value":"70"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5944,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3942:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"3937:7:28","typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"}}],"id":5946,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3936:9:28","typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"}},"src":"3907:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3897:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5949,"nodeType":"ExpressionStatement","src":"3897:48:28"},{"expression":{"argumentTypes":null,"id":5958,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5950,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3955:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5951,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"3962:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5952,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"3969:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3962:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5955,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"3977:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5954,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3973:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5956,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3973:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3962:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3955:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5959,"nodeType":"ExpressionStatement","src":"3955:26:28"},{"expression":{"argumentTypes":null,"id":5969,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5960,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"3991:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5963,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307861656333666633633533333938383833","id":5961,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4001:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12593189617617438851_by_1","typeString":"int_const 12593189617617438851"},"value":"0xaec3ff3c53398883"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5962,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4022:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4001:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"},"id":5966,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3733","id":5964,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4031:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_73_by_1","typeString":"int_const 73"},"value":"73"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5965,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4036:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4031:7:28","typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"}}],"id":5967,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4030:9:28","typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"}},"src":"4001:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3991:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5970,"nodeType":"ExpressionStatement","src":"3991:48:28"},{"expression":{"argumentTypes":null,"id":5979,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5971,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4049:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5974,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5972,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4056:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5973,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4063:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4056:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5976,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4071:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5975,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4067:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5977,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4067:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4056:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4049:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5980,"nodeType":"ExpressionStatement","src":"4049:26:28"},{"expression":{"argumentTypes":null,"id":5990,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5981,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4085:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5989,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307861313834383937633336336333623761","id":5982,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4095:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11638578503611071354_by_1","typeString":"int_const 11638578503611071354"},"value":"0xa184897c363c3b7a"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5983,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4116:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4095:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"},"id":5987,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3736","id":5985,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4125:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_76_by_1","typeString":"int_const 76"},"value":"76"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":5986,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4130:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4125:7:28","typeDescriptions":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"}}],"id":5988,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4124:9:28","typeDescriptions":{"typeIdentifier":"t_rational_12_by_1","typeString":"int_const 12"}},"src":"4095:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4085:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5991,"nodeType":"ExpressionStatement","src":"4085:48:28"},{"expression":{"argumentTypes":null,"id":6000,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5992,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4143:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5999,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5993,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4150:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":5994,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4157:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4150:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5997,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4165:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5996,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4161:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":5998,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4161:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4150:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4143:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6001,"nodeType":"ExpressionStatement","src":"4143:26:28"},{"expression":{"argumentTypes":null,"id":6011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6002,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4179:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6010,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6005,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866666535666532633435383633343335","id":6003,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4189:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18439423715436803125_by_1","typeString":"int_const 18439423715436803125"},"value":"0xffe5fe2c45863435"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6004,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4210:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4189:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"},"id":6008,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3830","id":6006,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4219:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_80_by_1","typeString":"int_const 80"},"value":"80"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4224:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4219:7:28","typeDescriptions":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"}}],"id":6009,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4218:9:28","typeDescriptions":{"typeIdentifier":"t_rational_16_by_1","typeString":"int_const 16"}},"src":"4189:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4179:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6012,"nodeType":"ExpressionStatement","src":"4179:48:28"},{"expression":{"argumentTypes":null,"id":6021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6013,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4237:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6020,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6014,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4244:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6015,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4251:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4244:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6018,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4259:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6017,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4255:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6019,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4255:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4244:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4237:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6022,"nodeType":"ExpressionStatement","src":"4237:26:28"},{"expression":{"argumentTypes":null,"id":6032,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6023,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4273:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6031,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6026,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307862313630313131643265343131666563","id":6024,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4283:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_12781234559505211372_by_1","typeString":"int_const 12781234559505211372"},"value":"0xb160111d2e411fec"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6025,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4304:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4283:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"},"id":6029,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3833","id":6027,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4313:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_83_by_1","typeString":"int_const 83"},"value":"83"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6028,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4318:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4313:7:28","typeDescriptions":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"}}],"id":6030,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4312:9:28","typeDescriptions":{"typeIdentifier":"t_rational_19_by_1","typeString":"int_const 19"}},"src":"4283:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4273:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6033,"nodeType":"ExpressionStatement","src":"4273:48:28"},{"expression":{"argumentTypes":null,"id":6042,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6034,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4331:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6041,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6037,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6035,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4338:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6036,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4345:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4338:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6039,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4353:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6038,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4349:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6040,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4349:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4338:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4331:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6043,"nodeType":"ExpressionStatement","src":"4331:26:28"},{"expression":{"argumentTypes":null,"id":6053,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6044,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4367:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6047,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307864613932396539636166336531656432","id":6045,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4377:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_15749825242660216530_by_1","typeString":"int_const 15749825242660216530"},"value":"0xda929e9caf3e1ed2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6046,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4398:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4377:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"},"id":6050,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3837","id":6048,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4407:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_87_by_1","typeString":"int_const 87"},"value":"87"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6049,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4412:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4407:7:28","typeDescriptions":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"}}],"id":6051,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4406:9:28","typeDescriptions":{"typeIdentifier":"t_rational_23_by_1","typeString":"int_const 23"}},"src":"4377:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4367:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6054,"nodeType":"ExpressionStatement","src":"4367:48:28"},{"expression":{"argumentTypes":null,"id":6063,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6055,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4425:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6062,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6058,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6056,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4432:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6057,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4439:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4432:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6060,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4447:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6059,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4443:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6061,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4443:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4432:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4425:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6064,"nodeType":"ExpressionStatement","src":"4425:26:28"},{"expression":{"argumentTypes":null,"id":6074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6065,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4461:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6073,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866323637613861633563373634666237","id":6066,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4471:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17467115138018856887_by_1","typeString":"int_const 17467115138018856887"},"value":"0xf267a8ac5c764fb7"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6067,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4492:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4471:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"},"id":6071,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3931","id":6069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4501:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_91_by_1","typeString":"int_const 91"},"value":"91"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6070,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4506:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4501:7:28","typeDescriptions":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"}}],"id":6072,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4500:9:28","typeDescriptions":{"typeIdentifier":"t_rational_27_by_1","typeString":"int_const 27"}},"src":"4471:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4461:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6075,"nodeType":"ExpressionStatement","src":"4461:48:28"},{"expression":{"argumentTypes":null,"id":6084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6076,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4519:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6077,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4526:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6078,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4533:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4526:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6081,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4541:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6080,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4537:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6082,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4537:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4526:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4519:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6085,"nodeType":"ExpressionStatement","src":"4519:26:28"},{"expression":{"argumentTypes":null,"id":6095,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6086,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4555:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6094,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6089,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866343635363339613864643932363037","id":6087,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4565:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_17610591433358124551_by_1","typeString":"int_const 17610591433358124551"},"value":"0xf465639a8dd92607"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6088,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4586:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4565:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"},"id":6092,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3935","id":6090,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4595:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_95_by_1","typeString":"int_const 95"},"value":"95"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6091,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4600:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4595:7:28","typeDescriptions":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"}}],"id":6093,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4594:9:28","typeDescriptions":{"typeIdentifier":"t_rational_31_by_1","typeString":"int_const 31"}},"src":"4565:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4555:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6096,"nodeType":"ExpressionStatement","src":"4555:48:28"},{"expression":{"argumentTypes":null,"id":6105,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6097,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4613:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6098,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4620:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6099,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4627:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4620:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6102,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4635:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6101,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4631:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6103,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4620:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4613:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6106,"nodeType":"ExpressionStatement","src":"4613:26:28"},{"expression":{"argumentTypes":null,"id":6116,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6107,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4649:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6115,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6110,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865316465623238376531346332663135","id":6108,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4659:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16275642400033746709_by_1","typeString":"int_const 16275642400033746709"},"value":"0xe1deb287e14c2f15"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6109,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4680:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4659:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"},"id":6113,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"3939","id":6111,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4689:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_99_by_1","typeString":"int_const 99"},"value":"99"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6112,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4694:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4689:7:28","typeDescriptions":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"}}],"id":6114,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4688:9:28","typeDescriptions":{"typeIdentifier":"t_rational_35_by_1","typeString":"int_const 35"}},"src":"4659:38:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4649:48:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6117,"nodeType":"ExpressionStatement","src":"4649:48:28"},{"expression":{"argumentTypes":null,"id":6126,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6118,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4707:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6125,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6119,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4714:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6120,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4721:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4714:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6123,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4729:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6122,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4725:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6124,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4725:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4714:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4707:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6127,"nodeType":"ExpressionStatement","src":"4707:26:28"},{"expression":{"argumentTypes":null,"id":6137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6128,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4743:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6131,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307863306230633938623336383763623134","id":6129,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4753:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_13884819250935745300_by_1","typeString":"int_const 13884819250935745300"},"value":"0xc0b0c98b3687cb14"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6130,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4774:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4753:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"},"id":6134,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313033","id":6132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4783:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_103_by_1","typeString":"int_const 103"},"value":"103"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6133,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4789:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4783:8:28","typeDescriptions":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"}}],"id":6135,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4782:10:28","typeDescriptions":{"typeIdentifier":"t_rational_39_by_1","typeString":"int_const 39"}},"src":"4753:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4743:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6138,"nodeType":"ExpressionStatement","src":"4743:49:28"},{"expression":{"argumentTypes":null,"id":6147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6139,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4802:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6146,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6142,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6140,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4809:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6141,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4816:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4809:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6144,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4824:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6143,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6145,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4809:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4802:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6148,"nodeType":"ExpressionStatement","src":"4802:26:28"},{"expression":{"argumentTypes":null,"id":6158,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6149,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4838:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839386134623236616333633534623966","id":6150,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4848:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_10999112361566358431_by_1","typeString":"int_const 10999112361566358431"},"value":"0x98a4b26ac3c54b9f"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6151,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4869:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4848:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"},"id":6155,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313037","id":6153,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4878:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_107_by_1","typeString":"int_const 107"},"value":"107"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6154,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4884:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4878:8:28","typeDescriptions":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"}}],"id":6156,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4877:10:28","typeDescriptions":{"typeIdentifier":"t_rational_43_by_1","typeString":"int_const 43"}},"src":"4848:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4838:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6159,"nodeType":"ExpressionStatement","src":"4838:49:28"},{"expression":{"argumentTypes":null,"id":6168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6160,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4897:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6163,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6161,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4904:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6162,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"4911:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4904:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6165,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"4919:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6164,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4915:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6166,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4915:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4904:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4897:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6169,"nodeType":"ExpressionStatement","src":"4897:26:28"},{"expression":{"argumentTypes":null,"id":6179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6170,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"4933:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6178,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6173,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307865316237343231643832303130663333","id":6171,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4943:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_16264541273774427955_by_1","typeString":"int_const 16264541273774427955"},"value":"0xe1b7421d82010f33"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6172,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4964:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4943:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"},"id":6176,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313132","id":6174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4973:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_112_by_1","typeString":"int_const 112"},"value":"112"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6175,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4979:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"4973:8:28","typeDescriptions":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"}}],"id":6177,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"4972:10:28","typeDescriptions":{"typeIdentifier":"t_rational_48_by_1","typeString":"int_const 48"}},"src":"4943:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4933:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6180,"nodeType":"ExpressionStatement","src":"4933:49:28"},{"expression":{"argumentTypes":null,"id":6189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6181,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4992:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6188,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6184,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6182,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"4999:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6183,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5006:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4999:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6186,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5014:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6185,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5010:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6187,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5010:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4999:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4992:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6190,"nodeType":"ExpressionStatement","src":"4992:26:28"},{"expression":{"argumentTypes":null,"id":6200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6191,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5028:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6199,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6194,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307839633734346437336366633539633931","id":6192,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5038:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_11273720927017606289_by_1","typeString":"int_const 11273720927017606289"},"value":"0x9c744d73cfc59c91"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6193,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5059:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5038:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"},"id":6197,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313136","id":6195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5068:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_116_by_1","typeString":"int_const 116"},"value":"116"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6196,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5074:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5068:8:28","typeDescriptions":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"}}],"id":6198,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5067:10:28","typeDescriptions":{"typeIdentifier":"t_rational_52_by_1","typeString":"int_const 52"}},"src":"5038:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5028:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6201,"nodeType":"ExpressionStatement","src":"5028:49:28"},{"expression":{"argumentTypes":null,"id":6210,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6202,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5087:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6205,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6203,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5094:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6204,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5101:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5094:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6207,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5109:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6206,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5105:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6208,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5105:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5094:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6211,"nodeType":"ExpressionStatement","src":"5087:26:28"},{"expression":{"argumentTypes":null,"id":6221,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6212,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5123:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6215,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307863633232323561306531326433656162","id":6213,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5133:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_14709360705848295083_by_1","typeString":"int_const 14709360705848295083"},"value":"0xcc2225a0e12d3eab"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6214,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5154:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5133:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"},"id":6218,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313231","id":6216,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5163:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_121_by_1","typeString":"int_const 121"},"value":"121"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6217,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5169:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5163:8:28","typeDescriptions":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"}}],"id":6219,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5162:10:28","typeDescriptions":{"typeIdentifier":"t_rational_57_by_1","typeString":"int_const 57"}},"src":"5133:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5123:49:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6222,"nodeType":"ExpressionStatement","src":"5123:49:28"},{"expression":{"argumentTypes":null,"id":6231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6223,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5182:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6230,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6224,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5189:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6225,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5815,"src":"5196:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5189:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6228,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5204:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6227,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5200:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6229,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5200:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5189:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5182:26:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6232,"nodeType":"ExpressionStatement","src":"5182:26:28"},{"expression":{"argumentTypes":null,"id":6242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6233,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5218:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"307866623862623565646131623461656239","id":6234,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5225:18:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18125781157507542713_by_1","typeString":"int_const 18125781157507542713"},"value":"0xfb8bb5eda1b4aeb9"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6235,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5246:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5225:25:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"},"id":6239,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"313236","id":6237,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5255:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_126_by_1","typeString":"int_const 126"},"value":"126"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6238,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5261:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5255:8:28","typeDescriptions":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"}}],"id":6240,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5254:10:28","typeDescriptions":{"typeIdentifier":"t_rational_62_by_1","typeString":"int_const 62"}},"src":"5225:39:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5218:46:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6243,"nodeType":"ExpressionStatement","src":"5218:46:28"},{"expression":{"argumentTypes":null,"id":6246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6244,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5274:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"id":6245,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5284:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5274:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6247,"nodeType":"ExpressionStatement","src":"5274:14:28"},{"expression":{"argumentTypes":null,"id":6254,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6248,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5298:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6252,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"38","id":6250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5309:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_8_by_1","typeString":"int_const 8"},"value":"8"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6251,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"5313:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5309:7:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6249,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5305:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6253,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5305:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5298:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6255,"nodeType":"ExpressionStatement","src":"5298:19:28"},{"expression":{"argumentTypes":null,"id":6258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6256,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5328:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"hexValue":"3634","id":6257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5337:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"5328:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6259,"nodeType":"ExpressionStatement","src":"5328:11:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6260,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5353:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6261,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5362:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5353:10:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6323,"nodeType":"IfStatement","src":"5349:431:28","trueBody":{"id":6322,"nodeType":"Block","src":"5365:415:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6263,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5383:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"323536","id":6264,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5394:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6265,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5398:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5394:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6267,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5393:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5383:21:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6269,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5408:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5383:26:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6313,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6311,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6309,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5750:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6310,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5753:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5750:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6312,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5757:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5750:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}},{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6318,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6316,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6314,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5760:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6315,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5763:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5760:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6317,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5767:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5760:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}}],"id":6319,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"5749:20:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_$_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_$","typeString":"tuple(int_const 1157...(70 digits omitted)...9935,int_const 1157...(70 digits omitted)...9935)"}},"functionReturnParameters":5795,"id":6320,"nodeType":"Return","src":"5742:27:28"},"id":6321,"nodeType":"IfStatement","src":"5379:390:28","trueBody":{"id":6308,"nodeType":"Block","src":"5411:297:28","statements":[{"expression":{"argumentTypes":null,"id":6277,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6271,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5429:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6273,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5442:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6272,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5437:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6274,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5437:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"id":6275,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5453:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5437:21:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5429:29:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6278,"nodeType":"ExpressionStatement","src":"5429:29:28"},{"expression":{"argumentTypes":null,"id":6281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6279,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5476:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"<<=","rightHandSide":{"argumentTypes":null,"id":6280,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5485:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5476:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6282,"nodeType":"ExpressionStatement","src":"5476:14:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6289,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6287,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6283,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5535:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6285,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5548:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6284,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5543:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5543:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5535:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":6288,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5557:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5535:27:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6304,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6298,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5653:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"},"id":6303,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"},"id":6301,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6299,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5661:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323536","id":6300,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5664:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_256_by_1","typeString":"int_const 256"},"value":"256"},"src":"5661:6:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1","typeString":"int_const 1157...(70 digits omitted)...9936"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6302,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5668:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5661:8:28","typeDescriptions":{"typeIdentifier":"t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1","typeString":"int_const 1157...(70 digits omitted)...9935"}},"src":"5653:16:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6305,"nodeType":"ExpressionStatement","src":"5653:16:28"},"id":6306,"nodeType":"IfStatement","src":"5531:138:28","trueBody":{"expression":{"argumentTypes":null,"id":6296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6290,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5584:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6291,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5592:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6293,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5605:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6292,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5600:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6294,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5600:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5592:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5584:26:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6297,"nodeType":"ExpressionStatement","src":"5584:26:28"}},{"expression":null,"functionReturnParameters":5795,"id":6307,"nodeType":"Return","src":"5687:7:28"}]}}]}},{"expression":{"argumentTypes":null,"id":6333,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6324,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5789:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6332,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6329,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6325,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5797:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6327,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5806:6:28","subExpression":{"argumentTypes":null,"id":6326,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5807:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6328,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5805:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5797:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6330,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5796:18:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6331,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5817:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5796:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5789:29:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6334,"nodeType":"ExpressionStatement","src":"5789:29:28"},{"expression":{"argumentTypes":null,"id":6343,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6335,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5828:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6342,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6337,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5870,"src":"5841:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6336,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5836:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5836:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5853:6:28","subExpression":{"argumentTypes":null,"id":6339,"name":"shift","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5812,"src":"5854:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6341,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5852:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5836:24:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5828:32:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6344,"nodeType":"ExpressionStatement","src":"5828:32:28"},{"expression":{"argumentTypes":null,"id":6351,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6345,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5794,"src":"5870:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6350,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6346,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5792,"src":"5878:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6348,"name":"zpow","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5878,"src":"5891:4:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6347,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5886:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6349,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5886:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5878:18:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5870:26:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6352,"nodeType":"ExpressionStatement","src":"5870:26:28"},{"expression":null,"functionReturnParameters":5795,"id":6353,"nodeType":"Return","src":"5906:7:28"}]},"documentation":"@dev Returns bounds for value of 2**x given x\n @param x exponent in fixed point\n @return {\n \"lower\": \"lower bound of 2**x in fixed point\",\n \"upper\": \"upper bound of 2**x in fixed point\"\n }","id":6355,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"pow2Bounds","nodeType":"FunctionDefinition","parameters":{"id":5790,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5789,"name":"x","nodeType":"VariableDeclaration","scope":6355,"src":"2246:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5788,"name":"int","nodeType":"ElementaryTypeName","src":"2246:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2245:7:28"},"payable":false,"returnParameters":{"id":5795,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5792,"name":"lower","nodeType":"VariableDeclaration","scope":6355,"src":"2298:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5791,"name":"uint","nodeType":"ElementaryTypeName","src":"2298:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5794,"name":"upper","nodeType":"VariableDeclaration","scope":6355,"src":"2310:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5793,"name":"uint","nodeType":"ElementaryTypeName","src":"2310:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2297:24:28"},"scope":6668,"src":"2226:3693:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6388,"nodeType":"Block","src":"6096:126:28","statements":[{"assignments":[6363,6365],"declarations":[{"constant":false,"id":6363,"name":"lower","nodeType":"VariableDeclaration","scope":6389,"src":"6107:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6362,"name":"int","nodeType":"ElementaryTypeName","src":"6107:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6365,"name":"upper","nodeType":"VariableDeclaration","scope":6389,"src":"6118:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6364,"name":"int","nodeType":"ElementaryTypeName","src":"6118:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6369,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6367,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6357,"src":"6142:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6366,"name":"log2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6544,"src":"6131:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$_t_int256_$","typeString":"function (uint256) pure returns (int256,int256)"}},"id":6368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6131:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"6106:38:28"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6386,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6382,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6377,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6370,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6365,"src":"6163:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6371,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6363,"src":"6171:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6163:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6373,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6162:15:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":6374,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6180:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"6162:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6376,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6363,"src":"6184:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6162:27:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6378,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6161:29:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6380,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"6197:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6379,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6193:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6381,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6193:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6161:40:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6384,"name":"LOG2_E","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5689,"src":"6208:6:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6383,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"6204:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6385,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6204:11:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6161:54:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6361,"id":6387,"nodeType":"Return","src":"6154:61:28"}]},"documentation":"@dev Returns natural logarithm value of given x\n @param x x\n @return ln(x)","id":6389,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"ln","nodeType":"FunctionDefinition","parameters":{"id":6358,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6357,"name":"x","nodeType":"VariableDeclaration","scope":6389,"src":"6034:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6356,"name":"uint","nodeType":"ElementaryTypeName","src":"6034:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6033:8:28"},"payable":false,"returnParameters":{"id":6361,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6360,"name":"","nodeType":"VariableDeclaration","scope":6389,"src":"6087:3:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6359,"name":"int","nodeType":"ElementaryTypeName","src":"6087:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"6086:5:28"},"scope":6668,"src":"6022:200:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6440,"nodeType":"Block","src":"6591:375:28","statements":[{"assignments":[6399,6401],"declarations":[{"constant":false,"id":6399,"name":"lower","nodeType":"VariableDeclaration","scope":6441,"src":"6602:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6398,"name":"int","nodeType":"ElementaryTypeName","src":"6602:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6401,"name":"upper","nodeType":"VariableDeclaration","scope":6441,"src":"6613:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6400,"name":"int","nodeType":"ElementaryTypeName","src":"6613:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6405,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6403,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6391,"src":"6637:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6402,"name":"log2Bounds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6544,"src":"6626:10:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$_t_int256_$","typeString":"function (uint256) pure returns (int256,int256)"}},"id":6404,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6626:13:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"nodeType":"VariableDeclarationStatement","src":"6601:38:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6409,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6406,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6652:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6407,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6670:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6408,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"LowerBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6670:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6652:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6413,"nodeType":"IfStatement","src":"6649:85:28","trueBody":{"id":6412,"nodeType":"Block","src":"6697:37:28","statements":[{"expression":{"argumentTypes":null,"id":6410,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6718:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6411,"nodeType":"Return","src":"6711:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6417,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6414,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6746:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6415,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6764:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6416,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"UpperBound","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6764:25:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6746:43:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6421,"nodeType":"IfStatement","src":"6743:85:28","trueBody":{"id":6420,"nodeType":"Block","src":"6791:37:28","statements":[{"expression":{"argumentTypes":null,"id":6418,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6401,"src":"6812:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6419,"nodeType":"Return","src":"6805:12:28"}]}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"id":6425,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6422,"name":"estimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6393,"src":"6840:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6423,"name":"EstimationMode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5680,"src":"6858:14:28","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_EstimationMode_$5680_$","typeString":"type(enum Fixed192x64Math.EstimationMode)"}},"id":6424,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"Midpoint","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6858:23:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"src":"6840:41:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6436,"nodeType":"IfStatement","src":"6837:105:28","trueBody":{"id":6435,"nodeType":"Block","src":"6883:59:28","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6426,"name":"upper","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6401,"src":"6905:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":6427,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6913:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6905:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6429,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"6904:15:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":6430,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6922:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"6904:19:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6432,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6399,"src":"6926:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"6904:27:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":6397,"id":6434,"nodeType":"Return","src":"6897:34:28"}]}},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":6437,"name":"revert","nodeType":"Identifier","overloadedDeclarations":[7627,7628],"referencedDeclaration":7627,"src":"6951:6:28","typeDescriptions":{"typeIdentifier":"t_function_revert_pure$__$returns$__$","typeString":"function () pure"}},"id":6438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6951:8:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6439,"nodeType":"ExpressionStatement","src":"6951:8:28"}]},"documentation":"@dev Returns estimate of binaryLog(x) given x\n @param x logarithm argument in fixed point\n @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n @return estimate of binaryLog(x) in fixed point","id":6441,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"binaryLog","nodeType":"FunctionDefinition","parameters":{"id":6394,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6391,"name":"x","nodeType":"VariableDeclaration","scope":6441,"src":"6498:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6390,"name":"uint","nodeType":"ElementaryTypeName","src":"6498:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6393,"name":"estimationMode","nodeType":"VariableDeclaration","scope":6441,"src":"6506:29:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"},"typeName":{"contractScope":null,"id":6392,"name":"EstimationMode","nodeType":"UserDefinedTypeName","referencedDeclaration":5680,"src":"6506:14:28","typeDescriptions":{"typeIdentifier":"t_enum$_EstimationMode_$5680","typeString":"enum Fixed192x64Math.EstimationMode"}},"value":null,"visibility":"internal"}],"src":"6497:39:28"},"payable":false,"returnParameters":{"id":6397,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6396,"name":"","nodeType":"VariableDeclaration","scope":6441,"src":"6582:3:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6395,"name":"int","nodeType":"ElementaryTypeName","src":"6582:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"6581:5:28"},"scope":6668,"src":"6479:487:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6543,"nodeType":"Block","src":"7341:645:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6453,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6451,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7359:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6452,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7363:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"7359:5:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6450,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"7351:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7351:14:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6455,"nodeType":"ExpressionStatement","src":"7351:14:28"},{"expression":{"argumentTypes":null,"id":6460,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6456,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7408:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6458,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7426:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6457,"name":"floorLog2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6620,"src":"7416:9:28","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$returns$_t_int256_$","typeString":"function (uint256) pure returns (int256)"}},"id":6459,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7416:12:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7408:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6461,"nodeType":"ExpressionStatement","src":"7408:20:28"},{"assignments":[],"declarations":[{"constant":false,"id":6463,"name":"y","nodeType":"VariableDeclaration","scope":6544,"src":"7439:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6462,"name":"uint","nodeType":"ElementaryTypeName","src":"7439:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":6464,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"7439:6:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6467,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6465,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7459:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6466,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7467:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"7459:9:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6483,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6477,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7530:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6482,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6478,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7534:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6480,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7544:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6479,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7539:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6481,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7539:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7534:16:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7530:20:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6484,"nodeType":"ExpressionStatement","src":"7530:20:28"},"id":6485,"nodeType":"IfStatement","src":"7455:95:28","trueBody":{"expression":{"argumentTypes":null,"id":6475,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6468,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7482:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6469,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6443,"src":"7486:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6472,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"7496:6:28","subExpression":{"argumentTypes":null,"id":6471,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7497:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6470,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7491:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7491:12:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7486:17:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7482:21:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6476,"nodeType":"ExpressionStatement","src":"7482:21:28"}},{"expression":{"argumentTypes":null,"id":6490,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6486,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7561:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"*=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6488,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7574:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6487,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7570:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6489,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7570:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7561:17:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6491,"nodeType":"ExpressionStatement","src":"7561:17:28"},{"body":{"id":6535,"nodeType":"Block","src":"7731:213:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6504,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6502,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7748:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":6503,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7753:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7748:8:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6507,"nodeType":"IfStatement","src":"7745:51:28","trueBody":{"id":6506,"nodeType":"Block","src":"7758:38:28","statements":[{"id":6505,"nodeType":"Break","src":"7776:5:28"}]}},{"expression":{"argumentTypes":null,"id":6514,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6508,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7809:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6513,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6509,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7813:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6510,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7817:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7813:5:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":6512,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7821:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7813:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7809:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6515,"nodeType":"ExpressionStatement","src":"7809:15:28"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6520,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6516,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7841:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6519,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":6517,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7846:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6518,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7850:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7846:7:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"7841:12:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6534,"nodeType":"IfStatement","src":"7838:96:28","trueBody":{"id":6533,"nodeType":"Block","src":"7855:79:28","statements":[{"expression":{"argumentTypes":null,"id":6527,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6521,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7873:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6525,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6523,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"7886:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"id":6524,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7893:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7886:8:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6522,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"7882:3:28","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":6526,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7882:13:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"7873:22:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6528,"nodeType":"ExpressionStatement","src":"7873:22:28"},{"expression":{"argumentTypes":null,"id":6531,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6529,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6463,"src":"7913:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"/=","rightHandSide":{"argumentTypes":null,"hexValue":"32","id":6530,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7918:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"7913:6:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6532,"nodeType":"ExpressionStatement","src":"7913:6:28"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6498,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6496,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7717:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"3634","id":6497,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7722:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"src":"7717:7:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6536,"initializationExpression":{"assignments":[6493],"declarations":[{"constant":false,"id":6493,"name":"m","nodeType":"VariableDeclaration","scope":6544,"src":"7706:5:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6492,"name":"int","nodeType":"ElementaryTypeName","src":"7706:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6495,"initialValue":{"argumentTypes":null,"hexValue":"31","id":6494,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7714:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"7706:9:28"},"loopExpression":{"expression":{"argumentTypes":null,"id":6500,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"7726:3:28","subExpression":{"argumentTypes":null,"id":6499,"name":"m","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6493,"src":"7726:1:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6501,"nodeType":"ExpressionStatement","src":"7726:3:28"},"nodeType":"ForStatement","src":"7701:243:28"},{"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":6537,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7962:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6538,"name":"lower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6446,"src":"7969:5:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"34","id":6539,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"7977:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"7969:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6541,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"7961:18:28","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$","typeString":"tuple(int256,int256)"}},"functionReturnParameters":6449,"id":6542,"nodeType":"Return","src":"7954:25:28"}]},"documentation":"@dev Returns bounds for value of binaryLog(x) given x\n @param x logarithm argument in fixed point\n @return {\n \"lower\": \"lower bound of binaryLog(x) in fixed point\",\n \"upper\": \"upper bound of binaryLog(x) in fixed point\"\n }","id":6544,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"log2Bounds","nodeType":"FunctionDefinition","parameters":{"id":6444,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6443,"name":"x","nodeType":"VariableDeclaration","scope":6544,"src":"7262:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6442,"name":"uint","nodeType":"ElementaryTypeName","src":"7262:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"7261:8:28"},"payable":false,"returnParameters":{"id":6449,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6446,"name":"lower","nodeType":"VariableDeclaration","scope":6544,"src":"7315:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6445,"name":"int","nodeType":"ElementaryTypeName","src":"7315:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6448,"name":"upper","nodeType":"VariableDeclaration","scope":6544,"src":"7326:9:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6447,"name":"int","nodeType":"ElementaryTypeName","src":"7326:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7314:22:28"},"scope":6668,"src":"7242:744:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6619,"nodeType":"Block","src":"8184:404:28","statements":[{"expression":{"argumentTypes":null,"id":6554,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6551,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8194:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6553,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8199:3:28","subExpression":{"argumentTypes":null,"hexValue":"3634","id":6552,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8200:2:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_64_by_1","typeString":"int_const 64"},"value":"64"},"typeDescriptions":{"typeIdentifier":"t_rational_-64_by_1","typeString":"int_const -64"}},"src":"8194:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6555,"nodeType":"ExpressionStatement","src":"8194:8:28"},{"assignments":[6557],"declarations":[{"constant":false,"id":6557,"name":"hi","nodeType":"VariableDeclaration","scope":6620,"src":"8212:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6556,"name":"int","nodeType":"ElementaryTypeName","src":"8212:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6559,"initialValue":{"argumentTypes":null,"hexValue":"313933","id":6558,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8221:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_193_by_1","typeString":"int_const 193"},"value":"193"},"nodeType":"VariableDeclarationStatement","src":"8212:12:28"},{"assignments":[6561],"declarations":[{"constant":false,"id":6561,"name":"mid","nodeType":"VariableDeclaration","scope":6620,"src":"8327:7:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6560,"name":"int","nodeType":"ElementaryTypeName","src":"8327:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":6568,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6567,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6564,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6562,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8338:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6563,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8343:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8338:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6565,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8337:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6566,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8350:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8337:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"VariableDeclarationStatement","src":"8327:24:28"},{"body":{"id":6617,"nodeType":"Block","src":"8382:200:28","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6598,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6577,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6575,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8400:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6576,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8406:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8400:7:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6585,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6583,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6578,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6546,"src":"8411:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6581,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8421:4:28","subExpression":{"argumentTypes":null,"id":6580,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8422:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8416:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6582,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8416:10:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8411:15:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6584,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"8429:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8411:21:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8400:32:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":6597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6589,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6587,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8436:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6588,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8443:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8436:8:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6596,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6594,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6590,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6546,"src":"8448:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":6592,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8458:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":6591,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8453:4:28","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":6593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8453:9:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8448:14:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6595,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5683,"src":"8465:3:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8448:20:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8436:32:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8400:68:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":6605,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6603,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8529:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6604,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8534:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8529:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6606,"nodeType":"ExpressionStatement","src":"8529:8:28"},"id":6607,"nodeType":"IfStatement","src":"8396:141:28","trueBody":{"expression":{"argumentTypes":null,"id":6601,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6599,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8486:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6600,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8491:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8486:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6602,"nodeType":"ExpressionStatement","src":"8486:8:28"}},{"expression":{"argumentTypes":null,"id":6615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6608,"name":"mid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6561,"src":"8551:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6611,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6609,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8558:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":6610,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8563:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8558:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6612,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8557:9:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6613,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8570:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8557:14:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8551:20:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6616,"nodeType":"ExpressionStatement","src":"8551:20:28"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6569,"name":"lo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6549,"src":"8368:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":6570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8373:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8368:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":6572,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8367:8:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":6573,"name":"hi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6557,"src":"8378:2:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8367:13:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6618,"nodeType":"WhileStatement","src":"8361:221:28"}]},"documentation":"@dev Returns base 2 logarithm value of given x\n @param x x\n @return logarithmic value","id":6620,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"floorLog2","nodeType":"FunctionDefinition","parameters":{"id":6547,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6546,"name":"x","nodeType":"VariableDeclaration","scope":6620,"src":"8119:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6545,"name":"uint","nodeType":"ElementaryTypeName","src":"8119:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8118:8:28"},"payable":false,"returnParameters":{"id":6550,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6549,"name":"lo","nodeType":"VariableDeclaration","scope":6620,"src":"8172:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6548,"name":"int","nodeType":"ElementaryTypeName","src":"8172:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8171:8:28"},"scope":6668,"src":"8100:488:28","stateMutability":"pure","superFunction":null,"visibility":"public"},{"body":{"id":6666,"nodeType":"Block","src":"8796:182:28","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6629,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8814:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8814:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6631,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8828:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8814:15:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6628,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8806:7:28","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8806:24:28","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6634,"nodeType":"ExpressionStatement","src":"8806:24:28"},{"expression":{"argumentTypes":null,"id":6640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6635,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8840:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_rational_-57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1","typeString":"int_const -578...(70 digits omitted)...9968"},"id":6639,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6637,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8849:2:28","subExpression":{"argumentTypes":null,"hexValue":"32","id":6636,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8850:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"typeDescriptions":{"typeIdentifier":"t_rational_-2_by_1","typeString":"int_const -2"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"argumentTypes":null,"hexValue":"323535","id":6638,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8853:3:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_255_by_1","typeString":"int_const 255"},"value":"255"},"src":"8849:7:28","typeDescriptions":{"typeIdentifier":"t_rational_-57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1","typeString":"int_const -578...(70 digits omitted)...9968"}},"src":"8840:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6641,"nodeType":"ExpressionStatement","src":"8840:16:28"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":6657,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":6653,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8921:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6655,"indexExpression":{"argumentTypes":null,"id":6654,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8926:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8921:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":6656,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8931:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8921:16:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6664,"nodeType":"IfStatement","src":"8917:54:28","trueBody":{"expression":{"argumentTypes":null,"id":6662,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6658,"name":"maxNum","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6626,"src":"8955:6:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":6659,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8964:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6661,"indexExpression":{"argumentTypes":null,"id":6660,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8969:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8964:7:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8955:16:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6663,"nodeType":"ExpressionStatement","src":"8955:16:28"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6649,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8883:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":6647,"name":"nums","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6623,"src":"8887:4:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":6648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8887:11:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8883:15:28","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":6665,"initializationExpression":{"assignments":[6643],"declarations":[{"constant":false,"id":6643,"name":"i","nodeType":"VariableDeclaration","scope":6667,"src":"8871:6:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6642,"name":"uint","nodeType":"ElementaryTypeName","src":"8871:4:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":6645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":6644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8880:1:28","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"8871:10:28"},"loopExpression":{"expression":{"argumentTypes":null,"id":6651,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"8900:3:28","subExpression":{"argumentTypes":null,"id":6650,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6643,"src":"8900:1:28","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6652,"nodeType":"ExpressionStatement","src":"8900:3:28"},"nodeType":"ForStatement","src":"8866:105:28"}]},"documentation":"@dev Returns maximum of an array\n @param nums Numbers to look through\n @return Maximum number","id":6667,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"max","nodeType":"FunctionDefinition","parameters":{"id":6624,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6623,"name":"nums","nodeType":"VariableDeclaration","scope":6667,"src":"8723:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":6621,"name":"int","nodeType":"ElementaryTypeName","src":"8723:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":6622,"length":null,"nodeType":"ArrayTypeName","src":"8723:5:28","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"src":"8722:12:28"},"payable":false,"returnParameters":{"id":6627,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6626,"name":"maxNum","nodeType":"VariableDeclaration","scope":6667,"src":"8780:10:28","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6625,"name":"int","nodeType":"ElementaryTypeName","src":"8780:3:28","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8779:12:28"},"scope":6668,"src":"8710:268:28","stateMutability":"pure","superFunction":null,"visibility":"public"}],"scope":6669,"src":"213:8767:28"}],"src":"0:8981:28"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0x11c59b10ebe450cf403e1a07255da5cd2aef2084","transactionHash":"0xb48594ae3ae78f626d260421db309789e00fd9859da95cd4188a13ba3685ba5f"},"3":{"address":"0x265e6694f83fbcfd037be0126fbafc0fcfd5b181","transactionHash":"0x0c334caea3e2c383c7a54d9fd38c06f65ae46d788c216b47ddecdc24019901d9"},"4":{"address":"0xce036308718c3f704cb6cc492fa405c6d811d627","transactionHash":"0x479b0a6513e1849a8f8e3ad0a37018c360dbef7244ffa5d0b9044394e6fa0b1f"},"42":{"address":"0x09d7ffa61ad04acb47b27043335018a92e539b2c","transactionHash":"0x23cad8e3fa64cd28d4e8e84cf6c2f1859804a3b86ba598d39c028ac794670c03"},"437894314312":{"address":"0x5b1869d9a4c187f2eaa108f3062412ecf0526b24","transactionHash":"0xcaf343745b00f928539b699c58681a6841a2f14b856bdc552ce76abbbbe85cc3"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:42.561Z"}; /***/ }), @@ -352,10 +571,10 @@ module.exports = {"contract_name":"Math","abi":[{"constant":true,"inputs":[],"na /*!******************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Migrations.json ***! \******************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"Migrations","abi":[{"constant":false,"inputs":[{"name":"new_address","type":"address"}],"name":"upgrade","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"last_completed_migration","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"completed","type":"uint256"}],"name":"setCompleted","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"}],"networks":{"3":{"updated_at":1503605014193},"4":{"updated_at":1503603856239},"42":{"updated_at":1503602339891},"437894314312":{"updated_at":1507361155414}},"schema_version":"0.0.5","updated_at":1543915159048}; +module.exports = {"contractName":"Migrations","abi":[{"constant":true,"inputs":[],"name":"last_completed_migration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":false,"inputs":[{"name":"completed","type":"uint256"}],"name":"setCompleted","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"new_address","type":"address"}],"name":"upgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102f8806100606000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100aa5780638da5cb5b146100d5578063fdacd5761461012c575b600080fd5b34801561007357600080fd5b506100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610159565b005b3480156100b657600080fd5b506100bf610241565b6040518082815260200191505060405180910390f35b3480156100e157600080fd5b506100ea610247565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013857600080fd5b506101576004803603810190808035906020019092919050505061026c565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023d578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561022457600080fd5b505af1158015610238573d6000803e3d6000fd5b505050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102c957806001819055505b505600a165627a7a72305820973fbf39dc0efd8d9e68418b88eb7ff9cb22b376dc6de2a6b739354d57bf6bc20029","deployedBytecode":"0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100aa5780638da5cb5b146100d5578063fdacd5761461012c575b600080fd5b34801561007357600080fd5b506100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610159565b005b3480156100b657600080fd5b506100bf610241565b6040518082815260200191505060405180910390f35b3480156100e157600080fd5b506100ea610247565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013857600080fd5b506101576004803603810190808035906020019092919050505061026c565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023d578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561022457600080fd5b505af1158015610238573d6000803e3d6000fd5b505050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102c957806001819055505b505600a165627a7a72305820973fbf39dc0efd8d9e68418b88eb7ff9cb22b376dc6de2a6b739354d57bf6bc20029","sourceMap":"143:520:0:-;;;309:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;309:56:0;348:10;340:5;;:18;;;;;;;;;;;;;;;;;;143:520;;;;;;","deployedSourceMap":"143:520:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;486:175;;8:9:-1;5:2;;;30:1;27;20:12;5:2;486:175:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;195:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;195:36:0;;;;;;;;;;;;;;;;;;;;;;;169:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;169:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;371:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;371:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;486:175;552:19;288:5;;;;;;;;;;;274:19;;:10;:19;;;270:26;;;585:11;552:45;;607:8;:21;;;629:24;;607:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;607:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;607:47:0;;;;270:26;486:175;;:::o;195:36::-;;;;:::o;169:20::-;;;;;;;;;;;;;:::o;371:109::-;288:5;;;;;;;;;;;274:19;;:10;:19;;;270:26;;;464:9;437:24;:36;;;;270:26;371:109;:::o","source":"pragma solidity ^0.4.24;\nimport \"canonical-weth/contracts/WETH9.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol\";\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Migrations.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Migrations.sol","exportedSymbols":{"Migrations":[58]},"id":59,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:0"},{"absolutePath":"canonical-weth/contracts/WETH9.sol","file":"canonical-weth/contracts/WETH9.sol","id":2,"nodeType":"ImportDirective","scope":59,"sourceUnit":305,"src":"25:44:0","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","id":3,"nodeType":"ImportDirective","scope":59,"sourceUnit":339,"src":"70:71:0","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":58,"linearizedBaseContracts":[58],"name":"Migrations","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":5,"name":"owner","nodeType":"VariableDeclaration","scope":58,"src":"169:20:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4,"name":"address","nodeType":"ElementaryTypeName","src":"169:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":7,"name":"last_completed_migration","nodeType":"VariableDeclaration","scope":58,"src":"195:36:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint","nodeType":"ElementaryTypeName","src":"195:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"body":{"id":15,"nodeType":"Block","src":"260:43:0","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":12,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":9,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"274:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":10,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"274:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":11,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5,"src":"288:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"274:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":14,"nodeType":"IfStatement","src":"270:26:0","trueBody":{"id":13,"nodeType":"PlaceholderStatement","src":"295:1:0"}}]},"documentation":null,"id":16,"name":"restricted","nodeType":"ModifierDefinition","parameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"257:2:0"},"src":"238:65:0","visibility":"internal"},{"body":{"id":24,"nodeType":"Block","src":"330:35:0","statements":[{"expression":{"argumentTypes":null,"id":22,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":19,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5,"src":"340:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":20,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"348:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":21,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"348:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"340:18:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":23,"nodeType":"ExpressionStatement","src":"340:18:0"}]},"documentation":null,"id":25,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":17,"nodeType":"ParameterList","parameters":[],"src":"320:2:0"},"payable":false,"returnParameters":{"id":18,"nodeType":"ParameterList","parameters":[],"src":"330:0:0"},"scope":58,"src":"309:56:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":36,"nodeType":"Block","src":"427:53:0","statements":[{"expression":{"argumentTypes":null,"id":34,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":32,"name":"last_completed_migration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"437:24:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":33,"name":"completed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":27,"src":"464:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"437:36:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":35,"nodeType":"ExpressionStatement","src":"437:36:0"}]},"documentation":null,"id":37,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":30,"modifierName":{"argumentTypes":null,"id":29,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"416:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"416:10:0"}],"name":"setCompleted","nodeType":"FunctionDefinition","parameters":{"id":28,"nodeType":"ParameterList","parameters":[{"constant":false,"id":27,"name":"completed","nodeType":"VariableDeclaration","scope":37,"src":"393:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":26,"name":"uint","nodeType":"ElementaryTypeName","src":"393:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"392:16:0"},"payable":false,"returnParameters":{"id":31,"nodeType":"ParameterList","parameters":[],"src":"427:0:0"},"scope":58,"src":"371:109:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":56,"nodeType":"Block","src":"542:119:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"name":"upgraded","nodeType":"VariableDeclaration","scope":57,"src":"552:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Migrations_$58","typeString":"contract Migrations"},"typeName":{"contractScope":null,"id":44,"name":"Migrations","nodeType":"UserDefinedTypeName","referencedDeclaration":58,"src":"552:10:0","typeDescriptions":{"typeIdentifier":"t_contract$_Migrations_$58","typeString":"contract Migrations"}},"value":null,"visibility":"internal"}],"id":49,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":47,"name":"new_address","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":39,"src":"585:11:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":46,"name":"Migrations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":58,"src":"574:10:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Migrations_$58_$","typeString":"type(contract Migrations)"}},"id":48,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"574:23:0","typeDescriptions":{"typeIdentifier":"t_contract$_Migrations_$58","typeString":"contract Migrations"}},"nodeType":"VariableDeclarationStatement","src":"552:45:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":53,"name":"last_completed_migration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"629:24:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":50,"name":"upgraded","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"607:8:0","typeDescriptions":{"typeIdentifier":"t_contract$_Migrations_$58","typeString":"contract Migrations"}},"id":52,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"setCompleted","nodeType":"MemberAccess","referencedDeclaration":37,"src":"607:21:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":54,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"607:47:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":55,"nodeType":"ExpressionStatement","src":"607:47:0"}]},"documentation":null,"id":57,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":42,"modifierName":{"argumentTypes":null,"id":41,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"531:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"531:10:0"}],"name":"upgrade","nodeType":"FunctionDefinition","parameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"name":"new_address","nodeType":"VariableDeclaration","scope":57,"src":"503:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":38,"name":"address","nodeType":"ElementaryTypeName","src":"503:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"502:21:0"},"payable":false,"returnParameters":{"id":43,"nodeType":"ParameterList","parameters":[],"src":"542:0:0"},"scope":58,"src":"486:175:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":59,"src":"143:520:0"}],"src":"0:664:0"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Migrations.sol","exportedSymbols":{"Migrations":[58]},"id":59,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:0"},{"absolutePath":"canonical-weth/contracts/WETH9.sol","file":"canonical-weth/contracts/WETH9.sol","id":2,"nodeType":"ImportDirective","scope":59,"sourceUnit":305,"src":"25:44:0","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol","id":3,"nodeType":"ImportDirective","scope":59,"sourceUnit":339,"src":"70:71:0","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":58,"linearizedBaseContracts":[58],"name":"Migrations","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":5,"name":"owner","nodeType":"VariableDeclaration","scope":58,"src":"169:20:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4,"name":"address","nodeType":"ElementaryTypeName","src":"169:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":7,"name":"last_completed_migration","nodeType":"VariableDeclaration","scope":58,"src":"195:36:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint","nodeType":"ElementaryTypeName","src":"195:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"body":{"id":15,"nodeType":"Block","src":"260:43:0","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":12,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":9,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"274:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":10,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"274:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":11,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5,"src":"288:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"274:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":14,"nodeType":"IfStatement","src":"270:26:0","trueBody":{"id":13,"nodeType":"PlaceholderStatement","src":"295:1:0"}}]},"documentation":null,"id":16,"name":"restricted","nodeType":"ModifierDefinition","parameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"257:2:0"},"src":"238:65:0","visibility":"internal"},{"body":{"id":24,"nodeType":"Block","src":"330:35:0","statements":[{"expression":{"argumentTypes":null,"id":22,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":19,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5,"src":"340:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":20,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"348:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":21,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"348:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"340:18:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":23,"nodeType":"ExpressionStatement","src":"340:18:0"}]},"documentation":null,"id":25,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":17,"nodeType":"ParameterList","parameters":[],"src":"320:2:0"},"payable":false,"returnParameters":{"id":18,"nodeType":"ParameterList","parameters":[],"src":"330:0:0"},"scope":58,"src":"309:56:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":36,"nodeType":"Block","src":"427:53:0","statements":[{"expression":{"argumentTypes":null,"id":34,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":32,"name":"last_completed_migration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"437:24:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":33,"name":"completed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":27,"src":"464:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"437:36:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":35,"nodeType":"ExpressionStatement","src":"437:36:0"}]},"documentation":null,"id":37,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":30,"modifierName":{"argumentTypes":null,"id":29,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"416:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"416:10:0"}],"name":"setCompleted","nodeType":"FunctionDefinition","parameters":{"id":28,"nodeType":"ParameterList","parameters":[{"constant":false,"id":27,"name":"completed","nodeType":"VariableDeclaration","scope":37,"src":"393:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":26,"name":"uint","nodeType":"ElementaryTypeName","src":"393:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"392:16:0"},"payable":false,"returnParameters":{"id":31,"nodeType":"ParameterList","parameters":[],"src":"427:0:0"},"scope":58,"src":"371:109:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":56,"nodeType":"Block","src":"542:119:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"name":"upgraded","nodeType":"VariableDeclaration","scope":57,"src":"552:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Migrations_$58","typeString":"contract Migrations"},"typeName":{"contractScope":null,"id":44,"name":"Migrations","nodeType":"UserDefinedTypeName","referencedDeclaration":58,"src":"552:10:0","typeDescriptions":{"typeIdentifier":"t_contract$_Migrations_$58","typeString":"contract Migrations"}},"value":null,"visibility":"internal"}],"id":49,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":47,"name":"new_address","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":39,"src":"585:11:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":46,"name":"Migrations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":58,"src":"574:10:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Migrations_$58_$","typeString":"type(contract Migrations)"}},"id":48,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"574:23:0","typeDescriptions":{"typeIdentifier":"t_contract$_Migrations_$58","typeString":"contract Migrations"}},"nodeType":"VariableDeclarationStatement","src":"552:45:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":53,"name":"last_completed_migration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"629:24:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":50,"name":"upgraded","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"607:8:0","typeDescriptions":{"typeIdentifier":"t_contract$_Migrations_$58","typeString":"contract Migrations"}},"id":52,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"setCompleted","nodeType":"MemberAccess","referencedDeclaration":37,"src":"607:21:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":54,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"607:47:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":55,"nodeType":"ExpressionStatement","src":"607:47:0"}]},"documentation":null,"id":57,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":42,"modifierName":{"argumentTypes":null,"id":41,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"531:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"531:10:0"}],"name":"upgrade","nodeType":"FunctionDefinition","parameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"name":"new_address","nodeType":"VariableDeclaration","scope":57,"src":"503:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":38,"name":"address","nodeType":"ElementaryTypeName","src":"503:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"502:21:0"},"payable":false,"returnParameters":{"id":43,"nodeType":"ParameterList","parameters":[],"src":"542:0:0"},"scope":58,"src":"486:175:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":59,"src":"143:520:0"}],"src":"0:664:0"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-29T15:25:24.150Z"}; /***/ }), @@ -363,10 +582,10 @@ module.exports = {"contract_name":"Migrations","abi":[{"constant":false,"inputs" /*!**************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Oracle.json ***! \**************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"Oracle","abi":[{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263311}; +module.exports = {"contractName":"Oracle","abi":[{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n/// @title Abstract oracle contract - Functions to be implemented by oracles\ncontract Oracle {\n\n function isOutcomeSet() public view returns (bool);\n function getOutcome() public view returns (int);\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","exportedSymbols":{"Oracle":[4717]},"id":4718,"nodeType":"SourceUnit","nodes":[{"id":4705,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:22"},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4706,"nodeType":"ImportDirective","scope":4718,"sourceUnit":6702,"src":"25:55:22","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title Abstract oracle contract - Functions to be implemented by oracles","fullyImplemented":false,"id":4717,"linearizedBaseContracts":[4717],"name":"Oracle","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":4711,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4707,"nodeType":"ParameterList","parameters":[],"src":"203:2:22"},"payable":false,"returnParameters":{"id":4710,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4709,"name":"","nodeType":"VariableDeclaration","scope":4711,"src":"227:4:22","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4708,"name":"bool","nodeType":"ElementaryTypeName","src":"227:4:22","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"226:6:22"},"scope":4717,"src":"182:51:22","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":4716,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4712,"nodeType":"ParameterList","parameters":[],"src":"257:2:22"},"payable":false,"returnParameters":{"id":4715,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4714,"name":"","nodeType":"VariableDeclaration","scope":4716,"src":"281:3:22","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4713,"name":"int","nodeType":"ElementaryTypeName","src":"281:3:22","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"280:5:22"},"scope":4717,"src":"238:48:22","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":4718,"src":"159:129:22"}],"src":"0:289:22"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","exportedSymbols":{"Oracle":[4717]},"id":4718,"nodeType":"SourceUnit","nodes":[{"id":4705,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:22"},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4706,"nodeType":"ImportDirective","scope":4718,"sourceUnit":6702,"src":"25:55:22","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title Abstract oracle contract - Functions to be implemented by oracles","fullyImplemented":false,"id":4717,"linearizedBaseContracts":[4717],"name":"Oracle","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":4711,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4707,"nodeType":"ParameterList","parameters":[],"src":"203:2:22"},"payable":false,"returnParameters":{"id":4710,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4709,"name":"","nodeType":"VariableDeclaration","scope":4711,"src":"227:4:22","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4708,"name":"bool","nodeType":"ElementaryTypeName","src":"227:4:22","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"226:6:22"},"scope":4717,"src":"182:51:22","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":4716,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4712,"nodeType":"ParameterList","parameters":[],"src":"257:2:22"},"payable":false,"returnParameters":{"id":4715,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4714,"name":"","nodeType":"VariableDeclaration","scope":4716,"src":"281:3:22","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4713,"name":"int","nodeType":"ElementaryTypeName","src":"281:3:22","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"280:5:22"},"scope":4717,"src":"238:48:22","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":4718,"src":"159:129:22"}],"src":"0:289:22"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.028Z"}; /***/ }), @@ -374,10 +593,54 @@ module.exports = {"contract_name":"Oracle","abi":[{"constant":true,"inputs":[]," /*!********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/OutcomeToken.json ***! \********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"OutcomeToken","abi":[{"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":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","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":"masterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"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":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","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":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Issuance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Revocation","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"},{"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"},{"constant":false,"inputs":[{"name":"_for","type":"address"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"issue","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_for","type":"address"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"revoke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506114bd806100206000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b3146100bf57806318160ddd1461012457806323b872dd1461014f57806366188463146101d457806370a0823114610239578063867904b414610290578063a619486e146102dd578063a9059cbb14610334578063d73dd62314610399578063dd62ed3e146103fe578063e274fd2414610475578063eac449d9146104cc575b600080fd5b3480156100cb57600080fd5b5061010a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610519565b604051808215151515815260200191505060405180910390f35b34801561013057600080fd5b5061013961060b565b6040518082815260200191505060405180910390f35b34801561015b57600080fd5b506101ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610615565b604051808215151515815260200191505060405180910390f35b3480156101e057600080fd5b5061021f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109d4565b604051808215151515815260200191505060405180910390f35b34801561024557600080fd5b5061027a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c65565b6040518082815260200191505060405180910390f35b34801561029c57600080fd5b506102db600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cae565b005b3480156102e957600080fd5b506102f2610e0c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034057600080fd5b5061037f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e31565b604051808215151515815260200191505060405180910390f35b3480156103a557600080fd5b506103e4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611055565b604051808215151515815260200191505060405180910390f35b34801561040a57600080fd5b5061045f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611251565b6040518082815260200191505060405180910390f35b34801561048157600080fd5b5061048a6112d8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104d857600080fd5b50610517600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112fe565b005b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561065257600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106a057600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561072b57600080fd5b61077d82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061081282600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108e482600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c90919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ae5576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b79565b610af8838261145c90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d0a57600080fd5b610d5c81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610db48160025461147590919063ffffffff16565b6002819055508173ffffffffffffffffffffffffffffffffffffffff167f9cb9c14f7bc76e3a89b796b091850526236115352a198b1e472f00e91376bbcb826040518082815260200191505060405180910390a25050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610e6e57600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610ebc57600080fd5b610f0e82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fa382600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006110e682600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561135a57600080fd5b6113ac81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114048160025461145c90919063ffffffff16565b6002819055508173ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e9826040518082815260200191505060405180910390a25050565b600082821115151561146a57fe5b818303905092915050565b6000818301905082811015151561148857fe5b809050929150505600a165627a7a723058201abcee48fb4b1d3fbbf65e3939d62a729632fac5574f0ec845cb6bb199d3697b0029","deployedBytecode":"0x6080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b3146100bf57806318160ddd1461012457806323b872dd1461014f57806366188463146101d457806370a0823114610239578063867904b414610290578063a619486e146102dd578063a9059cbb14610334578063d73dd62314610399578063dd62ed3e146103fe578063e274fd2414610475578063eac449d9146104cc575b600080fd5b3480156100cb57600080fd5b5061010a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610519565b604051808215151515815260200191505060405180910390f35b34801561013057600080fd5b5061013961060b565b6040518082815260200191505060405180910390f35b34801561015b57600080fd5b506101ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610615565b604051808215151515815260200191505060405180910390f35b3480156101e057600080fd5b5061021f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109d4565b604051808215151515815260200191505060405180910390f35b34801561024557600080fd5b5061027a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c65565b6040518082815260200191505060405180910390f35b34801561029c57600080fd5b506102db600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cae565b005b3480156102e957600080fd5b506102f2610e0c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034057600080fd5b5061037f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e31565b604051808215151515815260200191505060405180910390f35b3480156103a557600080fd5b506103e4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611055565b604051808215151515815260200191505060405180910390f35b34801561040a57600080fd5b5061045f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611251565b6040518082815260200191505060405180910390f35b34801561048157600080fd5b5061048a6112d8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104d857600080fd5b50610517600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112fe565b005b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561065257600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106a057600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561072b57600080fd5b61077d82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061081282600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108e482600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c90919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ae5576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b79565b610af8838261145c90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d0a57600080fd5b610d5c81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610db48160025461147590919063ffffffff16565b6002819055508173ffffffffffffffffffffffffffffffffffffffff167f9cb9c14f7bc76e3a89b796b091850526236115352a198b1e472f00e91376bbcb826040518082815260200191505060405180910390a25050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610e6e57600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610ebc57600080fd5b610f0e82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fa382600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006110e682600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561135a57600080fd5b6113ac81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145c90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114048160025461145c90919063ffffffff16565b6002819055508173ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e9826040518082815260200191505060405180910390a25050565b600082821115151561146a57fe5b818303905092915050565b6000818301905082811015151561148857fe5b809050929150505600a165627a7a723058201abcee48fb4b1d3fbbf65e3939d62a729632fac5574f0ec845cb6bb199d3697b0029","sourceMap":"805:1429:27:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;805:1429:27;;;;;;;","deployedSourceMap":"805:1429:27:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1814:188:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1814:188:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:83:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;371:83:32;;;;;;;;;;;;;;;;;;;;;;;726:470:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;726:470:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3679:431;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3679:431:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1131:99:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1131:99:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1496:275:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1496:275:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;608:321:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;608:321:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2926:296:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2926:296:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2321:153;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2321:153:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1062:28:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1062:28:27;;;;;;;;;;;;;;;;;;;;;;;;;;;1954:278;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1954:278:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1814:188:35;1881:4;1925:6;1893:7;:19;1901:10;1893:19;;;;;;;;;;;;;;;:29;1913:8;1893:29;;;;;;;;;;;;;;;:38;;;;1963:8;1942:38;;1951:10;1942:38;;;1973:6;1942:38;;;;;;;;;;;;;;;;;;1993:4;1986:11;;1814:188;;;;:::o;371:83:32:-;415:7;437:12;;430:19;;371:83;:::o;726:470:35:-;832:4;869:1;854:17;;:3;:17;;;;846:26;;;;;;;;896:8;:15;905:5;896:15;;;;;;;;;;;;;;;;886:6;:25;;878:34;;;;;;;;936:7;:14;944:5;936:14;;;;;;;;;;;;;;;:26;951:10;936:26;;;;;;;;;;;;;;;;926:6;:36;;918:45;;;;;;;;988:27;1008:6;988:8;:15;997:5;988:15;;;;;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;970:8;:15;979:5;970:15;;;;;;;;;;;;;;;:45;;;;1037:25;1055:6;1037:8;:13;1046:3;1037:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;1021:8;:13;1030:3;1021:13;;;;;;;;;;;;;;;:41;;;;1097:38;1128:6;1097:7;:14;1105:5;1097:14;;;;;;;;;;;;;;;:26;1112:10;1097:26;;;;;;;;;;;;;;;;:30;;:38;;;;:::i;:::-;1068:7;:14;1076:5;1068:14;;;;;;;;;;;;;;;:26;1083:10;1068:26;;;;;;;;;;;;;;;:67;;;;1162:3;1146:28;;1155:5;1146:28;;;1167:6;1146:28;;;;;;;;;;;;;;;;;;1187:4;1180:11;;726:470;;;;;:::o;3679:431::-;3785:4;3799:16;3818:7;:19;3826:10;3818:19;;;;;;;;;;;;;;;:29;3838:8;3818:29;;;;;;;;;;;;;;;;3799:48;;3876:8;3857:16;:27;3853:164;;;3926:1;3894:7;:19;3902:10;3894:19;;;;;;;;;;;;;;;:29;3914:8;3894:29;;;;;;;;;;;;;;;:33;;;;3853:164;;;3980:30;3993:16;3980:8;:12;;:30;;;;:::i;:::-;3948:7;:19;3956:10;3948:19;;;;;;;;;;;;;;;:29;3968:8;3948:29;;;;;;;;;;;;;;;:62;;;;3853:164;4048:8;4027:61;;4036:10;4027:61;;;4058:7;:19;4066:10;4058:19;;;;;;;;;;;;;;;:29;4078:8;4058:29;;;;;;;;;;;;;;;;4027:61;;;;;;;;;;;;;;;;;;4101:4;4094:11;;3679:431;;;;;:::o;1131:99:32:-;1187:7;1209:8;:16;1218:6;1209:16;;;;;;;;;;;;;;;;1202:23;;1131:99;;;:::o;1496:275:27:-;1243:13;;;;;;;;;;;1229:27;;:10;:27;;;1221:36;;;;;;;;1619:37;1638:17;1619:8;:14;1628:4;1619:14;;;;;;;;;;;;;;;;:18;;:37;;;;:::i;:::-;1602:8;:14;1611:4;1602:14;;;;;;;;;;;;;;;:54;;;;1681:35;1698:17;1681:12;;:16;;:35;;;;:::i;:::-;1666:12;:50;;;;1740:4;1731:33;;;1746:17;1731:33;;;;;;;;;;;;;;;;;;1496:275;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;608:321:32:-;671:4;706:1;691:17;;:3;:17;;;;683:26;;;;;;;;733:8;:20;742:10;733:20;;;;;;;;;;;;;;;;723:6;:30;;715:39;;;;;;;;784:32;809:6;784:8;:20;793:10;784:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;761:8;:20;770:10;761:20;;;;;;;;;;;;;;;:55;;;;838:25;856:6;838:8;:13;847:3;838:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;822:8;:13;831:3;822:13;;;;;;;;;;;;;;;:41;;;;895:3;874:33;;883:10;874:33;;;900:6;874:33;;;;;;;;;;;;;;;;;;920:4;913:11;;608:321;;;;:::o;2926:296:35:-;3027:4;3081:46;3115:11;3081:7;:19;3089:10;3081:19;;;;;;;;;;;;;;;:29;3101:8;3081:29;;;;;;;;;;;;;;;;:33;;:46;;;;:::i;:::-;3041:7;:19;3049:10;3041:19;;;;;;;;;;;;;;;:29;3061:8;3041:29;;;;;;;;;;;;;;;:87;;;;3160:8;3139:61;;3148:10;3139:61;;;3170:7;:19;3178:10;3170:19;;;;;;;;;;;;;;;:29;3190:8;3170:29;;;;;;;;;;;;;;;;3139:61;;;;;;;;;;;;;;;;;;3213:4;3206:11;;2926:296;;;;:::o;2321:153::-;2420:7;2444;:15;2452:6;2444:15;;;;;;;;;;;;;;;:25;2460:8;2444:25;;;;;;;;;;;;;;;;2437:32;;2321:153;;;;:::o;1062:28:27:-;;;;;;;;;;;;;:::o;1954:278::-;1243:13;;;;;;;;;;;1229:27;;:10;:27;;;1221:36;;;;;;;;2078:37;2097:17;2078:8;:14;2087:4;2078:14;;;;;;;;;;;;;;;;:18;;:37;;;;:::i;:::-;2061:8;:14;2070:4;2061:14;;;;;;;;;;;;;;;:54;;;;2140:35;2157:17;2140:12;;:16;;:35;;;;:::i;:::-;2125:12;:50;;;;2201:4;2190:35;;;2207:17;2190:35;;;;;;;;;;;;;;;;;;1954:278;;:::o;1968:110:31:-;2026:7;2053:1;2048;:6;;2041:14;;;;;;2072:1;2068;:5;2061:12;;1968:110;;;;:::o;2363:123::-;2421:9;2446:1;2442;:5;2438:9;;2465:1;2460;:6;;2453:14;;;;;;2480:1;2473:8;;2363:123;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract OutcomeTokenProxy is Proxy {\n /*\n * Storage\n */\n\n // HACK: Lining up storage with StandardToken and OutcomeToken\n mapping(address => uint256) balances;\n uint256 totalSupply_;\n mapping (address => mapping (address => uint256)) internal allowed;\n\n address internal eventContract;\n\n /*\n * Public functions\n */\n /// @dev Constructor sets events contract address\n constructor(address proxied)\n public\n Proxy(proxied)\n {\n eventContract = msg.sender;\n }\n}\n\n/// @title Outcome token contract - Issuing and revoking outcome tokens\n/// @author Stefan George - \ncontract OutcomeToken is Proxied, StandardToken {\n using SafeMath for *;\n\n /*\n * Events\n */\n event Issuance(address indexed owner, uint amount);\n event Revocation(address indexed owner, uint amount);\n\n /*\n * Storage\n */\n address public eventContract;\n\n /*\n * Modifiers\n */\n modifier isEventContract () {\n // Only event contract is allowed to proceed\n require(msg.sender == eventContract);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Events contract issues new tokens for address. Returns success\n /// @param _for Address of receiver\n /// @param outcomeTokenCount Number of tokens to issue\n function issue(address _for, uint outcomeTokenCount)\n public\n isEventContract\n {\n balances[_for] = balances[_for].add(outcomeTokenCount);\n totalSupply_ = totalSupply_.add(outcomeTokenCount);\n emit Issuance(_for, outcomeTokenCount);\n }\n\n /// @dev Events contract revokes tokens for address. Returns success\n /// @param _for Address of token holder\n /// @param outcomeTokenCount Number of tokens to revoke\n function revoke(address _for, uint outcomeTokenCount)\n public\n isEventContract\n {\n balances[_for] = balances[_for].sub(outcomeTokenCount);\n totalSupply_ = totalSupply_.sub(outcomeTokenCount);\n emit Revocation(_for, outcomeTokenCount);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","exportedSymbols":{"OutcomeToken":[5674],"OutcomeTokenProxy":[5576]},"id":5675,"nodeType":"SourceUnit","nodes":[{"id":5543,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:27"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","file":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","id":5544,"nodeType":"ImportDirective","scope":5675,"sourceUnit":7608,"src":"25:71:27","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":5545,"nodeType":"ImportDirective","scope":5675,"sourceUnit":6702,"src":"97:55:27","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5546,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"185:5:27","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5547,"nodeType":"InheritanceSpecifier","src":"185:5:27"}],"contractDependencies":[6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5576,"linearizedBaseContracts":[5576,6701,6673],"name":"OutcomeTokenProxy","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":5551,"name":"balances","nodeType":"VariableDeclaration","scope":5576,"src":"296:36:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":5550,"keyType":{"id":5548,"name":"address","nodeType":"ElementaryTypeName","src":"304:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"296:27:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":5549,"name":"uint256","nodeType":"ElementaryTypeName","src":"315:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"internal"},{"constant":false,"id":5553,"name":"totalSupply_","nodeType":"VariableDeclaration","scope":5576,"src":"338:20:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5552,"name":"uint256","nodeType":"ElementaryTypeName","src":"338:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5559,"name":"allowed","nodeType":"VariableDeclaration","scope":5576,"src":"364:66:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":5558,"keyType":{"id":5554,"name":"address","nodeType":"ElementaryTypeName","src":"373:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"364:49:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":5557,"keyType":{"id":5555,"name":"address","nodeType":"ElementaryTypeName","src":"393:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"384:28:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":5556,"name":"uint256","nodeType":"ElementaryTypeName","src":"404:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"internal"},{"constant":false,"id":5561,"name":"eventContract","nodeType":"VariableDeclaration","scope":5576,"src":"437:30:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5560,"name":"address","nodeType":"ElementaryTypeName","src":"437:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"body":{"id":5574,"nodeType":"Block","src":"639:43:27","statements":[{"expression":{"argumentTypes":null,"id":5572,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5569,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5561,"src":"649:13:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5570,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"665:3:27","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"665:10:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"649:26:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":5573,"nodeType":"ExpressionStatement","src":"649:26:27"}]},"documentation":"@dev Constructor sets events contract address","id":5575,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5566,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5563,"src":"626:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5567,"modifierName":{"argumentTypes":null,"id":5565,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"620:5:27","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"620:14:27"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5564,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5563,"name":"proxied","nodeType":"VariableDeclaration","scope":5575,"src":"580:15:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5562,"name":"address","nodeType":"ElementaryTypeName","src":"580:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"579:17:27"},"payable":false,"returnParameters":{"id":5568,"nodeType":"ParameterList","parameters":[],"src":"639:0:27"},"scope":5576,"src":"568:114:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5675,"src":"155:529:27"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5577,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"830:7:27","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5578,"nodeType":"InheritanceSpecifier","src":"830:7:27"},{"arguments":null,"baseName":{"contractScope":null,"id":5579,"name":"StandardToken","nodeType":"UserDefinedTypeName","referencedDeclaration":7607,"src":"839:13:27","typeDescriptions":{"typeIdentifier":"t_contract$_StandardToken_$7607","typeString":"contract StandardToken"}},"id":5580,"nodeType":"InheritanceSpecifier","src":"839:13:27"}],"contractDependencies":[6673,7285,7328,7360,7607],"contractKind":"contract","documentation":"@title Outcome token contract - Issuing and revoking outcome tokens\n @author Stefan George - ","fullyImplemented":true,"id":5674,"linearizedBaseContracts":[5674,7607,7285,7328,7360,6673],"name":"OutcomeToken","nodeType":"ContractDefinition","nodes":[{"id":5582,"libraryName":{"contractScope":null,"id":5581,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"865:8:27","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"859:21:27","typeName":null},{"anonymous":false,"documentation":null,"id":5588,"name":"Issuance","nodeType":"EventDefinition","parameters":{"id":5587,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5584,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":5588,"src":"931:21:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5583,"name":"address","nodeType":"ElementaryTypeName","src":"931:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5586,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5588,"src":"954:11:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5585,"name":"uint","nodeType":"ElementaryTypeName","src":"954:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"930:36:27"},"src":"916:51:27"},{"anonymous":false,"documentation":null,"id":5594,"name":"Revocation","nodeType":"EventDefinition","parameters":{"id":5593,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5590,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":5594,"src":"989:21:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5589,"name":"address","nodeType":"ElementaryTypeName","src":"989:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5592,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5594,"src":"1012:11:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5591,"name":"uint","nodeType":"ElementaryTypeName","src":"1012:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"988:36:27"},"src":"972:53:27"},{"constant":false,"id":5596,"name":"eventContract","nodeType":"VariableDeclaration","scope":5674,"src":"1062:28:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5595,"name":"address","nodeType":"ElementaryTypeName","src":"1062:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"body":{"id":5606,"nodeType":"Block","src":"1158:117:27","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5602,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5599,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1229:3:27","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5600,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1229:10:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":5601,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5596,"src":"1243:13:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1229:27:27","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5598,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1221:7:27","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5603,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1221:36:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5604,"nodeType":"ExpressionStatement","src":"1221:36:27"},{"id":5605,"nodeType":"PlaceholderStatement","src":"1267:1:27"}]},"documentation":null,"id":5607,"name":"isEventContract","nodeType":"ModifierDefinition","parameters":{"id":5597,"nodeType":"ParameterList","parameters":[],"src":"1155:2:27"},"src":"1130:145:27","visibility":"internal"},{"body":{"id":5639,"nodeType":"Block","src":"1592:179:27","statements":[{"expression":{"argumentTypes":null,"id":5625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5616,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1602:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5618,"indexExpression":{"argumentTypes":null,"id":5617,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1611:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1602:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5623,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1638:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5619,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1619:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5621,"indexExpression":{"argumentTypes":null,"id":5620,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1628:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1619:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5622,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1619:18:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5624,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1619:37:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1602:54:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5626,"nodeType":"ExpressionStatement","src":"1602:54:27"},{"expression":{"argumentTypes":null,"id":5632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5627,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"1666:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5630,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1698:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5628,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"1681:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5629,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1681:16:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1681:35:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1666:50:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5633,"nodeType":"ExpressionStatement","src":"1666:50:27"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5635,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1740:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5636,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1746:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5634,"name":"Issuance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5588,"src":"1731:8:27","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5637,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1731:33:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5638,"nodeType":"EmitStatement","src":"1726:38:27"}]},"documentation":"@dev Events contract issues new tokens for address. Returns success\n @param _for Address of receiver\n @param outcomeTokenCount Number of tokens to issue","id":5640,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":5614,"modifierName":{"argumentTypes":null,"id":5613,"name":"isEventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5607,"src":"1572:15:27","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1572:15:27"}],"name":"issue","nodeType":"FunctionDefinition","parameters":{"id":5612,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5609,"name":"_for","nodeType":"VariableDeclaration","scope":5640,"src":"1511:12:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5608,"name":"address","nodeType":"ElementaryTypeName","src":"1511:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5611,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":5640,"src":"1525:22:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5610,"name":"uint","nodeType":"ElementaryTypeName","src":"1525:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1510:38:27"},"payable":false,"returnParameters":{"id":5615,"nodeType":"ParameterList","parameters":[],"src":"1592:0:27"},"scope":5674,"src":"1496:275:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5672,"nodeType":"Block","src":"2051:181:27","statements":[{"expression":{"argumentTypes":null,"id":5658,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5649,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"2061:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5651,"indexExpression":{"argumentTypes":null,"id":5650,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2070:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2061:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5656,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2097:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5652,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"2078:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5654,"indexExpression":{"argumentTypes":null,"id":5653,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2087:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2078:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5655,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"2078:18:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5657,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2078:37:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2061:54:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5659,"nodeType":"ExpressionStatement","src":"2061:54:27"},{"expression":{"argumentTypes":null,"id":5665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5660,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"2125:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5663,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2157:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5661,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"2140:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5662,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"2140:16:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5664,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2140:35:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2125:50:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5666,"nodeType":"ExpressionStatement","src":"2125:50:27"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5668,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2201:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5669,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2207:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5667,"name":"Revocation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5594,"src":"2190:10:27","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2190:35:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5671,"nodeType":"EmitStatement","src":"2185:40:27"}]},"documentation":"@dev Events contract revokes tokens for address. Returns success\n @param _for Address of token holder\n @param outcomeTokenCount Number of tokens to revoke","id":5673,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":5647,"modifierName":{"argumentTypes":null,"id":5646,"name":"isEventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5607,"src":"2031:15:27","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2031:15:27"}],"name":"revoke","nodeType":"FunctionDefinition","parameters":{"id":5645,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5642,"name":"_for","nodeType":"VariableDeclaration","scope":5673,"src":"1970:12:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5641,"name":"address","nodeType":"ElementaryTypeName","src":"1970:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5644,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":5673,"src":"1984:22:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5643,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1969:38:27"},"payable":false,"returnParameters":{"id":5648,"nodeType":"ParameterList","parameters":[],"src":"2051:0:27"},"scope":5674,"src":"1954:278:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5675,"src":"805:1429:27"}],"src":"0:2235:27"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","exportedSymbols":{"OutcomeToken":[5674],"OutcomeTokenProxy":[5576]},"id":5675,"nodeType":"SourceUnit","nodes":[{"id":5543,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:27"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","file":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","id":5544,"nodeType":"ImportDirective","scope":5675,"sourceUnit":7608,"src":"25:71:27","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":5545,"nodeType":"ImportDirective","scope":5675,"sourceUnit":6702,"src":"97:55:27","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5546,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"185:5:27","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5547,"nodeType":"InheritanceSpecifier","src":"185:5:27"}],"contractDependencies":[6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5576,"linearizedBaseContracts":[5576,6701,6673],"name":"OutcomeTokenProxy","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":5551,"name":"balances","nodeType":"VariableDeclaration","scope":5576,"src":"296:36:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":5550,"keyType":{"id":5548,"name":"address","nodeType":"ElementaryTypeName","src":"304:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"296:27:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":5549,"name":"uint256","nodeType":"ElementaryTypeName","src":"315:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"internal"},{"constant":false,"id":5553,"name":"totalSupply_","nodeType":"VariableDeclaration","scope":5576,"src":"338:20:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5552,"name":"uint256","nodeType":"ElementaryTypeName","src":"338:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5559,"name":"allowed","nodeType":"VariableDeclaration","scope":5576,"src":"364:66:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":5558,"keyType":{"id":5554,"name":"address","nodeType":"ElementaryTypeName","src":"373:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"364:49:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":5557,"keyType":{"id":5555,"name":"address","nodeType":"ElementaryTypeName","src":"393:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"384:28:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":5556,"name":"uint256","nodeType":"ElementaryTypeName","src":"404:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"internal"},{"constant":false,"id":5561,"name":"eventContract","nodeType":"VariableDeclaration","scope":5576,"src":"437:30:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5560,"name":"address","nodeType":"ElementaryTypeName","src":"437:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"body":{"id":5574,"nodeType":"Block","src":"639:43:27","statements":[{"expression":{"argumentTypes":null,"id":5572,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5569,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5561,"src":"649:13:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5570,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"665:3:27","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"665:10:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"649:26:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":5573,"nodeType":"ExpressionStatement","src":"649:26:27"}]},"documentation":"@dev Constructor sets events contract address","id":5575,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5566,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5563,"src":"626:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5567,"modifierName":{"argumentTypes":null,"id":5565,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"620:5:27","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"620:14:27"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5564,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5563,"name":"proxied","nodeType":"VariableDeclaration","scope":5575,"src":"580:15:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5562,"name":"address","nodeType":"ElementaryTypeName","src":"580:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"579:17:27"},"payable":false,"returnParameters":{"id":5568,"nodeType":"ParameterList","parameters":[],"src":"639:0:27"},"scope":5576,"src":"568:114:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5675,"src":"155:529:27"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5577,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"830:7:27","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5578,"nodeType":"InheritanceSpecifier","src":"830:7:27"},{"arguments":null,"baseName":{"contractScope":null,"id":5579,"name":"StandardToken","nodeType":"UserDefinedTypeName","referencedDeclaration":7607,"src":"839:13:27","typeDescriptions":{"typeIdentifier":"t_contract$_StandardToken_$7607","typeString":"contract StandardToken"}},"id":5580,"nodeType":"InheritanceSpecifier","src":"839:13:27"}],"contractDependencies":[6673,7285,7328,7360,7607],"contractKind":"contract","documentation":"@title Outcome token contract - Issuing and revoking outcome tokens\n @author Stefan George - ","fullyImplemented":true,"id":5674,"linearizedBaseContracts":[5674,7607,7285,7328,7360,6673],"name":"OutcomeToken","nodeType":"ContractDefinition","nodes":[{"id":5582,"libraryName":{"contractScope":null,"id":5581,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"865:8:27","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"859:21:27","typeName":null},{"anonymous":false,"documentation":null,"id":5588,"name":"Issuance","nodeType":"EventDefinition","parameters":{"id":5587,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5584,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":5588,"src":"931:21:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5583,"name":"address","nodeType":"ElementaryTypeName","src":"931:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5586,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5588,"src":"954:11:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5585,"name":"uint","nodeType":"ElementaryTypeName","src":"954:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"930:36:27"},"src":"916:51:27"},{"anonymous":false,"documentation":null,"id":5594,"name":"Revocation","nodeType":"EventDefinition","parameters":{"id":5593,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5590,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":5594,"src":"989:21:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5589,"name":"address","nodeType":"ElementaryTypeName","src":"989:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5592,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5594,"src":"1012:11:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5591,"name":"uint","nodeType":"ElementaryTypeName","src":"1012:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"988:36:27"},"src":"972:53:27"},{"constant":false,"id":5596,"name":"eventContract","nodeType":"VariableDeclaration","scope":5674,"src":"1062:28:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5595,"name":"address","nodeType":"ElementaryTypeName","src":"1062:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"body":{"id":5606,"nodeType":"Block","src":"1158:117:27","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5602,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5599,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1229:3:27","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5600,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1229:10:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":5601,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5596,"src":"1243:13:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1229:27:27","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5598,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1221:7:27","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5603,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1221:36:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5604,"nodeType":"ExpressionStatement","src":"1221:36:27"},{"id":5605,"nodeType":"PlaceholderStatement","src":"1267:1:27"}]},"documentation":null,"id":5607,"name":"isEventContract","nodeType":"ModifierDefinition","parameters":{"id":5597,"nodeType":"ParameterList","parameters":[],"src":"1155:2:27"},"src":"1130:145:27","visibility":"internal"},{"body":{"id":5639,"nodeType":"Block","src":"1592:179:27","statements":[{"expression":{"argumentTypes":null,"id":5625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5616,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1602:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5618,"indexExpression":{"argumentTypes":null,"id":5617,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1611:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1602:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5623,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1638:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5619,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1619:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5621,"indexExpression":{"argumentTypes":null,"id":5620,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1628:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1619:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5622,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1619:18:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5624,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1619:37:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1602:54:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5626,"nodeType":"ExpressionStatement","src":"1602:54:27"},{"expression":{"argumentTypes":null,"id":5632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5627,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"1666:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5630,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1698:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5628,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"1681:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5629,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1681:16:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1681:35:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1666:50:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5633,"nodeType":"ExpressionStatement","src":"1666:50:27"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5635,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1740:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5636,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1746:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5634,"name":"Issuance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5588,"src":"1731:8:27","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5637,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1731:33:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5638,"nodeType":"EmitStatement","src":"1726:38:27"}]},"documentation":"@dev Events contract issues new tokens for address. Returns success\n @param _for Address of receiver\n @param outcomeTokenCount Number of tokens to issue","id":5640,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":5614,"modifierName":{"argumentTypes":null,"id":5613,"name":"isEventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5607,"src":"1572:15:27","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1572:15:27"}],"name":"issue","nodeType":"FunctionDefinition","parameters":{"id":5612,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5609,"name":"_for","nodeType":"VariableDeclaration","scope":5640,"src":"1511:12:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5608,"name":"address","nodeType":"ElementaryTypeName","src":"1511:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5611,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":5640,"src":"1525:22:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5610,"name":"uint","nodeType":"ElementaryTypeName","src":"1525:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1510:38:27"},"payable":false,"returnParameters":{"id":5615,"nodeType":"ParameterList","parameters":[],"src":"1592:0:27"},"scope":5674,"src":"1496:275:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5672,"nodeType":"Block","src":"2051:181:27","statements":[{"expression":{"argumentTypes":null,"id":5658,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5649,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"2061:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5651,"indexExpression":{"argumentTypes":null,"id":5650,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2070:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2061:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5656,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2097:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5652,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"2078:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5654,"indexExpression":{"argumentTypes":null,"id":5653,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2087:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2078:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5655,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"2078:18:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5657,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2078:37:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2061:54:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5659,"nodeType":"ExpressionStatement","src":"2061:54:27"},{"expression":{"argumentTypes":null,"id":5665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5660,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"2125:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5663,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2157:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5661,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"2140:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5662,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"2140:16:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5664,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2140:35:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2125:50:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5666,"nodeType":"ExpressionStatement","src":"2125:50:27"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5668,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2201:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5669,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2207:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5667,"name":"Revocation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5594,"src":"2190:10:27","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2190:35:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5671,"nodeType":"EmitStatement","src":"2185:40:27"}]},"documentation":"@dev Events contract revokes tokens for address. Returns success\n @param _for Address of token holder\n @param outcomeTokenCount Number of tokens to revoke","id":5673,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":5647,"modifierName":{"argumentTypes":null,"id":5646,"name":"isEventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5607,"src":"2031:15:27","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2031:15:27"}],"name":"revoke","nodeType":"FunctionDefinition","parameters":{"id":5645,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5642,"name":"_for","nodeType":"VariableDeclaration","scope":5673,"src":"1970:12:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5641,"name":"address","nodeType":"ElementaryTypeName","src":"1970:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5644,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":5673,"src":"1984:22:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5643,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1969:38:27"},"payable":false,"returnParameters":{"id":5648,"nodeType":"ParameterList","parameters":[],"src":"2051:0:27"},"scope":5674,"src":"1954:278:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5675,"src":"805:1429:27"}],"src":"0:2235:27"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0xf69f02bd90eac7bc36b517f9f673bdada3cd3ea5","transactionHash":"0x9b083bd8beba12b8ea47f75696576f8d2ce21ebe331d1a1bb7b37a9f41e17da9"},"3":{"address":"0xda3cb186ec5eca5e9c3b65582f96842b8c9eb6da","transactionHash":"0xf2c86c0660b75f33663693c93bc69a0b2269d3a7f07a2e58aa47fb968150ae45"},"4":{"address":"0x3a9ce035c518696bac49e70233584e8e51a39545","transactionHash":"0xdc6cba80c146620e015f0f036759ae80ec8f30f1aabf66a037767299bb235ee0"},"42":{"address":"0x1cf631ee7524505e37226cfd5328b4e842475e5a","transactionHash":"0xc1975074bdd7f76c45c5c416a49293cba5fc855ccf908c6a0d21552714639ea5"},"437894314312":{"address":"0x67b5656d60a809915323bf2c40a8bef15a152e3e","transactionHash":"0xb7684632c10def84c532855e4feab01af3ebad26fbf9b68d90d161b310ac9c9c"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:47.534Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/OutcomeTokenProxy.json": +/*!*************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/OutcomeTokenProxy.json ***! + \*************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"OutcomeTokenProxy","abi":[{"constant":true,"inputs":[],"name":"masterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"proxied","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}],"bytecode":"0x608060405234801561001057600080fd5b50604051602080610223833981018060405281019080805190602001909291905050508060008173ffffffffffffffffffffffffffffffffffffffff161415151561005a57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610137806100ec6000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582086062f64a8ac16b84a22859a0aaf50fd8f37056793cb37e21a8760b9712c9eed0029","deployedBytecode":"0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582086062f64a8ac16b84a22859a0aaf50fd8f37056793cb37e21a8760b9712c9eed0029","sourceMap":"155:529:27:-;;;568:114;8:9:-1;5:2;;;30:1;27;20:12;5:2;568:114:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;626:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;665:10:27;649:13;;:26;;;;;;;;;;;;;;;;;;568:114;155:529;;;;;;","deployedSourceMap":"155:529:27:-;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;197:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract OutcomeTokenProxy is Proxy {\n /*\n * Storage\n */\n\n // HACK: Lining up storage with StandardToken and OutcomeToken\n mapping(address => uint256) balances;\n uint256 totalSupply_;\n mapping (address => mapping (address => uint256)) internal allowed;\n\n address internal eventContract;\n\n /*\n * Public functions\n */\n /// @dev Constructor sets events contract address\n constructor(address proxied)\n public\n Proxy(proxied)\n {\n eventContract = msg.sender;\n }\n}\n\n/// @title Outcome token contract - Issuing and revoking outcome tokens\n/// @author Stefan George - \ncontract OutcomeToken is Proxied, StandardToken {\n using SafeMath for *;\n\n /*\n * Events\n */\n event Issuance(address indexed owner, uint amount);\n event Revocation(address indexed owner, uint amount);\n\n /*\n * Storage\n */\n address public eventContract;\n\n /*\n * Modifiers\n */\n modifier isEventContract () {\n // Only event contract is allowed to proceed\n require(msg.sender == eventContract);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Events contract issues new tokens for address. Returns success\n /// @param _for Address of receiver\n /// @param outcomeTokenCount Number of tokens to issue\n function issue(address _for, uint outcomeTokenCount)\n public\n isEventContract\n {\n balances[_for] = balances[_for].add(outcomeTokenCount);\n totalSupply_ = totalSupply_.add(outcomeTokenCount);\n emit Issuance(_for, outcomeTokenCount);\n }\n\n /// @dev Events contract revokes tokens for address. Returns success\n /// @param _for Address of token holder\n /// @param outcomeTokenCount Number of tokens to revoke\n function revoke(address _for, uint outcomeTokenCount)\n public\n isEventContract\n {\n balances[_for] = balances[_for].sub(outcomeTokenCount);\n totalSupply_ = totalSupply_.sub(outcomeTokenCount);\n emit Revocation(_for, outcomeTokenCount);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","exportedSymbols":{"OutcomeToken":[5674],"OutcomeTokenProxy":[5576]},"id":5675,"nodeType":"SourceUnit","nodes":[{"id":5543,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:27"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","file":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","id":5544,"nodeType":"ImportDirective","scope":5675,"sourceUnit":7608,"src":"25:71:27","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":5545,"nodeType":"ImportDirective","scope":5675,"sourceUnit":6702,"src":"97:55:27","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5546,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"185:5:27","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5547,"nodeType":"InheritanceSpecifier","src":"185:5:27"}],"contractDependencies":[6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5576,"linearizedBaseContracts":[5576,6701,6673],"name":"OutcomeTokenProxy","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":5551,"name":"balances","nodeType":"VariableDeclaration","scope":5576,"src":"296:36:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":5550,"keyType":{"id":5548,"name":"address","nodeType":"ElementaryTypeName","src":"304:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"296:27:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":5549,"name":"uint256","nodeType":"ElementaryTypeName","src":"315:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"internal"},{"constant":false,"id":5553,"name":"totalSupply_","nodeType":"VariableDeclaration","scope":5576,"src":"338:20:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5552,"name":"uint256","nodeType":"ElementaryTypeName","src":"338:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5559,"name":"allowed","nodeType":"VariableDeclaration","scope":5576,"src":"364:66:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":5558,"keyType":{"id":5554,"name":"address","nodeType":"ElementaryTypeName","src":"373:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"364:49:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":5557,"keyType":{"id":5555,"name":"address","nodeType":"ElementaryTypeName","src":"393:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"384:28:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":5556,"name":"uint256","nodeType":"ElementaryTypeName","src":"404:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"internal"},{"constant":false,"id":5561,"name":"eventContract","nodeType":"VariableDeclaration","scope":5576,"src":"437:30:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5560,"name":"address","nodeType":"ElementaryTypeName","src":"437:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"body":{"id":5574,"nodeType":"Block","src":"639:43:27","statements":[{"expression":{"argumentTypes":null,"id":5572,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5569,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5561,"src":"649:13:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5570,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"665:3:27","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"665:10:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"649:26:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":5573,"nodeType":"ExpressionStatement","src":"649:26:27"}]},"documentation":"@dev Constructor sets events contract address","id":5575,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5566,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5563,"src":"626:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5567,"modifierName":{"argumentTypes":null,"id":5565,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"620:5:27","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"620:14:27"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5564,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5563,"name":"proxied","nodeType":"VariableDeclaration","scope":5575,"src":"580:15:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5562,"name":"address","nodeType":"ElementaryTypeName","src":"580:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"579:17:27"},"payable":false,"returnParameters":{"id":5568,"nodeType":"ParameterList","parameters":[],"src":"639:0:27"},"scope":5576,"src":"568:114:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5675,"src":"155:529:27"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5577,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"830:7:27","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5578,"nodeType":"InheritanceSpecifier","src":"830:7:27"},{"arguments":null,"baseName":{"contractScope":null,"id":5579,"name":"StandardToken","nodeType":"UserDefinedTypeName","referencedDeclaration":7607,"src":"839:13:27","typeDescriptions":{"typeIdentifier":"t_contract$_StandardToken_$7607","typeString":"contract StandardToken"}},"id":5580,"nodeType":"InheritanceSpecifier","src":"839:13:27"}],"contractDependencies":[6673,7285,7328,7360,7607],"contractKind":"contract","documentation":"@title Outcome token contract - Issuing and revoking outcome tokens\n @author Stefan George - ","fullyImplemented":true,"id":5674,"linearizedBaseContracts":[5674,7607,7285,7328,7360,6673],"name":"OutcomeToken","nodeType":"ContractDefinition","nodes":[{"id":5582,"libraryName":{"contractScope":null,"id":5581,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"865:8:27","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"859:21:27","typeName":null},{"anonymous":false,"documentation":null,"id":5588,"name":"Issuance","nodeType":"EventDefinition","parameters":{"id":5587,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5584,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":5588,"src":"931:21:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5583,"name":"address","nodeType":"ElementaryTypeName","src":"931:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5586,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5588,"src":"954:11:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5585,"name":"uint","nodeType":"ElementaryTypeName","src":"954:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"930:36:27"},"src":"916:51:27"},{"anonymous":false,"documentation":null,"id":5594,"name":"Revocation","nodeType":"EventDefinition","parameters":{"id":5593,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5590,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":5594,"src":"989:21:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5589,"name":"address","nodeType":"ElementaryTypeName","src":"989:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5592,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5594,"src":"1012:11:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5591,"name":"uint","nodeType":"ElementaryTypeName","src":"1012:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"988:36:27"},"src":"972:53:27"},{"constant":false,"id":5596,"name":"eventContract","nodeType":"VariableDeclaration","scope":5674,"src":"1062:28:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5595,"name":"address","nodeType":"ElementaryTypeName","src":"1062:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"body":{"id":5606,"nodeType":"Block","src":"1158:117:27","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5602,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5599,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1229:3:27","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5600,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1229:10:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":5601,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5596,"src":"1243:13:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1229:27:27","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5598,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1221:7:27","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5603,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1221:36:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5604,"nodeType":"ExpressionStatement","src":"1221:36:27"},{"id":5605,"nodeType":"PlaceholderStatement","src":"1267:1:27"}]},"documentation":null,"id":5607,"name":"isEventContract","nodeType":"ModifierDefinition","parameters":{"id":5597,"nodeType":"ParameterList","parameters":[],"src":"1155:2:27"},"src":"1130:145:27","visibility":"internal"},{"body":{"id":5639,"nodeType":"Block","src":"1592:179:27","statements":[{"expression":{"argumentTypes":null,"id":5625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5616,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1602:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5618,"indexExpression":{"argumentTypes":null,"id":5617,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1611:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1602:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5623,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1638:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5619,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1619:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5621,"indexExpression":{"argumentTypes":null,"id":5620,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1628:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1619:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5622,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1619:18:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5624,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1619:37:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1602:54:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5626,"nodeType":"ExpressionStatement","src":"1602:54:27"},{"expression":{"argumentTypes":null,"id":5632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5627,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"1666:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5630,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1698:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5628,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"1681:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5629,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1681:16:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1681:35:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1666:50:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5633,"nodeType":"ExpressionStatement","src":"1666:50:27"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5635,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1740:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5636,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1746:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5634,"name":"Issuance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5588,"src":"1731:8:27","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5637,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1731:33:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5638,"nodeType":"EmitStatement","src":"1726:38:27"}]},"documentation":"@dev Events contract issues new tokens for address. Returns success\n @param _for Address of receiver\n @param outcomeTokenCount Number of tokens to issue","id":5640,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":5614,"modifierName":{"argumentTypes":null,"id":5613,"name":"isEventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5607,"src":"1572:15:27","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1572:15:27"}],"name":"issue","nodeType":"FunctionDefinition","parameters":{"id":5612,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5609,"name":"_for","nodeType":"VariableDeclaration","scope":5640,"src":"1511:12:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5608,"name":"address","nodeType":"ElementaryTypeName","src":"1511:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5611,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":5640,"src":"1525:22:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5610,"name":"uint","nodeType":"ElementaryTypeName","src":"1525:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1510:38:27"},"payable":false,"returnParameters":{"id":5615,"nodeType":"ParameterList","parameters":[],"src":"1592:0:27"},"scope":5674,"src":"1496:275:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5672,"nodeType":"Block","src":"2051:181:27","statements":[{"expression":{"argumentTypes":null,"id":5658,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5649,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"2061:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5651,"indexExpression":{"argumentTypes":null,"id":5650,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2070:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2061:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5656,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2097:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5652,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"2078:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5654,"indexExpression":{"argumentTypes":null,"id":5653,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2087:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2078:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5655,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"2078:18:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5657,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2078:37:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2061:54:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5659,"nodeType":"ExpressionStatement","src":"2061:54:27"},{"expression":{"argumentTypes":null,"id":5665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5660,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"2125:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5663,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2157:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5661,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"2140:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5662,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"2140:16:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5664,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2140:35:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2125:50:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5666,"nodeType":"ExpressionStatement","src":"2125:50:27"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5668,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2201:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5669,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2207:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5667,"name":"Revocation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5594,"src":"2190:10:27","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2190:35:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5671,"nodeType":"EmitStatement","src":"2185:40:27"}]},"documentation":"@dev Events contract revokes tokens for address. Returns success\n @param _for Address of token holder\n @param outcomeTokenCount Number of tokens to revoke","id":5673,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":5647,"modifierName":{"argumentTypes":null,"id":5646,"name":"isEventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5607,"src":"2031:15:27","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2031:15:27"}],"name":"revoke","nodeType":"FunctionDefinition","parameters":{"id":5645,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5642,"name":"_for","nodeType":"VariableDeclaration","scope":5673,"src":"1970:12:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5641,"name":"address","nodeType":"ElementaryTypeName","src":"1970:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5644,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":5673,"src":"1984:22:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5643,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1969:38:27"},"payable":false,"returnParameters":{"id":5648,"nodeType":"ParameterList","parameters":[],"src":"2051:0:27"},"scope":5674,"src":"1954:278:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5675,"src":"805:1429:27"}],"src":"0:2235:27"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol","exportedSymbols":{"OutcomeToken":[5674],"OutcomeTokenProxy":[5576]},"id":5675,"nodeType":"SourceUnit","nodes":[{"id":5543,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:27"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","file":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","id":5544,"nodeType":"ImportDirective","scope":5675,"sourceUnit":7608,"src":"25:71:27","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":5545,"nodeType":"ImportDirective","scope":5675,"sourceUnit":6702,"src":"97:55:27","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5546,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"185:5:27","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5547,"nodeType":"InheritanceSpecifier","src":"185:5:27"}],"contractDependencies":[6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5576,"linearizedBaseContracts":[5576,6701,6673],"name":"OutcomeTokenProxy","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":5551,"name":"balances","nodeType":"VariableDeclaration","scope":5576,"src":"296:36:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":5550,"keyType":{"id":5548,"name":"address","nodeType":"ElementaryTypeName","src":"304:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"296:27:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":5549,"name":"uint256","nodeType":"ElementaryTypeName","src":"315:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"internal"},{"constant":false,"id":5553,"name":"totalSupply_","nodeType":"VariableDeclaration","scope":5576,"src":"338:20:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5552,"name":"uint256","nodeType":"ElementaryTypeName","src":"338:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5559,"name":"allowed","nodeType":"VariableDeclaration","scope":5576,"src":"364:66:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":5558,"keyType":{"id":5554,"name":"address","nodeType":"ElementaryTypeName","src":"373:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"364:49:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":5557,"keyType":{"id":5555,"name":"address","nodeType":"ElementaryTypeName","src":"393:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"384:28:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":5556,"name":"uint256","nodeType":"ElementaryTypeName","src":"404:7:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"internal"},{"constant":false,"id":5561,"name":"eventContract","nodeType":"VariableDeclaration","scope":5576,"src":"437:30:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5560,"name":"address","nodeType":"ElementaryTypeName","src":"437:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"body":{"id":5574,"nodeType":"Block","src":"639:43:27","statements":[{"expression":{"argumentTypes":null,"id":5572,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5569,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5561,"src":"649:13:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5570,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"665:3:27","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"665:10:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"649:26:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":5573,"nodeType":"ExpressionStatement","src":"649:26:27"}]},"documentation":"@dev Constructor sets events contract address","id":5575,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5566,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5563,"src":"626:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5567,"modifierName":{"argumentTypes":null,"id":5565,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"620:5:27","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"620:14:27"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5564,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5563,"name":"proxied","nodeType":"VariableDeclaration","scope":5575,"src":"580:15:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5562,"name":"address","nodeType":"ElementaryTypeName","src":"580:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"579:17:27"},"payable":false,"returnParameters":{"id":5568,"nodeType":"ParameterList","parameters":[],"src":"639:0:27"},"scope":5576,"src":"568:114:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5675,"src":"155:529:27"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5577,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"830:7:27","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5578,"nodeType":"InheritanceSpecifier","src":"830:7:27"},{"arguments":null,"baseName":{"contractScope":null,"id":5579,"name":"StandardToken","nodeType":"UserDefinedTypeName","referencedDeclaration":7607,"src":"839:13:27","typeDescriptions":{"typeIdentifier":"t_contract$_StandardToken_$7607","typeString":"contract StandardToken"}},"id":5580,"nodeType":"InheritanceSpecifier","src":"839:13:27"}],"contractDependencies":[6673,7285,7328,7360,7607],"contractKind":"contract","documentation":"@title Outcome token contract - Issuing and revoking outcome tokens\n @author Stefan George - ","fullyImplemented":true,"id":5674,"linearizedBaseContracts":[5674,7607,7285,7328,7360,6673],"name":"OutcomeToken","nodeType":"ContractDefinition","nodes":[{"id":5582,"libraryName":{"contractScope":null,"id":5581,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"865:8:27","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"859:21:27","typeName":null},{"anonymous":false,"documentation":null,"id":5588,"name":"Issuance","nodeType":"EventDefinition","parameters":{"id":5587,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5584,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":5588,"src":"931:21:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5583,"name":"address","nodeType":"ElementaryTypeName","src":"931:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5586,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5588,"src":"954:11:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5585,"name":"uint","nodeType":"ElementaryTypeName","src":"954:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"930:36:27"},"src":"916:51:27"},{"anonymous":false,"documentation":null,"id":5594,"name":"Revocation","nodeType":"EventDefinition","parameters":{"id":5593,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5590,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":5594,"src":"989:21:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5589,"name":"address","nodeType":"ElementaryTypeName","src":"989:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5592,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5594,"src":"1012:11:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5591,"name":"uint","nodeType":"ElementaryTypeName","src":"1012:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"988:36:27"},"src":"972:53:27"},{"constant":false,"id":5596,"name":"eventContract","nodeType":"VariableDeclaration","scope":5674,"src":"1062:28:27","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5595,"name":"address","nodeType":"ElementaryTypeName","src":"1062:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"body":{"id":5606,"nodeType":"Block","src":"1158:117:27","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5602,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5599,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1229:3:27","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5600,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1229:10:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":5601,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5596,"src":"1243:13:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1229:27:27","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5598,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1221:7:27","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5603,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1221:36:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5604,"nodeType":"ExpressionStatement","src":"1221:36:27"},{"id":5605,"nodeType":"PlaceholderStatement","src":"1267:1:27"}]},"documentation":null,"id":5607,"name":"isEventContract","nodeType":"ModifierDefinition","parameters":{"id":5597,"nodeType":"ParameterList","parameters":[],"src":"1155:2:27"},"src":"1130:145:27","visibility":"internal"},{"body":{"id":5639,"nodeType":"Block","src":"1592:179:27","statements":[{"expression":{"argumentTypes":null,"id":5625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5616,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1602:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5618,"indexExpression":{"argumentTypes":null,"id":5617,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1611:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1602:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5623,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1638:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5619,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1619:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5621,"indexExpression":{"argumentTypes":null,"id":5620,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1628:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1619:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5622,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1619:18:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5624,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1619:37:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1602:54:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5626,"nodeType":"ExpressionStatement","src":"1602:54:27"},{"expression":{"argumentTypes":null,"id":5632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5627,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"1666:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5630,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1698:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5628,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"1681:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5629,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1681:16:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1681:35:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1666:50:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5633,"nodeType":"ExpressionStatement","src":"1666:50:27"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5635,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5609,"src":"1740:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5636,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5611,"src":"1746:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5634,"name":"Issuance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5588,"src":"1731:8:27","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5637,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1731:33:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5638,"nodeType":"EmitStatement","src":"1726:38:27"}]},"documentation":"@dev Events contract issues new tokens for address. Returns success\n @param _for Address of receiver\n @param outcomeTokenCount Number of tokens to issue","id":5640,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":5614,"modifierName":{"argumentTypes":null,"id":5613,"name":"isEventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5607,"src":"1572:15:27","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1572:15:27"}],"name":"issue","nodeType":"FunctionDefinition","parameters":{"id":5612,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5609,"name":"_for","nodeType":"VariableDeclaration","scope":5640,"src":"1511:12:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5608,"name":"address","nodeType":"ElementaryTypeName","src":"1511:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5611,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":5640,"src":"1525:22:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5610,"name":"uint","nodeType":"ElementaryTypeName","src":"1525:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1510:38:27"},"payable":false,"returnParameters":{"id":5615,"nodeType":"ParameterList","parameters":[],"src":"1592:0:27"},"scope":5674,"src":"1496:275:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5672,"nodeType":"Block","src":"2051:181:27","statements":[{"expression":{"argumentTypes":null,"id":5658,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5649,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"2061:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5651,"indexExpression":{"argumentTypes":null,"id":5650,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2070:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2061:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5656,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2097:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5652,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"2078:8:27","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":5654,"indexExpression":{"argumentTypes":null,"id":5653,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2087:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2078:14:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5655,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"2078:18:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5657,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2078:37:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2061:54:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5659,"nodeType":"ExpressionStatement","src":"2061:54:27"},{"expression":{"argumentTypes":null,"id":5665,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5660,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"2125:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5663,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2157:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5661,"name":"totalSupply_","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7204,"src":"2140:12:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5662,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"2140:16:27","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5664,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2140:35:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2125:50:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5666,"nodeType":"ExpressionStatement","src":"2125:50:27"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5668,"name":"_for","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5642,"src":"2201:4:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5669,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5644,"src":"2207:17:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5667,"name":"Revocation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5594,"src":"2190:10:27","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2190:35:27","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5671,"nodeType":"EmitStatement","src":"2185:40:27"}]},"documentation":"@dev Events contract revokes tokens for address. Returns success\n @param _for Address of token holder\n @param outcomeTokenCount Number of tokens to revoke","id":5673,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":5647,"modifierName":{"argumentTypes":null,"id":5646,"name":"isEventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5607,"src":"2031:15:27","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2031:15:27"}],"name":"revoke","nodeType":"FunctionDefinition","parameters":{"id":5645,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5642,"name":"_for","nodeType":"VariableDeclaration","scope":5673,"src":"1970:12:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5641,"name":"address","nodeType":"ElementaryTypeName","src":"1970:7:27","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5644,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":5673,"src":"1984:22:27","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5643,"name":"uint","nodeType":"ElementaryTypeName","src":"1984:4:27","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1969:38:27"},"payable":false,"returnParameters":{"id":5648,"nodeType":"ParameterList","parameters":[],"src":"2051:0:27"},"scope":5674,"src":"1954:278:27","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5675,"src":"805:1429:27"}],"src":"0:2235:27"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.042Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Proxied.json": +/*!***************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Proxied.json ***! + \***************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"Proxied","abi":[{"constant":true,"inputs":[],"name":"masterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5060e98061001f6000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e146044575b600080fd5b348015604f57600080fd5b5060566098565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058207db78bc4a51ac07b16a9baf044c67557286ba9c95674bb974448708938c019f50029","deployedBytecode":"0x608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e146044575b600080fd5b348015604f57600080fd5b5060566098565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058207db78bc4a51ac07b16a9baf044c67557286ba9c95674bb974448708938c019f50029","sourceMap":"174:51:29:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;174:51:29;;;;;;;","deployedSourceMap":"174:51:29:-;;;;;;;;;;;;;;;;;;;;;;;;197:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\n\n/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n/// @author Alan Lu - \ncontract Proxied {\n address public masterCopy;\n}\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \ncontract Proxy is Proxied {\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy)\n public\n {\n require(_masterCopy != 0);\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function ()\n external\n payable\n {\n address _masterCopy = masterCopy;\n assembly {\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 { revert(0, returndatasize()) }\n default { return(0, returndatasize()) }\n }\n }\n}\n","sourcePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","ast":{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","exportedSymbols":{"Proxied":[6673],"Proxy":[6701]},"id":6702,"nodeType":"SourceUnit","nodes":[{"id":6670,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:29"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ","fullyImplemented":true,"id":6673,"linearizedBaseContracts":[6673],"name":"Proxied","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":6672,"name":"masterCopy","nodeType":"VariableDeclaration","scope":6673,"src":"197:25:29","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6671,"name":"address","nodeType":"ElementaryTypeName","src":"197:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"}],"scope":6702,"src":"174:51:29"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":6674,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"409:7:29","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":6675,"nodeType":"InheritanceSpecifier","src":"409:7:29"}],"contractDependencies":[6673],"contractKind":"contract","documentation":"@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ","fullyImplemented":true,"id":6701,"linearizedBaseContracts":[6701,6673],"name":"Proxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":6690,"nodeType":"Block","src":"595:76:29","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":6683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6681,"name":"_masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6677,"src":"613:11:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"628:1:29","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"613:16:29","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6680,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"605:7:29","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6684,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"605:25:29","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6685,"nodeType":"ExpressionStatement","src":"605:25:29"},{"expression":{"argumentTypes":null,"id":6688,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6686,"name":"masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6672,"src":"640:10:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6687,"name":"_masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6677,"src":"653:11:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"640:24:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":6689,"nodeType":"ExpressionStatement","src":"640:24:29"}]},"documentation":"@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.","id":6691,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":6678,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6677,"name":"_masterCopy","nodeType":"VariableDeclaration","scope":6691,"src":"555:19:29","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6676,"name":"address","nodeType":"ElementaryTypeName","src":"555:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"554:21:29"},"payable":false,"returnParameters":{"id":6679,"nodeType":"ParameterList","parameters":[],"src":"595:0:29"},"scope":6701,"src":"543:128:29","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":6699,"nodeType":"Block","src":"821:392:29","statements":[{"assignments":[6695],"declarations":[{"constant":false,"id":6695,"name":"_masterCopy","nodeType":"VariableDeclaration","scope":6700,"src":"831:19:29","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6694,"name":"address","nodeType":"ElementaryTypeName","src":"831:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"id":6697,"initialValue":{"argumentTypes":null,"id":6696,"name":"masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6672,"src":"853:10:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"VariableDeclarationStatement","src":"831:32:29"},{"externalReferences":[{"_masterCopy":{"declaration":6695,"isOffset":false,"isSlot":false,"src":"979:11:29","valueSize":1}}],"id":6698,"nodeType":"InlineAssembly","operations":"{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}","src":"873:340:29"}]},"documentation":"@dev Fallback function forwards all transactions and returns all received return data.","id":6700,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":6692,"nodeType":"ParameterList","parameters":[],"src":"781:2:29"},"payable":true,"returnParameters":{"id":6693,"nodeType":"ParameterList","parameters":[],"src":"821:0:29"},"scope":6701,"src":"772:441:29","stateMutability":"payable","superFunction":null,"visibility":"external"}],"scope":6702,"src":"391:824:29"}],"src":"0:1216:29"},"legacyAST":{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","exportedSymbols":{"Proxied":[6673],"Proxy":[6701]},"id":6702,"nodeType":"SourceUnit","nodes":[{"id":6670,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:29"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ","fullyImplemented":true,"id":6673,"linearizedBaseContracts":[6673],"name":"Proxied","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":6672,"name":"masterCopy","nodeType":"VariableDeclaration","scope":6673,"src":"197:25:29","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6671,"name":"address","nodeType":"ElementaryTypeName","src":"197:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"}],"scope":6702,"src":"174:51:29"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":6674,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"409:7:29","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":6675,"nodeType":"InheritanceSpecifier","src":"409:7:29"}],"contractDependencies":[6673],"contractKind":"contract","documentation":"@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ","fullyImplemented":true,"id":6701,"linearizedBaseContracts":[6701,6673],"name":"Proxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":6690,"nodeType":"Block","src":"595:76:29","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":6683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6681,"name":"_masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6677,"src":"613:11:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"628:1:29","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"613:16:29","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6680,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"605:7:29","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6684,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"605:25:29","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6685,"nodeType":"ExpressionStatement","src":"605:25:29"},{"expression":{"argumentTypes":null,"id":6688,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6686,"name":"masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6672,"src":"640:10:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6687,"name":"_masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6677,"src":"653:11:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"640:24:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":6689,"nodeType":"ExpressionStatement","src":"640:24:29"}]},"documentation":"@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.","id":6691,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":6678,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6677,"name":"_masterCopy","nodeType":"VariableDeclaration","scope":6691,"src":"555:19:29","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6676,"name":"address","nodeType":"ElementaryTypeName","src":"555:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"554:21:29"},"payable":false,"returnParameters":{"id":6679,"nodeType":"ParameterList","parameters":[],"src":"595:0:29"},"scope":6701,"src":"543:128:29","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":6699,"nodeType":"Block","src":"821:392:29","statements":[{"assignments":[6695],"declarations":[{"constant":false,"id":6695,"name":"_masterCopy","nodeType":"VariableDeclaration","scope":6700,"src":"831:19:29","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6694,"name":"address","nodeType":"ElementaryTypeName","src":"831:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"id":6697,"initialValue":{"argumentTypes":null,"id":6696,"name":"masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6672,"src":"853:10:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"VariableDeclarationStatement","src":"831:32:29"},{"externalReferences":[{"_masterCopy":{"declaration":6695,"isOffset":false,"isSlot":false,"src":"979:11:29","valueSize":1}}],"id":6698,"nodeType":"InlineAssembly","operations":"{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}","src":"873:340:29"}]},"documentation":"@dev Fallback function forwards all transactions and returns all received return data.","id":6700,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":6692,"nodeType":"ParameterList","parameters":[],"src":"781:2:29"},"payable":true,"returnParameters":{"id":6693,"nodeType":"ParameterList","parameters":[],"src":"821:0:29"},"scope":6701,"src":"772:441:29","stateMutability":"payable","superFunction":null,"visibility":"external"}],"scope":6702,"src":"391:824:29"}],"src":"0:1216:29"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.047Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/Proxy.json": +/*!*************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Proxy.json ***! + \*************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"Proxy","abi":[{"constant":true,"inputs":[],"name":"masterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_masterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}],"bytecode":"0x608060405234801561001057600080fd5b506040516020806101e08339810180604052810190808051906020019092919050505060008173ffffffffffffffffffffffffffffffffffffffff161415151561005957600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610137806100a96000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820234ff57c418a134486c01bc5bc23b192c6ef86d4ae8e5dd3c230ccf803debbdf0029","deployedBytecode":"0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820234ff57c418a134486c01bc5bc23b192c6ef86d4ae8e5dd3c230ccf803debbdf0029","sourceMap":"391:824:29:-;;;543:128;8:9:-1;5:2;;;30:1;27;20:12;5:2;543:128:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;628:1;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;391:824;;;;;;","deployedSourceMap":"391:824:29:-;;;;;;;;;;;;;;;;;;;;;831:19;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;197:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\n\n/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n/// @author Alan Lu - \ncontract Proxied {\n address public masterCopy;\n}\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \ncontract Proxy is Proxied {\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy)\n public\n {\n require(_masterCopy != 0);\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function ()\n external\n payable\n {\n address _masterCopy = masterCopy;\n assembly {\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 { revert(0, returndatasize()) }\n default { return(0, returndatasize()) }\n }\n }\n}\n","sourcePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","ast":{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","exportedSymbols":{"Proxied":[6673],"Proxy":[6701]},"id":6702,"nodeType":"SourceUnit","nodes":[{"id":6670,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:29"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ","fullyImplemented":true,"id":6673,"linearizedBaseContracts":[6673],"name":"Proxied","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":6672,"name":"masterCopy","nodeType":"VariableDeclaration","scope":6673,"src":"197:25:29","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6671,"name":"address","nodeType":"ElementaryTypeName","src":"197:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"}],"scope":6702,"src":"174:51:29"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":6674,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"409:7:29","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":6675,"nodeType":"InheritanceSpecifier","src":"409:7:29"}],"contractDependencies":[6673],"contractKind":"contract","documentation":"@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ","fullyImplemented":true,"id":6701,"linearizedBaseContracts":[6701,6673],"name":"Proxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":6690,"nodeType":"Block","src":"595:76:29","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":6683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6681,"name":"_masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6677,"src":"613:11:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"628:1:29","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"613:16:29","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6680,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"605:7:29","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6684,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"605:25:29","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6685,"nodeType":"ExpressionStatement","src":"605:25:29"},{"expression":{"argumentTypes":null,"id":6688,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6686,"name":"masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6672,"src":"640:10:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6687,"name":"_masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6677,"src":"653:11:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"640:24:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":6689,"nodeType":"ExpressionStatement","src":"640:24:29"}]},"documentation":"@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.","id":6691,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":6678,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6677,"name":"_masterCopy","nodeType":"VariableDeclaration","scope":6691,"src":"555:19:29","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6676,"name":"address","nodeType":"ElementaryTypeName","src":"555:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"554:21:29"},"payable":false,"returnParameters":{"id":6679,"nodeType":"ParameterList","parameters":[],"src":"595:0:29"},"scope":6701,"src":"543:128:29","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":6699,"nodeType":"Block","src":"821:392:29","statements":[{"assignments":[6695],"declarations":[{"constant":false,"id":6695,"name":"_masterCopy","nodeType":"VariableDeclaration","scope":6700,"src":"831:19:29","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6694,"name":"address","nodeType":"ElementaryTypeName","src":"831:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"id":6697,"initialValue":{"argumentTypes":null,"id":6696,"name":"masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6672,"src":"853:10:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"VariableDeclarationStatement","src":"831:32:29"},{"externalReferences":[{"_masterCopy":{"declaration":6695,"isOffset":false,"isSlot":false,"src":"979:11:29","valueSize":1}}],"id":6698,"nodeType":"InlineAssembly","operations":"{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}","src":"873:340:29"}]},"documentation":"@dev Fallback function forwards all transactions and returns all received return data.","id":6700,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":6692,"nodeType":"ParameterList","parameters":[],"src":"781:2:29"},"payable":true,"returnParameters":{"id":6693,"nodeType":"ParameterList","parameters":[],"src":"821:0:29"},"scope":6701,"src":"772:441:29","stateMutability":"payable","superFunction":null,"visibility":"external"}],"scope":6702,"src":"391:824:29"}],"src":"0:1216:29"},"legacyAST":{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","exportedSymbols":{"Proxied":[6673],"Proxy":[6701]},"id":6702,"nodeType":"SourceUnit","nodes":[{"id":6670,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:29"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":"@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ","fullyImplemented":true,"id":6673,"linearizedBaseContracts":[6673],"name":"Proxied","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":6672,"name":"masterCopy","nodeType":"VariableDeclaration","scope":6673,"src":"197:25:29","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6671,"name":"address","nodeType":"ElementaryTypeName","src":"197:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"}],"scope":6702,"src":"174:51:29"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":6674,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"409:7:29","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":6675,"nodeType":"InheritanceSpecifier","src":"409:7:29"}],"contractDependencies":[6673],"contractKind":"contract","documentation":"@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ","fullyImplemented":true,"id":6701,"linearizedBaseContracts":[6701,6673],"name":"Proxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":6690,"nodeType":"Block","src":"595:76:29","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":6683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6681,"name":"_masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6677,"src":"613:11:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"628:1:29","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"613:16:29","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6680,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"605:7:29","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6684,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"605:25:29","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6685,"nodeType":"ExpressionStatement","src":"605:25:29"},{"expression":{"argumentTypes":null,"id":6688,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6686,"name":"masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6672,"src":"640:10:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":6687,"name":"_masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6677,"src":"653:11:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"640:24:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":6689,"nodeType":"ExpressionStatement","src":"640:24:29"}]},"documentation":"@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.","id":6691,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":6678,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6677,"name":"_masterCopy","nodeType":"VariableDeclaration","scope":6691,"src":"555:19:29","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6676,"name":"address","nodeType":"ElementaryTypeName","src":"555:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"554:21:29"},"payable":false,"returnParameters":{"id":6679,"nodeType":"ParameterList","parameters":[],"src":"595:0:29"},"scope":6701,"src":"543:128:29","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":6699,"nodeType":"Block","src":"821:392:29","statements":[{"assignments":[6695],"declarations":[{"constant":false,"id":6695,"name":"_masterCopy","nodeType":"VariableDeclaration","scope":6700,"src":"831:19:29","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":6694,"name":"address","nodeType":"ElementaryTypeName","src":"831:7:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"id":6697,"initialValue":{"argumentTypes":null,"id":6696,"name":"masterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6672,"src":"853:10:29","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"VariableDeclarationStatement","src":"831:32:29"},{"externalReferences":[{"_masterCopy":{"declaration":6695,"isOffset":false,"isSlot":false,"src":"979:11:29","valueSize":1}}],"id":6698,"nodeType":"InlineAssembly","operations":"{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}","src":"873:340:29"}]},"documentation":"@dev Fallback function forwards all transactions and returns all received return data.","id":6700,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":6692,"nodeType":"ParameterList","parameters":[],"src":"781:2:29"},"payable":true,"returnParameters":{"id":6693,"nodeType":"ParameterList","parameters":[],"src":"821:0:29"},"scope":6701,"src":"772:441:29","stateMutability":"payable","superFunction":null,"visibility":"external"}],"scope":6702,"src":"391:824:29"}],"src":"0:1216:29"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.047Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/SafeMath.json": +/*!****************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/SafeMath.json ***! + \****************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"OutcomeToken","abi":[{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"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,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_for","type":"address"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"issue","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_for","type":"address"},{"name":"outcomeTokenCount","type":"uint256"}],"name":"revoke","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Issuance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Revocation","type":"event"},{"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"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263313}; +module.exports = {"contractName":"SafeMath","abi":[],"bytecode":"0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820685e25ade21a0267bd337f675456354365e6dff65c2e849a3bbfa7260a4ec2970029","deployedBytecode":"0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820685e25ade21a0267bd337f675456354365e6dff65c2e849a3bbfa7260a4ec2970029","sourceMap":"117:2579:31:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24","deployedSourceMap":"117:2579:31:-;;;;;;;;","source":"pragma solidity ^0.4.24;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n int256 constant INT256_MIN = int256((uint256(1) << 255));\n\n /**\n * @dev Multiplies two unsigned integers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Multiplies two signed integers, throws on overflow.\n */\n function mul(int256 a, int256 b) internal pure returns (int256 c) {\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n c = a * b;\n assert((a != -1 || b != INT256_MIN) && c / a == b);\n }\n\n /**\n * @dev Integer division of two unsigned integers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n // uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return a / b;\n }\n\n /**\n * @dev Integer division of two signed integers, truncating the quotient.\n */\n function div(int256 a, int256 b) internal pure returns (int256) {\n // assert(b != 0); // Solidity automatically throws when dividing by 0\n // Overflow only happens when the smallest negative int is multiplied by -1.\n assert(a != INT256_MIN || b != -1);\n return a / b;\n }\n\n /**\n * @dev Subtracts two unsigned integers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Subtracts two signed integers, throws on overflow.\n */\n function sub(int256 a, int256 b) internal pure returns (int256 c) {\n c = a - b;\n assert((b >= 0 && c <= a) || (b < 0 && c > a));\n }\n\n /**\n * @dev Adds two unsigned integers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {\n c = a + b;\n assert(c >= a);\n return c;\n }\n\n /**\n * @dev Adds two signed integers, throws on overflow.\n */\n function add(int256 a, int256 b) internal pure returns (int256 c) {\n c = a + b;\n assert((b >= 0 && c >= a) || (b < 0 && c < a));\n }\n}\n","sourcePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","ast":{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","exportedSymbols":{"SafeMath":[7189]},"id":7190,"nodeType":"SourceUnit","nodes":[{"id":6949,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:31"},{"baseContracts":[],"contractDependencies":[],"contractKind":"library","documentation":"@title SafeMath\n@dev Math operations with safety checks that throw on error","fullyImplemented":true,"id":7189,"linearizedBaseContracts":[7189],"name":"SafeMath","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":6959,"name":"INT256_MIN","nodeType":"VariableDeclaration","scope":7189,"src":"138:56:31","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6950,"name":"int256","nodeType":"ElementaryTypeName","src":"138:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6956,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"hexValue":"31","id":6953,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"183:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":6952,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"175:7:31","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint256"},"id":6954,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"175:10:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"hexValue":"323535","id":6955,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"189:3:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_255_by_1","typeString":"int_const 255"},"value":"255"},"src":"175:17:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":6957,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"174:19:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6951,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"167:6:31","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int256"},"id":6958,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"167:27:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"visibility":"internal"},{"body":{"id":6991,"nodeType":"Block","src":"342:304:31","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6968,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6961,"src":"557:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6969,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"562:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"557:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6974,"nodeType":"IfStatement","src":"553:35:31","trueBody":{"id":6973,"nodeType":"Block","src":"565:23:31","statements":[{"expression":{"argumentTypes":null,"hexValue":"30","id":6971,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"580:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"functionReturnParameters":6967,"id":6972,"nodeType":"Return","src":"573:8:31"}]}},{"expression":{"argumentTypes":null,"id":6979,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6975,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6966,"src":"594:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6976,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6961,"src":"598:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6977,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6963,"src":"602:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"598:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"594:9:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6980,"nodeType":"ExpressionStatement","src":"594:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6986,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6982,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6966,"src":"616:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":6983,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6961,"src":"620:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"616:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":6985,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6963,"src":"625:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"616:10:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6981,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"609:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6987,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"609:18:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6988,"nodeType":"ExpressionStatement","src":"609:18:31"},{"expression":{"argumentTypes":null,"id":6989,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6966,"src":"640:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":6967,"id":6990,"nodeType":"Return","src":"633:8:31"}]},"documentation":"@dev Multiplies two unsigned integers, throws on overflow.","id":6992,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"mul","nodeType":"FunctionDefinition","parameters":{"id":6964,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6961,"name":"a","nodeType":"VariableDeclaration","scope":6992,"src":"286:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6960,"name":"uint256","nodeType":"ElementaryTypeName","src":"286:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6963,"name":"b","nodeType":"VariableDeclaration","scope":6992,"src":"297:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6962,"name":"uint256","nodeType":"ElementaryTypeName","src":"297:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"285:22:31"},"payable":false,"returnParameters":{"id":6967,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6966,"name":"c","nodeType":"VariableDeclaration","scope":6992,"src":"331:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6965,"name":"uint256","nodeType":"ElementaryTypeName","src":"331:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"330:11:31"},"scope":7189,"src":"273:373:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7032,"nodeType":"Block","src":"788:321:31","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7001,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6994,"src":"1003:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7002,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1008:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1003:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":7007,"nodeType":"IfStatement","src":"999:35:31","trueBody":{"id":7006,"nodeType":"Block","src":"1011:23:31","statements":[{"expression":{"argumentTypes":null,"hexValue":"30","id":7004,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1026:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"functionReturnParameters":7000,"id":7005,"nodeType":"Return","src":"1019:8:31"}]}},{"expression":{"argumentTypes":null,"id":7012,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":7008,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6999,"src":"1039:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7009,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6994,"src":"1043:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":7010,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6996,"src":"1047:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1043:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1039:9:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":7013,"nodeType":"ExpressionStatement","src":"1039:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7029,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7022,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7018,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7015,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6994,"src":"1062:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":7017,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"1067:2:31","subExpression":{"argumentTypes":null,"hexValue":"31","id":7016,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1068:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}},"src":"1062:7:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7019,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6996,"src":"1073:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":7020,"name":"INT256_MIN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6959,"src":"1078:10:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1073:15:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1062:26:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7023,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1061:28:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7028,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7026,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7024,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6999,"src":"1093:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":7025,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6994,"src":"1097:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1093:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":7027,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6996,"src":"1102:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1093:10:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1061:42:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7014,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"1054:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7030,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1054:50:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7031,"nodeType":"ExpressionStatement","src":"1054:50:31"}]},"documentation":"@dev Multiplies two signed integers, throws on overflow.","id":7033,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"mul","nodeType":"FunctionDefinition","parameters":{"id":6997,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6994,"name":"a","nodeType":"VariableDeclaration","scope":7033,"src":"735:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6993,"name":"int256","nodeType":"ElementaryTypeName","src":"735:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6996,"name":"b","nodeType":"VariableDeclaration","scope":7033,"src":"745:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6995,"name":"int256","nodeType":"ElementaryTypeName","src":"745:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"734:20:31"},"payable":false,"returnParameters":{"id":7000,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6999,"name":"c","nodeType":"VariableDeclaration","scope":7033,"src":"778:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6998,"name":"int256","nodeType":"ElementaryTypeName","src":"778:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"777:10:31"},"scope":7189,"src":"722:387:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7046,"nodeType":"Block","src":"1268:205:31","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7044,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7042,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7035,"src":"1463:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":7043,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7037,"src":"1467:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1463:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7041,"id":7045,"nodeType":"Return","src":"1456:12:31"}]},"documentation":"@dev Integer division of two unsigned integers, truncating the quotient.","id":7047,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"div","nodeType":"FunctionDefinition","parameters":{"id":7038,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7035,"name":"a","nodeType":"VariableDeclaration","scope":7047,"src":"1214:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7034,"name":"uint256","nodeType":"ElementaryTypeName","src":"1214:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7037,"name":"b","nodeType":"VariableDeclaration","scope":7047,"src":"1225:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7036,"name":"uint256","nodeType":"ElementaryTypeName","src":"1225:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1213:22:31"},"payable":false,"returnParameters":{"id":7041,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7040,"name":"","nodeType":"VariableDeclaration","scope":7047,"src":"1259:7:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7039,"name":"uint256","nodeType":"ElementaryTypeName","src":"1259:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1258:9:31"},"scope":7189,"src":"1201:272:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7071,"nodeType":"Block","src":"1627:219:31","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7064,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7059,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7057,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7049,"src":"1796:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":7058,"name":"INT256_MIN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6959,"src":"1801:10:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1796:15:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7063,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7060,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7051,"src":"1815:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":7062,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"1820:2:31","subExpression":{"argumentTypes":null,"hexValue":"31","id":7061,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1821:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}},"src":"1815:7:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1796:26:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7056,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"1789:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7065,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1789:34:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7066,"nodeType":"ExpressionStatement","src":"1789:34:31"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7069,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7067,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7049,"src":"1836:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":7068,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7051,"src":"1840:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1836:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":7055,"id":7070,"nodeType":"Return","src":"1829:12:31"}]},"documentation":"@dev Integer division of two signed integers, truncating the quotient.","id":7072,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"div","nodeType":"FunctionDefinition","parameters":{"id":7052,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7049,"name":"a","nodeType":"VariableDeclaration","scope":7072,"src":"1576:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7048,"name":"int256","nodeType":"ElementaryTypeName","src":"1576:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7051,"name":"b","nodeType":"VariableDeclaration","scope":7072,"src":"1586:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7050,"name":"int256","nodeType":"ElementaryTypeName","src":"1586:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1575:20:31"},"payable":false,"returnParameters":{"id":7055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7054,"name":"","nodeType":"VariableDeclaration","scope":7072,"src":"1619:6:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7053,"name":"int256","nodeType":"ElementaryTypeName","src":"1619:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1618:8:31"},"scope":7189,"src":"1563:283:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7091,"nodeType":"Block","src":"2035:43:31","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7082,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7076,"src":"2048:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":7083,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7074,"src":"2053:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2048:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7081,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"2041:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7085,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2041:14:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7086,"nodeType":"ExpressionStatement","src":"2041:14:31"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7089,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7087,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7074,"src":"2068:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":7088,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7076,"src":"2072:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2068:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7080,"id":7090,"nodeType":"Return","src":"2061:12:31"}]},"documentation":"@dev Subtracts two unsigned integers, throws on overflow (i.e. if subtrahend is greater than minuend).","id":7092,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"sub","nodeType":"FunctionDefinition","parameters":{"id":7077,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7074,"name":"a","nodeType":"VariableDeclaration","scope":7092,"src":"1981:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7073,"name":"uint256","nodeType":"ElementaryTypeName","src":"1981:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7076,"name":"b","nodeType":"VariableDeclaration","scope":7092,"src":"1992:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7075,"name":"uint256","nodeType":"ElementaryTypeName","src":"1992:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1980:22:31"},"payable":false,"returnParameters":{"id":7080,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7079,"name":"","nodeType":"VariableDeclaration","scope":7092,"src":"2026:7:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7078,"name":"uint256","nodeType":"ElementaryTypeName","src":"2026:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2025:9:31"},"scope":7189,"src":"1968:110:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7127,"nodeType":"Block","src":"2219:72:31","statements":[{"expression":{"argumentTypes":null,"id":7105,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":7101,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7099,"src":"2225:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7102,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7094,"src":"2229:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":7103,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7096,"src":"2233:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2229:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2225:9:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":7106,"nodeType":"ExpressionStatement","src":"2225:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7124,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7114,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7110,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7108,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7096,"src":"2248:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7109,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2253:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2248:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7111,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7099,"src":"2258:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":7112,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7094,"src":"2263:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2258:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2248:16:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7115,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2247:18:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7122,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7118,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7116,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7096,"src":"2270:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7117,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2274:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2270:5:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7119,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7099,"src":"2279:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":7120,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7094,"src":"2283:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2279:5:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2270:14:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7123,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2269:16:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2247:38:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7107,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"2240:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7125,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2240:46:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7126,"nodeType":"ExpressionStatement","src":"2240:46:31"}]},"documentation":"@dev Subtracts two signed integers, throws on overflow.","id":7128,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"sub","nodeType":"FunctionDefinition","parameters":{"id":7097,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7094,"name":"a","nodeType":"VariableDeclaration","scope":7128,"src":"2166:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7093,"name":"int256","nodeType":"ElementaryTypeName","src":"2166:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7096,"name":"b","nodeType":"VariableDeclaration","scope":7128,"src":"2176:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7095,"name":"int256","nodeType":"ElementaryTypeName","src":"2176:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2165:20:31"},"payable":false,"returnParameters":{"id":7100,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7099,"name":"c","nodeType":"VariableDeclaration","scope":7128,"src":"2209:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7098,"name":"int256","nodeType":"ElementaryTypeName","src":"2209:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2208:10:31"},"scope":7189,"src":"2153:138:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7151,"nodeType":"Block","src":"2432:54:31","statements":[{"expression":{"argumentTypes":null,"id":7141,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":7137,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7135,"src":"2438:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7140,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7138,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7130,"src":"2442:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":7139,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7132,"src":"2446:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2442:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2438:9:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7142,"nodeType":"ExpressionStatement","src":"2438:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7146,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7144,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7135,"src":"2460:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":7145,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7130,"src":"2465:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2460:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7143,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"2453:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7147,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2453:14:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7148,"nodeType":"ExpressionStatement","src":"2453:14:31"},{"expression":{"argumentTypes":null,"id":7149,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7135,"src":"2480:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7136,"id":7150,"nodeType":"Return","src":"2473:8:31"}]},"documentation":"@dev Adds two unsigned integers, throws on overflow.","id":7152,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"add","nodeType":"FunctionDefinition","parameters":{"id":7133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7130,"name":"a","nodeType":"VariableDeclaration","scope":7152,"src":"2376:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7129,"name":"uint256","nodeType":"ElementaryTypeName","src":"2376:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7132,"name":"b","nodeType":"VariableDeclaration","scope":7152,"src":"2387:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7131,"name":"uint256","nodeType":"ElementaryTypeName","src":"2387:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2375:22:31"},"payable":false,"returnParameters":{"id":7136,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7135,"name":"c","nodeType":"VariableDeclaration","scope":7152,"src":"2421:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7134,"name":"uint256","nodeType":"ElementaryTypeName","src":"2421:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2420:11:31"},"scope":7189,"src":"2363:123:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7187,"nodeType":"Block","src":"2622:72:31","statements":[{"expression":{"argumentTypes":null,"id":7165,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":7161,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7159,"src":"2628:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7162,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7154,"src":"2632:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":7163,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7156,"src":"2636:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2632:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2628:9:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":7166,"nodeType":"ExpressionStatement","src":"2628:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7184,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7174,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7168,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7156,"src":"2651:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7169,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2656:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2651:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7173,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7171,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7159,"src":"2661:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":7172,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7154,"src":"2666:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2661:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2651:16:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7175,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2650:18:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7182,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7178,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7176,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7156,"src":"2673:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7177,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2677:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2673:5:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7179,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7159,"src":"2682:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":7180,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7154,"src":"2686:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2682:5:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2673:14:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7183,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2672:16:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2650:38:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7167,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"2643:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7185,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2643:46:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7186,"nodeType":"ExpressionStatement","src":"2643:46:31"}]},"documentation":"@dev Adds two signed integers, throws on overflow.","id":7188,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"add","nodeType":"FunctionDefinition","parameters":{"id":7157,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7154,"name":"a","nodeType":"VariableDeclaration","scope":7188,"src":"2569:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7153,"name":"int256","nodeType":"ElementaryTypeName","src":"2569:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7156,"name":"b","nodeType":"VariableDeclaration","scope":7188,"src":"2579:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7155,"name":"int256","nodeType":"ElementaryTypeName","src":"2579:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2568:20:31"},"payable":false,"returnParameters":{"id":7160,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7159,"name":"c","nodeType":"VariableDeclaration","scope":7188,"src":"2612:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7158,"name":"int256","nodeType":"ElementaryTypeName","src":"2612:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2611:10:31"},"scope":7189,"src":"2556:138:31","stateMutability":"pure","superFunction":null,"visibility":"internal"}],"scope":7190,"src":"117:2579:31"}],"src":"0:2697:31"},"legacyAST":{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","exportedSymbols":{"SafeMath":[7189]},"id":7190,"nodeType":"SourceUnit","nodes":[{"id":6949,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:31"},{"baseContracts":[],"contractDependencies":[],"contractKind":"library","documentation":"@title SafeMath\n@dev Math operations with safety checks that throw on error","fullyImplemented":true,"id":7189,"linearizedBaseContracts":[7189],"name":"SafeMath","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":6959,"name":"INT256_MIN","nodeType":"VariableDeclaration","scope":7189,"src":"138:56:31","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6950,"name":"int256","nodeType":"ElementaryTypeName","src":"138:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6956,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"hexValue":"31","id":6953,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"183:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":6952,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"175:7:31","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint256"},"id":6954,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"175:10:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"argumentTypes":null,"hexValue":"323535","id":6955,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"189:3:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_255_by_1","typeString":"int_const 255"},"value":"255"},"src":"175:17:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":6957,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"174:19:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":6951,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"167:6:31","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int256"},"id":6958,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"167:27:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"visibility":"internal"},{"body":{"id":6991,"nodeType":"Block","src":"342:304:31","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6968,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6961,"src":"557:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":6969,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"562:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"557:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":6974,"nodeType":"IfStatement","src":"553:35:31","trueBody":{"id":6973,"nodeType":"Block","src":"565:23:31","statements":[{"expression":{"argumentTypes":null,"hexValue":"30","id":6971,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"580:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"functionReturnParameters":6967,"id":6972,"nodeType":"Return","src":"573:8:31"}]}},{"expression":{"argumentTypes":null,"id":6979,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":6975,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6966,"src":"594:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6978,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6976,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6961,"src":"598:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":6977,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6963,"src":"602:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"598:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"594:9:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":6980,"nodeType":"ExpressionStatement","src":"594:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6986,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":6984,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":6982,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6966,"src":"616:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":6983,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6961,"src":"620:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"616:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":6985,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6963,"src":"625:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"616:10:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":6981,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"609:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":6987,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"609:18:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":6988,"nodeType":"ExpressionStatement","src":"609:18:31"},{"expression":{"argumentTypes":null,"id":6989,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6966,"src":"640:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":6967,"id":6990,"nodeType":"Return","src":"633:8:31"}]},"documentation":"@dev Multiplies two unsigned integers, throws on overflow.","id":6992,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"mul","nodeType":"FunctionDefinition","parameters":{"id":6964,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6961,"name":"a","nodeType":"VariableDeclaration","scope":6992,"src":"286:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6960,"name":"uint256","nodeType":"ElementaryTypeName","src":"286:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6963,"name":"b","nodeType":"VariableDeclaration","scope":6992,"src":"297:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6962,"name":"uint256","nodeType":"ElementaryTypeName","src":"297:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"285:22:31"},"payable":false,"returnParameters":{"id":6967,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6966,"name":"c","nodeType":"VariableDeclaration","scope":6992,"src":"331:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6965,"name":"uint256","nodeType":"ElementaryTypeName","src":"331:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"330:11:31"},"scope":7189,"src":"273:373:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7032,"nodeType":"Block","src":"788:321:31","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7001,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6994,"src":"1003:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7002,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1008:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1003:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":7007,"nodeType":"IfStatement","src":"999:35:31","trueBody":{"id":7006,"nodeType":"Block","src":"1011:23:31","statements":[{"expression":{"argumentTypes":null,"hexValue":"30","id":7004,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1026:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"functionReturnParameters":7000,"id":7005,"nodeType":"Return","src":"1019:8:31"}]}},{"expression":{"argumentTypes":null,"id":7012,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":7008,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6999,"src":"1039:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7009,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6994,"src":"1043:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":7010,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6996,"src":"1047:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1043:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1039:9:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":7013,"nodeType":"ExpressionStatement","src":"1039:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7029,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7022,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7018,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7015,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6994,"src":"1062:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":7017,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"1067:2:31","subExpression":{"argumentTypes":null,"hexValue":"31","id":7016,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1068:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}},"src":"1062:7:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7021,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7019,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6996,"src":"1073:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":7020,"name":"INT256_MIN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6959,"src":"1078:10:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1073:15:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1062:26:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7023,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1061:28:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7028,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7026,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7024,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6999,"src":"1093:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":7025,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6994,"src":"1097:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1093:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":7027,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6996,"src":"1102:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1093:10:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1061:42:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7014,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"1054:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7030,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1054:50:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7031,"nodeType":"ExpressionStatement","src":"1054:50:31"}]},"documentation":"@dev Multiplies two signed integers, throws on overflow.","id":7033,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"mul","nodeType":"FunctionDefinition","parameters":{"id":6997,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6994,"name":"a","nodeType":"VariableDeclaration","scope":7033,"src":"735:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6993,"name":"int256","nodeType":"ElementaryTypeName","src":"735:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":6996,"name":"b","nodeType":"VariableDeclaration","scope":7033,"src":"745:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6995,"name":"int256","nodeType":"ElementaryTypeName","src":"745:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"734:20:31"},"payable":false,"returnParameters":{"id":7000,"nodeType":"ParameterList","parameters":[{"constant":false,"id":6999,"name":"c","nodeType":"VariableDeclaration","scope":7033,"src":"778:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":6998,"name":"int256","nodeType":"ElementaryTypeName","src":"778:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"777:10:31"},"scope":7189,"src":"722:387:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7046,"nodeType":"Block","src":"1268:205:31","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7044,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7042,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7035,"src":"1463:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":7043,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7037,"src":"1467:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1463:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7041,"id":7045,"nodeType":"Return","src":"1456:12:31"}]},"documentation":"@dev Integer division of two unsigned integers, truncating the quotient.","id":7047,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"div","nodeType":"FunctionDefinition","parameters":{"id":7038,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7035,"name":"a","nodeType":"VariableDeclaration","scope":7047,"src":"1214:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7034,"name":"uint256","nodeType":"ElementaryTypeName","src":"1214:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7037,"name":"b","nodeType":"VariableDeclaration","scope":7047,"src":"1225:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7036,"name":"uint256","nodeType":"ElementaryTypeName","src":"1225:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1213:22:31"},"payable":false,"returnParameters":{"id":7041,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7040,"name":"","nodeType":"VariableDeclaration","scope":7047,"src":"1259:7:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7039,"name":"uint256","nodeType":"ElementaryTypeName","src":"1259:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1258:9:31"},"scope":7189,"src":"1201:272:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7071,"nodeType":"Block","src":"1627:219:31","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7064,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7059,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7057,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7049,"src":"1796:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":7058,"name":"INT256_MIN","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6959,"src":"1801:10:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1796:15:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7063,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7060,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7051,"src":"1815:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":7062,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"1820:2:31","subExpression":{"argumentTypes":null,"hexValue":"31","id":7061,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1821:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}},"src":"1815:7:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1796:26:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7056,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"1789:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7065,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1789:34:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7066,"nodeType":"ExpressionStatement","src":"1789:34:31"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7069,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7067,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7049,"src":"1836:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":7068,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7051,"src":"1840:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1836:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":7055,"id":7070,"nodeType":"Return","src":"1829:12:31"}]},"documentation":"@dev Integer division of two signed integers, truncating the quotient.","id":7072,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"div","nodeType":"FunctionDefinition","parameters":{"id":7052,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7049,"name":"a","nodeType":"VariableDeclaration","scope":7072,"src":"1576:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7048,"name":"int256","nodeType":"ElementaryTypeName","src":"1576:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7051,"name":"b","nodeType":"VariableDeclaration","scope":7072,"src":"1586:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7050,"name":"int256","nodeType":"ElementaryTypeName","src":"1586:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1575:20:31"},"payable":false,"returnParameters":{"id":7055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7054,"name":"","nodeType":"VariableDeclaration","scope":7072,"src":"1619:6:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7053,"name":"int256","nodeType":"ElementaryTypeName","src":"1619:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"1618:8:31"},"scope":7189,"src":"1563:283:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7091,"nodeType":"Block","src":"2035:43:31","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7082,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7076,"src":"2048:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":7083,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7074,"src":"2053:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2048:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7081,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"2041:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7085,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2041:14:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7086,"nodeType":"ExpressionStatement","src":"2041:14:31"},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7089,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7087,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7074,"src":"2068:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":7088,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7076,"src":"2072:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2068:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7080,"id":7090,"nodeType":"Return","src":"2061:12:31"}]},"documentation":"@dev Subtracts two unsigned integers, throws on overflow (i.e. if subtrahend is greater than minuend).","id":7092,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"sub","nodeType":"FunctionDefinition","parameters":{"id":7077,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7074,"name":"a","nodeType":"VariableDeclaration","scope":7092,"src":"1981:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7073,"name":"uint256","nodeType":"ElementaryTypeName","src":"1981:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7076,"name":"b","nodeType":"VariableDeclaration","scope":7092,"src":"1992:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7075,"name":"uint256","nodeType":"ElementaryTypeName","src":"1992:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1980:22:31"},"payable":false,"returnParameters":{"id":7080,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7079,"name":"","nodeType":"VariableDeclaration","scope":7092,"src":"2026:7:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7078,"name":"uint256","nodeType":"ElementaryTypeName","src":"2026:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2025:9:31"},"scope":7189,"src":"1968:110:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7127,"nodeType":"Block","src":"2219:72:31","statements":[{"expression":{"argumentTypes":null,"id":7105,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":7101,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7099,"src":"2225:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7102,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7094,"src":"2229:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":7103,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7096,"src":"2233:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2229:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2225:9:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":7106,"nodeType":"ExpressionStatement","src":"2225:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7124,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7114,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7110,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7108,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7096,"src":"2248:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7109,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2253:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2248:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7111,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7099,"src":"2258:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":7112,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7094,"src":"2263:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2258:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2248:16:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7115,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2247:18:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7122,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7118,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7116,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7096,"src":"2270:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7117,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2274:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2270:5:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7119,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7099,"src":"2279:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":7120,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7094,"src":"2283:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2279:5:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2270:14:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7123,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2269:16:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2247:38:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7107,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"2240:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7125,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2240:46:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7126,"nodeType":"ExpressionStatement","src":"2240:46:31"}]},"documentation":"@dev Subtracts two signed integers, throws on overflow.","id":7128,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"sub","nodeType":"FunctionDefinition","parameters":{"id":7097,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7094,"name":"a","nodeType":"VariableDeclaration","scope":7128,"src":"2166:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7093,"name":"int256","nodeType":"ElementaryTypeName","src":"2166:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7096,"name":"b","nodeType":"VariableDeclaration","scope":7128,"src":"2176:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7095,"name":"int256","nodeType":"ElementaryTypeName","src":"2176:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2165:20:31"},"payable":false,"returnParameters":{"id":7100,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7099,"name":"c","nodeType":"VariableDeclaration","scope":7128,"src":"2209:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7098,"name":"int256","nodeType":"ElementaryTypeName","src":"2209:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2208:10:31"},"scope":7189,"src":"2153:138:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7151,"nodeType":"Block","src":"2432:54:31","statements":[{"expression":{"argumentTypes":null,"id":7141,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":7137,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7135,"src":"2438:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7140,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7138,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7130,"src":"2442:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":7139,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7132,"src":"2446:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2442:5:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2438:9:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7142,"nodeType":"ExpressionStatement","src":"2438:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7146,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7144,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7135,"src":"2460:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":7145,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7130,"src":"2465:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2460:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7143,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"2453:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7147,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2453:14:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7148,"nodeType":"ExpressionStatement","src":"2453:14:31"},{"expression":{"argumentTypes":null,"id":7149,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7135,"src":"2480:1:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7136,"id":7150,"nodeType":"Return","src":"2473:8:31"}]},"documentation":"@dev Adds two unsigned integers, throws on overflow.","id":7152,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"add","nodeType":"FunctionDefinition","parameters":{"id":7133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7130,"name":"a","nodeType":"VariableDeclaration","scope":7152,"src":"2376:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7129,"name":"uint256","nodeType":"ElementaryTypeName","src":"2376:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7132,"name":"b","nodeType":"VariableDeclaration","scope":7152,"src":"2387:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7131,"name":"uint256","nodeType":"ElementaryTypeName","src":"2387:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2375:22:31"},"payable":false,"returnParameters":{"id":7136,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7135,"name":"c","nodeType":"VariableDeclaration","scope":7152,"src":"2421:9:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7134,"name":"uint256","nodeType":"ElementaryTypeName","src":"2421:7:31","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2420:11:31"},"scope":7189,"src":"2363:123:31","stateMutability":"pure","superFunction":null,"visibility":"internal"},{"body":{"id":7187,"nodeType":"Block","src":"2622:72:31","statements":[{"expression":{"argumentTypes":null,"id":7165,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":7161,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7159,"src":"2628:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7162,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7154,"src":"2632:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":7163,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7156,"src":"2636:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2632:5:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2628:9:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":7166,"nodeType":"ExpressionStatement","src":"2628:9:31"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7184,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7174,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7168,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7156,"src":"2651:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7169,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2656:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2651:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7173,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7171,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7159,"src":"2661:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":7172,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7154,"src":"2666:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2661:6:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2651:16:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7175,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2650:18:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":7182,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7178,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7176,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7156,"src":"2673:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":7177,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2677:1:31","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2673:5:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":7181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7179,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7159,"src":"2682:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":7180,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7154,"src":"2686:1:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2682:5:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2673:14:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":7183,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2672:16:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2650:38:31","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7167,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7611,"src":"2643:6:31","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7185,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2643:46:31","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7186,"nodeType":"ExpressionStatement","src":"2643:46:31"}]},"documentation":"@dev Adds two signed integers, throws on overflow.","id":7188,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"add","nodeType":"FunctionDefinition","parameters":{"id":7157,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7154,"name":"a","nodeType":"VariableDeclaration","scope":7188,"src":"2569:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7153,"name":"int256","nodeType":"ElementaryTypeName","src":"2569:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":7156,"name":"b","nodeType":"VariableDeclaration","scope":7188,"src":"2579:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7155,"name":"int256","nodeType":"ElementaryTypeName","src":"2579:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2568:20:31"},"payable":false,"returnParameters":{"id":7160,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7159,"name":"c","nodeType":"VariableDeclaration","scope":7188,"src":"2612:8:31","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":7158,"name":"int256","nodeType":"ElementaryTypeName","src":"2612:6:31","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"2611:10:31"},"scope":7189,"src":"2556:138:31","stateMutability":"pure","superFunction":null,"visibility":"internal"}],"scope":7190,"src":"117:2579:31"}],"src":"0:2697:31"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.048Z"}; /***/ }), @@ -385,10 +648,32 @@ module.exports = {"contract_name":"OutcomeToken","abi":[{"constant":false,"input /*!*******************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/ScalarEvent.json ***! \*******************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"ScalarEvent","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":"LONG","outputs":[{"name":"","type":"uint8"}],"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"},{"constant":true,"inputs":[],"name":"OUTCOME_RANGE","outputs":[{"name":"","type":"uint24"}],"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":"lowerBound","outputs":[{"name":"","type":"int256"}],"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":"SHORT","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"upperBound","outputs":[{"name":"","type":"int256"}],"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"}],"bytecode":"0x608060405234801561001057600080fd5b50611834806100206000396000f300608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d1461010c57806327793f871461012357806328da850b1461014e578063561cce0a1461017b57806369c19d4c146101ac5780636e5452fe146102445780636fb1edcd146102795780637dc0d1d0146102a65780637dc8f086146102fd5780638abe59ea1461032e578063a384d6ff1461039b578063a619486e146103c6578063a871da911461041d578063ad0b2bec1461044e578063b09ad8a014610479578063b2016bd4146104a4578063ccdf68f3146104fb578063e96e59501461052a578063f21a14681461055d575b600080fd5b34801561011857600080fd5b506101216105c9565b005b34801561012f57600080fd5b506101386107cb565b6040518082815260200191505060405180910390f35b34801561015a57600080fd5b50610179600480360381019080803590602001909291905050506107d1565b005b34801561018757600080fd5b50610190610a7d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156101b857600080fd5b506101ed600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a82565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610230578082015181840152602081019050610215565b505050509050019250505060405180910390f35b34801561025057600080fd5b50610259610c12565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561028557600080fd5b506102a460048036038101908080359060200190929190505050610c19565b005b3480156102b257600080fd5b506102bb610e90565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561030957600080fd5b50610312610eb6565b604051808260ff1660ff16815260200191505060405180910390f35b34801561033a57600080fd5b5061035960048036038101908080359060200190929190505050610ec3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103a757600080fd5b506103b0610f01565b6040518082815260200191505060405180910390f35b3480156103d257600080fd5b506103db610f07565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561042957600080fd5b50610432610f2c565b604051808260ff1660ff16815260200191505060405180910390f35b34801561045a57600080fd5b50610463610f31565b6040518082815260200191505060405180910390f35b34801561048557600080fd5b5061048e611588565b6040518082815260200191505060405180910390f35b3480156104b057600080fd5b506104b961158e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561050757600080fd5b506105106115b4565b604051808215151515815260200191505060405180910390f35b34801561053657600080fd5b5061053f6115c7565b60405180826000191660001916815260200191505060405180910390f35b34801561056957600080fd5b50610572611726565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156105b557808201518184015260208101905061059a565b505050509050019250505060405180910390f35b600260149054906101000a900460ff161580156106a35750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561066757600080fd5b505af115801561067b573d6000803e3d6000fd5b505050506040513d602081101561069157600080fd5b81019080805190602001909291905050505b15156106ae57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561073457600080fd5b505af1158015610748573d6000803e3d6000fd5b505050506040513d602081101561075e57600080fd5b81019080805190602001909291905050506003819055506001600260146101000a81548160ff0219169083151502179055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb716003546040518082815260200191505060405180910390a1565b60035481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156108cc57600080fd5b505af11580156108e0573d6000803e3d6000fd5b505050506040513d60208110156108f657600080fd5b8101908080519060200190929190505050151561091257600080fd5b600090505b6004805490508160ff161015610a2b5760048160ff1681548110151561093957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663867904b433846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610a0657600080fd5b505af1158015610a1a573d6000803e3d6000fd5b505050508080600101915050610917565b3373ffffffffffffffffffffffffffffffffffffffff167fad2a02292986148558019ae4abf172732228e32e131a91d3fa7e0cada61932c0836040518082815260200191505060405180910390a25050565b600181565b60606000600480549050604051908082528060200260200182016040528015610aba5781602001602082028038833980820191505090505b509150600090505b81518160ff161015610c0c5760048160ff16815481101515610ae057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610ba557600080fd5b505af1158015610bb9573d6000803e3d6000fd5b505050506040513d6020811015610bcf57600080fd5b8101908080519060200190929190505050828260ff16815181101515610bf157fe5b90602001906020020181815250508080600101915050610ac2565b50919050565b620f424081565b60008090505b6004805490508160ff161015610d335760048160ff16815481101515610c4157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610d0e57600080fd5b505af1158015610d22573d6000803e3d6000fd5b505050508080600101915050610c1f565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610df857600080fd5b505af1158015610e0c573d6000803e3d6000fd5b505050506040513d6020811015610e2257600080fd5b81019080805190602001909291905050501515610e3e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7ac9271efd660c24459c447459e46f7366d2b4a692e572f108619d0d7273fcc5836040518082815260200191505060405180910390a25050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600480549050905090565b600481815481101515610ed257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081565b600080600080600080600260149054906101000a900460ff161515610f5557600080fd5b6005546003541215610f6a5760009450610fa7565b6006546003541315610f8157620f42409450610fa6565b6005546006540360055460035403620f424062ffffff1602811515610fa257fe5b0594505b5b84620f42400362ffffff16935083620f424062ffffff160392506004600060ff16815481101515610fd457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561109957600080fd5b505af11580156110ad573d6000803e3d6000fd5b505050506040513d60208110156110c357600080fd5b810190808051906020019092919050505091506004600160ff168154811015156110e957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156111ae57600080fd5b505af11580156111c2573d6000803e3d6000fd5b505050506040513d60208110156111d857600080fd5b81019080805190602001909291905050509050620f424062ffffff1661122b61120a85846117b490919063ffffffff16565b61121d87866117b490919063ffffffff16565b6117ec90919063ffffffff16565b81151561123457fe5b0495506004600060ff1681548110151561124a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561131757600080fd5b505af115801561132b573d6000803e3d6000fd5b505050506004600160ff1681548110151561134257fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156114ec57600080fd5b505af1158015611500573d6000803e3d6000fd5b505050506040513d602081101561151657600080fd5b8101908080519060200190929190505050151561153257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f2fe921bb50a459800ae7eae7c0124e9e875094a539eb7dc5b3f728017347e0fb876040518082815260200191505060405180910390a2505050505090565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600554600654604051602001808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018381526020018281526020019450505050506040516020818303038152906040526040518082805190602001908083835b6020831015156116f457805182526020820191506020810190506020830392506116cf565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020905090565b606060048054806020026020016040519081016040528092919081815260200182805480156117aa57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611760575b5050505050905090565b6000808314156117c757600090506117e6565b81830290508183828115156117d857fe5b041415156117e257fe5b8090505b92915050565b600081830190508281101515156117ff57fe5b809050929150505600a165627a7a723058204215cf299e935dfebc0b92fe7f24d4b97957bc2c3c31d70059536873116a1fe00029","deployedBytecode":"0x608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630537665d1461010c57806327793f871461012357806328da850b1461014e578063561cce0a1461017b57806369c19d4c146101ac5780636e5452fe146102445780636fb1edcd146102795780637dc0d1d0146102a65780637dc8f086146102fd5780638abe59ea1461032e578063a384d6ff1461039b578063a619486e146103c6578063a871da911461041d578063ad0b2bec1461044e578063b09ad8a014610479578063b2016bd4146104a4578063ccdf68f3146104fb578063e96e59501461052a578063f21a14681461055d575b600080fd5b34801561011857600080fd5b506101216105c9565b005b34801561012f57600080fd5b506101386107cb565b6040518082815260200191505060405180910390f35b34801561015a57600080fd5b50610179600480360381019080803590602001909291905050506107d1565b005b34801561018757600080fd5b50610190610a7d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156101b857600080fd5b506101ed600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a82565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610230578082015181840152602081019050610215565b505050509050019250505060405180910390f35b34801561025057600080fd5b50610259610c12565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561028557600080fd5b506102a460048036038101908080359060200190929190505050610c19565b005b3480156102b257600080fd5b506102bb610e90565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561030957600080fd5b50610312610eb6565b604051808260ff1660ff16815260200191505060405180910390f35b34801561033a57600080fd5b5061035960048036038101908080359060200190929190505050610ec3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103a757600080fd5b506103b0610f01565b6040518082815260200191505060405180910390f35b3480156103d257600080fd5b506103db610f07565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561042957600080fd5b50610432610f2c565b604051808260ff1660ff16815260200191505060405180910390f35b34801561045a57600080fd5b50610463610f31565b6040518082815260200191505060405180910390f35b34801561048557600080fd5b5061048e611588565b6040518082815260200191505060405180910390f35b3480156104b057600080fd5b506104b961158e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561050757600080fd5b506105106115b4565b604051808215151515815260200191505060405180910390f35b34801561053657600080fd5b5061053f6115c7565b60405180826000191660001916815260200191505060405180910390f35b34801561056957600080fd5b50610572611726565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156105b557808201518184015260208101905061059a565b505050509050019250505060405180910390f35b600260149054906101000a900460ff161580156106a35750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561066757600080fd5b505af115801561067b573d6000803e3d6000fd5b505050506040513d602081101561069157600080fd5b81019080805190602001909291905050505b15156106ae57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561073457600080fd5b505af1158015610748573d6000803e3d6000fd5b505050506040513d602081101561075e57600080fd5b81019080805190602001909291905050506003819055506001600260146101000a81548160ff0219169083151502179055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb716003546040518082815260200191505060405180910390a1565b60035481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156108cc57600080fd5b505af11580156108e0573d6000803e3d6000fd5b505050506040513d60208110156108f657600080fd5b8101908080519060200190929190505050151561091257600080fd5b600090505b6004805490508160ff161015610a2b5760048160ff1681548110151561093957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663867904b433846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610a0657600080fd5b505af1158015610a1a573d6000803e3d6000fd5b505050508080600101915050610917565b3373ffffffffffffffffffffffffffffffffffffffff167fad2a02292986148558019ae4abf172732228e32e131a91d3fa7e0cada61932c0836040518082815260200191505060405180910390a25050565b600181565b60606000600480549050604051908082528060200260200182016040528015610aba5781602001602082028038833980820191505090505b509150600090505b81518160ff161015610c0c5760048160ff16815481101515610ae057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610ba557600080fd5b505af1158015610bb9573d6000803e3d6000fd5b505050506040513d6020811015610bcf57600080fd5b8101908080519060200190929190505050828260ff16815181101515610bf157fe5b90602001906020020181815250508080600101915050610ac2565b50919050565b620f424081565b60008090505b6004805490508160ff161015610d335760048160ff16815481101515610c4157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610d0e57600080fd5b505af1158015610d22573d6000803e3d6000fd5b505050508080600101915050610c1f565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610df857600080fd5b505af1158015610e0c573d6000803e3d6000fd5b505050506040513d6020811015610e2257600080fd5b81019080805190602001909291905050501515610e3e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7ac9271efd660c24459c447459e46f7366d2b4a692e572f108619d0d7273fcc5836040518082815260200191505060405180910390a25050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600480549050905090565b600481815481101515610ed257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081565b600080600080600080600260149054906101000a900460ff161515610f5557600080fd5b6005546003541215610f6a5760009450610fa7565b6006546003541315610f8157620f42409450610fa6565b6005546006540360055460035403620f424062ffffff1602811515610fa257fe5b0594505b5b84620f42400362ffffff16935083620f424062ffffff160392506004600060ff16815481101515610fd457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561109957600080fd5b505af11580156110ad573d6000803e3d6000fd5b505050506040513d60208110156110c357600080fd5b810190808051906020019092919050505091506004600160ff168154811015156110e957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156111ae57600080fd5b505af11580156111c2573d6000803e3d6000fd5b505050506040513d60208110156111d857600080fd5b81019080805190602001909291905050509050620f424062ffffff1661122b61120a85846117b490919063ffffffff16565b61121d87866117b490919063ffffffff16565b6117ec90919063ffffffff16565b81151561123457fe5b0495506004600060ff1681548110151561124a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561131757600080fd5b505af115801561132b573d6000803e3d6000fd5b505050506004600160ff1681548110151561134257fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156114ec57600080fd5b505af1158015611500573d6000803e3d6000fd5b505050506040513d602081101561151657600080fd5b8101908080519060200190929190505050151561153257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f2fe921bb50a459800ae7eae7c0124e9e875094a539eb7dc5b3f728017347e0fb876040518082815260200191505060405180910390a2505050505090565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600554600654604051602001808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018381526020018281526020019450505050506040516020818303038152906040526040518082805190602001908083835b6020831015156116f457805182526020820191506020810190506020830392506116cf565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020905090565b606060048054806020026020016040519081016040528092919081815260200182805480156117aa57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611760575b5050505050905090565b6000808314156117c757600090506117e6565b81830290508183828115156117d857fe5b041415156117e257fe5b8090505b92915050565b600081830190508281101515156117ff57fe5b809050929150505600a165627a7a723058204215cf299e935dfebc0b92fe7f24d4b97957bc2c3c31d70059536873116a1fe00029","sourceMap":"1790:1913:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1790:1913:3;;;;;;;","deployedSourceMap":"1790:1913:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2353:328:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2353:328:1;;;;;;749:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;749:18:1;;;;;;;;;;;;;;;;;;;;;;;1207:466;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1207:466:1;;;;;;;;;;;;;;;;;;;;;;;;;;215:30:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;215:30:3;;;;;;;;;;;;;;;;;;;;;;;;;;;3208:355:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3208:355:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;3208:355:1;;;;;;;;;;;;;;;;;251:46:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;251:46:3;;;;;;;;;;;;;;;;;;;;;;;;;;;1856:451:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1856:451:1;;;;;;;;;;;;;;;;;;;;;;;;;;693:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;693:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;2752:134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2752:134:1;;;;;;;;;;;;;;;;;;;;;;;;;;;773:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;773:35:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;335:21:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;335:21:3;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;178:31:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;178:31:3;;;;;;;;;;;;;;;;;;;;;;;;;;;2030:1409;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2030:1409:3;;;;;;;;;;;;;;;;;;;;;;;362:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;362:21:3;;;;;;;;;;;;;;;;;;;;;;;659:28:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;659:28:1;;;;;;;;;;;;;;;;;;;;;;;;;;;719:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;719:24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;3519:182:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3519:182:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2965:130:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2965:130:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;2965:130:1;;;;;;;;;;;;;;;;;2353:328;2496:12;;;;;;;;;;;2495:13;:38;;;;;2512:6;;;;;;;;;;;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2512:21:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2512:21:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2512:21:1;;;;;;;;;;;;;;;;2495:38;2487:47;;;;;;;;2585:6;;;;;;;;;;;:17;;;:19;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2585:19:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2585:19:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2585:19:1;;;;;;;;;;;;;;;;2575:7;:29;;;;2629:4;2614:12;;:19;;;;;;;;;;;;;;;;;;2648:26;2666:7;;2648:26;;;;;;;;;;;;;;;;;;2353:328::o;749:18::-;;;;:::o;1207:466::-;1482:7;1352:15;;;;;;;;;;;:28;;;1381:10;1393:4;1399:20;1352:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1352:68:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1352:68:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1352:68:1;;;;;;;;;;;;;;;;1344:77;;;;;;;;1492:1;1482:11;;1477:117;1499:13;:20;;;;1495:1;:24;;;1477:117;;;1538:13;1552:1;1538:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:22;;;1561:10;1573:20;1538:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1538:56:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1538:56:1;;;;1521:3;;;;;;;1477:117;;;1633:10;1609:57;;;1645:20;1609:57;;;;;;;;;;;;;;;;;;1207:466;;:::o;215:30:3:-;244:1;215:30;:::o;3208:355:1:-;3305:31;3426:7;3390:13;:20;;;;3379: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;3379:32:1;;;;3352:59;;3436:1;3426:11;;3421:135;3443:24;:31;3439:1;:35;;;3421:135;;;3523:13;3537:1;3523:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;3550:5;3523:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3523:33:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3523:33:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3523:33:1;;;;;;;;;;;;;;;;3493:24;3518:1;3493:27;;;;;;;;;;;;;;;;;;;:63;;;;;3476:3;;;;;;;3421:135;;;3208:355;;;;:::o;251:46:3:-;290:7;251:46;:::o;1856:451:1:-;1997:7;2007:1;1997:11;;1992:115;2014:13;:20;;;;2010:1;:24;;;1992:115;;;2053:13;2067:1;2053:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:23;;;2077:10;2089:17;2053:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2053:54:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2053:54:1;;;;2036:3;;;;;;;1992:115;;;2173:15;;;;;;;;;;;:24;;;2198:10;2210:17;2173:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2173:55:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2173:55:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2173:55:1;;;;;;;;;;;;;;;;2165:64;;;;;;;;2270:10;2244:56;;;2282:17;2244:56;;;;;;;;;;;;;;;;;;1856:451;;:::o;693:20::-;;;;;;;;;;;;;:::o;2752:134::-;2824:5;2858:13;:20;;;;2845:34;;2752:134;:::o;773:35::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;335:21:3:-;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;178:31:3:-;208:1;178:31;:::o;2030:1409::-;2088:13;2219:30;2700:16;2768:15;2823:27;2905:26;2166:12;;;;;;;;;;;2158:21;;;;;;;;2326:10;;2316:7;;:20;2312:378;;;2376:1;2350:27;;2312:378;;;2460:10;;2450:7;;:20;2446:244;;;290:7;2484:39;;2446:244;;;2678:10;;2665;;:23;2650:10;;2640:7;;:20;290:7;2623:38;;;:66;;;;;;;;2590:100;;2446:244;2312:378;2735:23;290:7;2719:39;2700:58;;;;2802:11;290:7;2786:27;;;2768:45;;2853:13;208:1;2853:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:30;;;2884:10;2853:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2853:42:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2853:42:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2853:42:3;;;;;;;;;;;;;;;;2823:72;;2934:13;244:1;2934:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:29;;;2964:10;2934:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2934:41:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2934:41:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2934:41:3;;;;;;;;;;;;;;;;2905:70;;290:7;2996:98;;:82;3040:37;3066:10;3040:21;:25;;:37;;;;:::i;:::-;2996:39;3023:11;2996:22;:26;;:39;;;;:::i;:::-;:43;;:82;;;;:::i;:::-;:98;;;;;;;;2985:109;;3141:13;208:1;3141:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:27;;;3169:10;3181:22;3141:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3141:63:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3141:63:3;;;;3214:13;244:1;3214:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;3241:10;3253:21;3214:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3214:61:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3214:61:3;;;;3330:15;;;;;;;;;;;:24;;;3355:10;3367:8;3330:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3330:46:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3330:46:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3330:46:3;;;;;;;;;;;;;;;;3322:55;;;;;;;;3411:10;3392:40;;;3423:8;3392:40;;;;;;;;;;;;;;;;;;2030:1409;;;;;;:::o;362:21::-;;;;:::o;659:28:1:-;;;;;;;;;;;;;:::o;719:24::-;;;;;;;;;;;;;:::o;3519:182:3:-;3588:7;3645:15;;;;;;;;;;;3662:6;;;;;;;;;;;3670:10;;3682;;3628:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3628:65:3;;;3618:76;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;3618:76:3;;;;;;;;;;;;;;;;3611:83;;3519:182;:::o;2965:130:1:-;3038:14;3075:13;3068:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2965:130;:::o;273:373:31:-;331:9;562:1;557;:6;553:35;;;580:1;573:8;;;;553:35;602:1;598;:5;594:9;;625:1;620;616;:5;;;;;;;;:10;609:18;;;;;;640:1;633:8;;273:373;;;;;:::o;2363:123::-;2421:9;2446:1;2442;:5;2438:9;;2465:1;2460;:6;;2453:14;;;;;;2480:1;2473:8;;2363:123;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Events/Event.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract ScalarEventData {\n\n /*\n * Constants\n */\n uint8 public constant SHORT = 0;\n uint8 public constant LONG = 1;\n uint24 public constant OUTCOME_RANGE = 1000000;\n\n /*\n * Storage\n */\n int public lowerBound;\n int public upperBound;\n}\n\ncontract ScalarEventProxy is Proxy, EventData, ScalarEventData {\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 _lowerBound Lower bound for event outcome\n /// @param _upperBound Lower bound for event outcome\n constructor(\n address proxied,\n address outcomeTokenMasterCopy,\n ERC20 _collateralToken,\n Oracle _oracle,\n int _lowerBound,\n int _upperBound\n )\n Proxy(proxied)\n public\n {\n // Validate input\n require(address(_collateralToken) != 0 && address(_oracle) != 0);\n collateralToken = _collateralToken;\n oracle = _oracle;\n // Create an outcome token for each outcome\n for (uint8 i = 0; i < 2; i++) {\n OutcomeToken outcomeToken = OutcomeToken(new OutcomeTokenProxy(outcomeTokenMasterCopy));\n outcomeTokens.push(outcomeToken);\n emit OutcomeTokenCreation(outcomeToken, i);\n }\n\n // Validate bounds\n require(_upperBound > _lowerBound);\n lowerBound = _lowerBound;\n upperBound = _upperBound;\n }\n}\n\n/// @title Scalar event contract - Scalar events resolve to a number within a range\n/// @author Stefan George - \ncontract ScalarEvent is Proxied, Event, ScalarEventData {\n using SafeMath for *;\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 uint24 convertedWinningOutcome;\n // Outcome is lower than defined lower bound\n if (outcome < lowerBound)\n convertedWinningOutcome = 0;\n // Outcome is higher than defined upper bound\n else if (outcome > upperBound)\n convertedWinningOutcome = OUTCOME_RANGE;\n // Map outcome to outcome range\n else\n convertedWinningOutcome = uint24(OUTCOME_RANGE * (outcome - lowerBound) / (upperBound - lowerBound));\n uint factorShort = OUTCOME_RANGE - convertedWinningOutcome;\n uint factorLong = OUTCOME_RANGE - factorShort;\n uint shortOutcomeTokenCount = outcomeTokens[SHORT].balanceOf(msg.sender);\n uint longOutcomeTokenCount = outcomeTokens[LONG].balanceOf(msg.sender);\n winnings = shortOutcomeTokenCount.mul(factorShort).add(longOutcomeTokenCount.mul(factorLong)) / OUTCOME_RANGE;\n // Revoke all outcome tokens\n outcomeTokens[SHORT].revoke(msg.sender, shortOutcomeTokenCount);\n outcomeTokens[LONG].revoke(msg.sender, longOutcomeTokenCount);\n // Payout winnings to sender\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, lowerBound, upperBound));\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","exportedSymbols":{"ScalarEvent":[840],"ScalarEventData":[596],"ScalarEventProxy":[690]},"id":841,"nodeType":"SourceUnit","nodes":[{"id":580,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":581,"nodeType":"ImportDirective","scope":841,"sourceUnit":385,"src":"25:29:3","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":582,"nodeType":"ImportDirective","scope":841,"sourceUnit":6702,"src":"55:55:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":596,"linearizedBaseContracts":[596],"name":"ScalarEventData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":585,"name":"SHORT","nodeType":"VariableDeclaration","scope":596,"src":"178:31:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":583,"name":"uint8","nodeType":"ElementaryTypeName","src":"178:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"30","id":584,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"208:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"visibility":"public"},{"constant":true,"id":588,"name":"LONG","nodeType":"VariableDeclaration","scope":596,"src":"215:30:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":586,"name":"uint8","nodeType":"ElementaryTypeName","src":"215:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":587,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"244:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":true,"id":591,"name":"OUTCOME_RANGE","nodeType":"VariableDeclaration","scope":596,"src":"251:46:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":589,"name":"uint24","nodeType":"ElementaryTypeName","src":"251:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":590,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"290:7:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":593,"name":"lowerBound","nodeType":"VariableDeclaration","scope":596,"src":"335:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":592,"name":"int","nodeType":"ElementaryTypeName","src":"335:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":595,"name":"upperBound","nodeType":"VariableDeclaration","scope":596,"src":"362:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":594,"name":"int","nodeType":"ElementaryTypeName","src":"362:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"}],"scope":841,"src":"113:273:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":597,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"417:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":598,"nodeType":"InheritanceSpecifier","src":"417:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":599,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"424:9:3","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":600,"nodeType":"InheritanceSpecifier","src":"424:9:3"},{"arguments":null,"baseName":{"contractScope":null,"id":601,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"435:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":602,"nodeType":"InheritanceSpecifier","src":"435:15:3"}],"contractDependencies":[198,596,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":690,"linearizedBaseContracts":[690,596,198,6701,6673],"name":"ScalarEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":688,"nodeType":"Block","src":"1033:622:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":631,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":622,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1085:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":621,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":623,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:25:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":624,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1106:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1077:30:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":627,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1119:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":626,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1111:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":628,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1111:16:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":629,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1131:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1111:21:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1077:55:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":620,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1069:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":632,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1069:64:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":633,"nodeType":"ExpressionStatement","src":"1069:64:3"},{"expression":{"argumentTypes":null,"id":636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":634,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1143:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":635,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1161:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"1143:34:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":637,"nodeType":"ExpressionStatement","src":"1143:34:3"},{"expression":{"argumentTypes":null,"id":640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":638,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"1187:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":639,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1196:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"1187:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":641,"nodeType":"ExpressionStatement","src":"1187:16:3"},{"body":{"id":672,"nodeType":"Block","src":"1295:214:3","statements":[{"assignments":[653],"declarations":[{"constant":false,"id":653,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":689,"src":"1309:25:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":652,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"1309:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":660,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":657,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":606,"src":"1372:22:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":656,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1350:21:3","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":655,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"1354:17:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1350:45:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":654,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"1337:12:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":659,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1337:59:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"1309:87:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":664,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1429:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":661,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1410:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":663,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1410:18:3","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":665,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1410:32:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":666,"nodeType":"ExpressionStatement","src":"1410:32:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":668,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1482:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":669,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1496:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":667,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1461:20:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1461:37:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":671,"nodeType":"EmitStatement","src":"1456:42:3"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1283:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"32","id":647,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1287:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1283:5:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":673,"initializationExpression":{"assignments":[643],"declarations":[{"constant":false,"id":643,"name":"i","nodeType":"VariableDeclaration","scope":689,"src":"1270:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":642,"name":"uint8","nodeType":"ElementaryTypeName","src":"1270:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1280:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1270:11:3"},"loopExpression":{"expression":{"argumentTypes":null,"id":650,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1290:3:3","subExpression":{"argumentTypes":null,"id":649,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1290:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":651,"nodeType":"ExpressionStatement","src":"1290:3:3"},"nodeType":"ForStatement","src":"1265:244:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":677,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":675,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1554:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":676,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1568:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1554:25:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":674,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1546:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":678,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1546:34:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":679,"nodeType":"ExpressionStatement","src":"1546:34:3"},{"expression":{"argumentTypes":null,"id":682,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":680,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"1590:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":681,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1603:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1590:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":683,"nodeType":"ExpressionStatement","src":"1590:24:3"},{"expression":{"argumentTypes":null,"id":686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":684,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"1624:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":685,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1637:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1624:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":687,"nodeType":"ExpressionStatement","src":"1624:24:3"}]},"documentation":"@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 _lowerBound Lower bound for event outcome\n @param _upperBound Lower bound for event outcome","id":689,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":617,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":604,"src":"1005:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":618,"modifierName":{"argumentTypes":null,"id":616,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"999:5:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"999:14:3"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":615,"nodeType":"ParameterList","parameters":[{"constant":false,"id":604,"name":"proxied","nodeType":"VariableDeclaration","scope":689,"src":"823:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":603,"name":"address","nodeType":"ElementaryTypeName","src":"823:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":606,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":689,"src":"848:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":605,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":608,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":689,"src":"888:22:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":607,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"888:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":610,"name":"_oracle","nodeType":"VariableDeclaration","scope":689,"src":"920:14:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":609,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"920:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":612,"name":"_lowerBound","nodeType":"VariableDeclaration","scope":689,"src":"944:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":611,"name":"int","nodeType":"ElementaryTypeName","src":"944:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":614,"name":"_upperBound","nodeType":"VariableDeclaration","scope":689,"src":"969:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":613,"name":"int","nodeType":"ElementaryTypeName","src":"969:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"813:177:3"},"payable":false,"returnParameters":{"id":619,"nodeType":"ParameterList","parameters":[],"src":"1033:0:3"},"scope":690,"src":"802:853:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":841,"src":"388:1269:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":691,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1814:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":692,"nodeType":"InheritanceSpecifier","src":"1814:7:3"},{"arguments":null,"baseName":{"contractScope":null,"id":693,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1823:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":694,"nodeType":"InheritanceSpecifier","src":"1823:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":695,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"1830:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":696,"nodeType":"InheritanceSpecifier","src":"1830:15:3"}],"contractDependencies":[198,384,596,6673],"contractKind":"contract","documentation":"@title Scalar event contract - Scalar events resolve to a number within a range\n @author Stefan George - ","fullyImplemented":true,"id":840,"linearizedBaseContracts":[840,596,384,198,6673],"name":"ScalarEvent","nodeType":"ContractDefinition","nodes":[{"id":698,"libraryName":{"contractScope":null,"id":697,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1858:8:3","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1852:21:3","typeName":null},{"body":{"id":822,"nodeType":"Block","src":"2107:1332:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":704,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2166:12:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":703,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2158:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":705,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:21:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":706,"nodeType":"ExpressionStatement","src":"2158:21:3"},{"assignments":[],"declarations":[{"constant":false,"id":708,"name":"convertedWinningOutcome","nodeType":"VariableDeclaration","scope":823,"src":"2219:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":707,"name":"uint24","nodeType":"ElementaryTypeName","src":"2219:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"id":709,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2219:30:3"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":710,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2316:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":711,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2326:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2316:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":719,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":717,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2450:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":718,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2460:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2450:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":738,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":724,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2590:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":736,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":726,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2623:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":727,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2640:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":728,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2650:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2640:20:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":730,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2639:22:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:38:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":734,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":732,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2665:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":733,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2678:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2665:23:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":735,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2664:25:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:66:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":725,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2616:6:3","typeDescriptions":{"typeIdentifier":"t_type$_t_uint24_$","typeString":"type(uint24)"},"typeName":"uint24"},"id":737,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2616:74:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2590:100:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":739,"nodeType":"ExpressionStatement","src":"2590:100:3"},"id":740,"nodeType":"IfStatement","src":"2446:244:3","trueBody":{"expression":{"argumentTypes":null,"id":722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":720,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2484:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":721,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2510:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2484:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":723,"nodeType":"ExpressionStatement","src":"2484:39:3"}},"id":741,"nodeType":"IfStatement","src":"2312:378:3","trueBody":{"expression":{"argumentTypes":null,"id":715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":713,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2350:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":714,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2376:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2350:27:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":716,"nodeType":"ExpressionStatement","src":"2350:27:3"}},{"assignments":[743],"declarations":[{"constant":false,"id":743,"name":"factorShort","nodeType":"VariableDeclaration","scope":823,"src":"2700:16:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":742,"name":"uint","nodeType":"ElementaryTypeName","src":"2700:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":747,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":744,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2719:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":745,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2735:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2719:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"VariableDeclarationStatement","src":"2700:58:3"},{"assignments":[749],"declarations":[{"constant":false,"id":749,"name":"factorLong","nodeType":"VariableDeclaration","scope":823,"src":"2768:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":748,"name":"uint","nodeType":"ElementaryTypeName","src":"2768:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":753,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":752,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":750,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2786:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":751,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"2802:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2786:27:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2768:45:3"},{"assignments":[755],"declarations":[{"constant":false,"id":755,"name":"shortOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2823:27:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":754,"name":"uint","nodeType":"ElementaryTypeName","src":"2823:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":763,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":760,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2884:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":761,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2884:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":756,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2853:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":758,"indexExpression":{"argumentTypes":null,"id":757,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"2867:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2853:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":759,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2853:30:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":762,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2853:42:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2823:72:3"},{"assignments":[765],"declarations":[{"constant":false,"id":765,"name":"longOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2905:26:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":764,"name":"uint","nodeType":"ElementaryTypeName","src":"2905:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":773,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":770,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2964:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2964:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":766,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2934:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":768,"indexExpression":{"argumentTypes":null,"id":767,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"2948:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2934:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":769,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2934:29:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":772,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2934:41:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2905:70:3"},{"expression":{"argumentTypes":null,"id":787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":774,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"2985:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":786,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":782,"name":"factorLong","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":749,"src":"3066:10:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":780,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3040:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"3040:25:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":783,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3040:37:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":777,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"3023:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":775,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"2996:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":776,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"2996:26:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":778,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:39:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"2996:43:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:82:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":785,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"3081:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2996:98:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2985:109:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":788,"nodeType":"ExpressionStatement","src":"2985:109:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":793,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3169:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":794,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3169:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":795,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"3181:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":789,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3141:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":791,"indexExpression":{"argumentTypes":null,"id":790,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"3155:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3141:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3141:27:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3141:63:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":797,"nodeType":"ExpressionStatement","src":"3141:63:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":802,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3241:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":803,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3241:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":804,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3253:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":798,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3214:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":800,"indexExpression":{"argumentTypes":null,"id":799,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"3228:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3214:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":801,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3214:26:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:61:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":806,"nodeType":"ExpressionStatement","src":"3214:61:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":810,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3355:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":811,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3355:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":812,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3367:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":808,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3330:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3330:24:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":813,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3330:46:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3322:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":814,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3322:55:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":815,"nodeType":"ExpressionStatement","src":"3322:55:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":817,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3411:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":818,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3411:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":819,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3423:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":816,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"3392:18:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":820,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3392:40:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":821,"nodeType":"EmitStatement","src":"3387:45:3"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":823,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":699,"nodeType":"ParameterList","parameters":[],"src":"2053:2:3"},"payable":false,"returnParameters":{"id":702,"nodeType":"ParameterList","parameters":[{"constant":false,"id":701,"name":"winnings","nodeType":"VariableDeclaration","scope":823,"src":"2088:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":700,"name":"uint","nodeType":"ElementaryTypeName","src":"2088:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2087:15:3"},"scope":840,"src":"2030:1409:3","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":838,"nodeType":"Block","src":"3601:100:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":831,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3645:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":832,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"3662:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":833,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"3670:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":834,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"3682:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":829,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"3628:3:3","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3628:16:3","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":835,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3628:65:3","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":828,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"3618:9:3","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":836,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3618:76:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":827,"id":837,"nodeType":"Return","src":"3611:83:3"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":839,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":824,"nodeType":"ParameterList","parameters":[],"src":"3540:2:3"},"payable":false,"returnParameters":{"id":827,"nodeType":"ParameterList","parameters":[{"constant":false,"id":826,"name":"","nodeType":"VariableDeclaration","scope":839,"src":"3588:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":825,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3588:7:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3587:9:3"},"scope":840,"src":"3519:182:3","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":841,"src":"1790:1913:3"}],"src":"0:3704:3"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","exportedSymbols":{"ScalarEvent":[840],"ScalarEventData":[596],"ScalarEventProxy":[690]},"id":841,"nodeType":"SourceUnit","nodes":[{"id":580,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":581,"nodeType":"ImportDirective","scope":841,"sourceUnit":385,"src":"25:29:3","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":582,"nodeType":"ImportDirective","scope":841,"sourceUnit":6702,"src":"55:55:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":596,"linearizedBaseContracts":[596],"name":"ScalarEventData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":585,"name":"SHORT","nodeType":"VariableDeclaration","scope":596,"src":"178:31:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":583,"name":"uint8","nodeType":"ElementaryTypeName","src":"178:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"30","id":584,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"208:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"visibility":"public"},{"constant":true,"id":588,"name":"LONG","nodeType":"VariableDeclaration","scope":596,"src":"215:30:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":586,"name":"uint8","nodeType":"ElementaryTypeName","src":"215:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":587,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"244:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":true,"id":591,"name":"OUTCOME_RANGE","nodeType":"VariableDeclaration","scope":596,"src":"251:46:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":589,"name":"uint24","nodeType":"ElementaryTypeName","src":"251:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":590,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"290:7:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":593,"name":"lowerBound","nodeType":"VariableDeclaration","scope":596,"src":"335:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":592,"name":"int","nodeType":"ElementaryTypeName","src":"335:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":595,"name":"upperBound","nodeType":"VariableDeclaration","scope":596,"src":"362:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":594,"name":"int","nodeType":"ElementaryTypeName","src":"362:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"}],"scope":841,"src":"113:273:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":597,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"417:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":598,"nodeType":"InheritanceSpecifier","src":"417:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":599,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"424:9:3","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":600,"nodeType":"InheritanceSpecifier","src":"424:9:3"},{"arguments":null,"baseName":{"contractScope":null,"id":601,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"435:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":602,"nodeType":"InheritanceSpecifier","src":"435:15:3"}],"contractDependencies":[198,596,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":690,"linearizedBaseContracts":[690,596,198,6701,6673],"name":"ScalarEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":688,"nodeType":"Block","src":"1033:622:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":631,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":622,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1085:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":621,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":623,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:25:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":624,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1106:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1077:30:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":627,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1119:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":626,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1111:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":628,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1111:16:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":629,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1131:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1111:21:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1077:55:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":620,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1069:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":632,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1069:64:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":633,"nodeType":"ExpressionStatement","src":"1069:64:3"},{"expression":{"argumentTypes":null,"id":636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":634,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1143:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":635,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1161:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"1143:34:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":637,"nodeType":"ExpressionStatement","src":"1143:34:3"},{"expression":{"argumentTypes":null,"id":640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":638,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"1187:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":639,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1196:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"1187:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":641,"nodeType":"ExpressionStatement","src":"1187:16:3"},{"body":{"id":672,"nodeType":"Block","src":"1295:214:3","statements":[{"assignments":[653],"declarations":[{"constant":false,"id":653,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":689,"src":"1309:25:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":652,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"1309:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":660,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":657,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":606,"src":"1372:22:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":656,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1350:21:3","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":655,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"1354:17:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1350:45:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":654,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"1337:12:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":659,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1337:59:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"1309:87:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":664,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1429:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":661,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1410:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":663,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1410:18:3","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":665,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1410:32:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":666,"nodeType":"ExpressionStatement","src":"1410:32:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":668,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1482:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":669,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1496:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":667,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1461:20:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1461:37:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":671,"nodeType":"EmitStatement","src":"1456:42:3"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1283:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"32","id":647,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1287:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1283:5:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":673,"initializationExpression":{"assignments":[643],"declarations":[{"constant":false,"id":643,"name":"i","nodeType":"VariableDeclaration","scope":689,"src":"1270:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":642,"name":"uint8","nodeType":"ElementaryTypeName","src":"1270:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1280:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1270:11:3"},"loopExpression":{"expression":{"argumentTypes":null,"id":650,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1290:3:3","subExpression":{"argumentTypes":null,"id":649,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1290:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":651,"nodeType":"ExpressionStatement","src":"1290:3:3"},"nodeType":"ForStatement","src":"1265:244:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":677,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":675,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1554:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":676,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1568:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1554:25:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":674,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1546:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":678,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1546:34:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":679,"nodeType":"ExpressionStatement","src":"1546:34:3"},{"expression":{"argumentTypes":null,"id":682,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":680,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"1590:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":681,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1603:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1590:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":683,"nodeType":"ExpressionStatement","src":"1590:24:3"},{"expression":{"argumentTypes":null,"id":686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":684,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"1624:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":685,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1637:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1624:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":687,"nodeType":"ExpressionStatement","src":"1624:24:3"}]},"documentation":"@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 _lowerBound Lower bound for event outcome\n @param _upperBound Lower bound for event outcome","id":689,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":617,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":604,"src":"1005:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":618,"modifierName":{"argumentTypes":null,"id":616,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"999:5:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"999:14:3"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":615,"nodeType":"ParameterList","parameters":[{"constant":false,"id":604,"name":"proxied","nodeType":"VariableDeclaration","scope":689,"src":"823:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":603,"name":"address","nodeType":"ElementaryTypeName","src":"823:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":606,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":689,"src":"848:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":605,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":608,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":689,"src":"888:22:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":607,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"888:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":610,"name":"_oracle","nodeType":"VariableDeclaration","scope":689,"src":"920:14:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":609,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"920:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":612,"name":"_lowerBound","nodeType":"VariableDeclaration","scope":689,"src":"944:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":611,"name":"int","nodeType":"ElementaryTypeName","src":"944:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":614,"name":"_upperBound","nodeType":"VariableDeclaration","scope":689,"src":"969:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":613,"name":"int","nodeType":"ElementaryTypeName","src":"969:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"813:177:3"},"payable":false,"returnParameters":{"id":619,"nodeType":"ParameterList","parameters":[],"src":"1033:0:3"},"scope":690,"src":"802:853:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":841,"src":"388:1269:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":691,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1814:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":692,"nodeType":"InheritanceSpecifier","src":"1814:7:3"},{"arguments":null,"baseName":{"contractScope":null,"id":693,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1823:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":694,"nodeType":"InheritanceSpecifier","src":"1823:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":695,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"1830:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":696,"nodeType":"InheritanceSpecifier","src":"1830:15:3"}],"contractDependencies":[198,384,596,6673],"contractKind":"contract","documentation":"@title Scalar event contract - Scalar events resolve to a number within a range\n @author Stefan George - ","fullyImplemented":true,"id":840,"linearizedBaseContracts":[840,596,384,198,6673],"name":"ScalarEvent","nodeType":"ContractDefinition","nodes":[{"id":698,"libraryName":{"contractScope":null,"id":697,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1858:8:3","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1852:21:3","typeName":null},{"body":{"id":822,"nodeType":"Block","src":"2107:1332:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":704,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2166:12:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":703,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2158:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":705,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:21:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":706,"nodeType":"ExpressionStatement","src":"2158:21:3"},{"assignments":[],"declarations":[{"constant":false,"id":708,"name":"convertedWinningOutcome","nodeType":"VariableDeclaration","scope":823,"src":"2219:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":707,"name":"uint24","nodeType":"ElementaryTypeName","src":"2219:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"id":709,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2219:30:3"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":710,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2316:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":711,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2326:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2316:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":719,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":717,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2450:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":718,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2460:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2450:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":738,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":724,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2590:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":736,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":726,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2623:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":727,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2640:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":728,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2650:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2640:20:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":730,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2639:22:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:38:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":734,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":732,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2665:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":733,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2678:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2665:23:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":735,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2664:25:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:66:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":725,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2616:6:3","typeDescriptions":{"typeIdentifier":"t_type$_t_uint24_$","typeString":"type(uint24)"},"typeName":"uint24"},"id":737,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2616:74:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2590:100:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":739,"nodeType":"ExpressionStatement","src":"2590:100:3"},"id":740,"nodeType":"IfStatement","src":"2446:244:3","trueBody":{"expression":{"argumentTypes":null,"id":722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":720,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2484:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":721,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2510:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2484:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":723,"nodeType":"ExpressionStatement","src":"2484:39:3"}},"id":741,"nodeType":"IfStatement","src":"2312:378:3","trueBody":{"expression":{"argumentTypes":null,"id":715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":713,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2350:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":714,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2376:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2350:27:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":716,"nodeType":"ExpressionStatement","src":"2350:27:3"}},{"assignments":[743],"declarations":[{"constant":false,"id":743,"name":"factorShort","nodeType":"VariableDeclaration","scope":823,"src":"2700:16:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":742,"name":"uint","nodeType":"ElementaryTypeName","src":"2700:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":747,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":744,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2719:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":745,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2735:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2719:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"VariableDeclarationStatement","src":"2700:58:3"},{"assignments":[749],"declarations":[{"constant":false,"id":749,"name":"factorLong","nodeType":"VariableDeclaration","scope":823,"src":"2768:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":748,"name":"uint","nodeType":"ElementaryTypeName","src":"2768:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":753,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":752,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":750,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2786:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":751,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"2802:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2786:27:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2768:45:3"},{"assignments":[755],"declarations":[{"constant":false,"id":755,"name":"shortOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2823:27:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":754,"name":"uint","nodeType":"ElementaryTypeName","src":"2823:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":763,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":760,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2884:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":761,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2884:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":756,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2853:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":758,"indexExpression":{"argumentTypes":null,"id":757,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"2867:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2853:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":759,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2853:30:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":762,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2853:42:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2823:72:3"},{"assignments":[765],"declarations":[{"constant":false,"id":765,"name":"longOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2905:26:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":764,"name":"uint","nodeType":"ElementaryTypeName","src":"2905:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":773,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":770,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2964:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2964:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":766,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2934:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":768,"indexExpression":{"argumentTypes":null,"id":767,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"2948:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2934:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":769,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2934:29:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":772,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2934:41:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2905:70:3"},{"expression":{"argumentTypes":null,"id":787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":774,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"2985:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":786,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":782,"name":"factorLong","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":749,"src":"3066:10:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":780,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3040:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"3040:25:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":783,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3040:37:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":777,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"3023:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":775,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"2996:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":776,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"2996:26:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":778,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:39:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"2996:43:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:82:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":785,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"3081:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2996:98:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2985:109:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":788,"nodeType":"ExpressionStatement","src":"2985:109:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":793,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3169:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":794,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3169:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":795,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"3181:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":789,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3141:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":791,"indexExpression":{"argumentTypes":null,"id":790,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"3155:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3141:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3141:27:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3141:63:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":797,"nodeType":"ExpressionStatement","src":"3141:63:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":802,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3241:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":803,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3241:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":804,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3253:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":798,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3214:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":800,"indexExpression":{"argumentTypes":null,"id":799,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"3228:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3214:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":801,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3214:26:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:61:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":806,"nodeType":"ExpressionStatement","src":"3214:61:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":810,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3355:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":811,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3355:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":812,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3367:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":808,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3330:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3330:24:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":813,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3330:46:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3322:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":814,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3322:55:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":815,"nodeType":"ExpressionStatement","src":"3322:55:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":817,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3411:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":818,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3411:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":819,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3423:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":816,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"3392:18:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":820,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3392:40:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":821,"nodeType":"EmitStatement","src":"3387:45:3"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":823,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":699,"nodeType":"ParameterList","parameters":[],"src":"2053:2:3"},"payable":false,"returnParameters":{"id":702,"nodeType":"ParameterList","parameters":[{"constant":false,"id":701,"name":"winnings","nodeType":"VariableDeclaration","scope":823,"src":"2088:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":700,"name":"uint","nodeType":"ElementaryTypeName","src":"2088:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2087:15:3"},"scope":840,"src":"2030:1409:3","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":838,"nodeType":"Block","src":"3601:100:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":831,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3645:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":832,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"3662:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":833,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"3670:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":834,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"3682:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":829,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"3628:3:3","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3628:16:3","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":835,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3628:65:3","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":828,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"3618:9:3","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":836,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3618:76:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":827,"id":837,"nodeType":"Return","src":"3611:83:3"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":839,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":824,"nodeType":"ParameterList","parameters":[],"src":"3540:2:3"},"payable":false,"returnParameters":{"id":827,"nodeType":"ParameterList","parameters":[{"constant":false,"id":826,"name":"","nodeType":"VariableDeclaration","scope":839,"src":"3588:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":825,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3588:7:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3587:9:3"},"scope":840,"src":"3519:182:3","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":841,"src":"1790:1913:3"}],"src":"0:3704:3"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0x447d897a16c8da9bcb3dbfb26959f285b6622efe","transactionHash":"0x32885f760df2465ef299a795c43d50bbc01493c5912ad54260396d187746cdb7"},"3":{"address":"0xe28ad2f23dd0d66bac502e9a1cb2c4ead4120e37","transactionHash":"0x98837529d5077456ba1f26eb4531b72b2ca69df332b9db8a57b90c3b1de9c95a"},"4":{"address":"0x9361de51a5bbc6985796bf6f2e8c9b44d31f30de","transactionHash":"0x4c7cc545c644fe537f66fa4c4637f6c52c471596aa80e9d9209da4d14d6ea74e"},"42":{"address":"0x21c1e0c2a0a7604025be26c3f6efd41a22836fd7","transactionHash":"0x0cfbb858b1709adf43f4573da81603bda7351c9dfca976f605abc6a1c97b9ff0"},"437894314312":{"address":"0x9b1f7f645351af3631a656421ed2e40f2802e6c0","transactionHash":"0xe2b09bde34cfc4f2cd3103f271ecdb770851bcdfac5053c39d9dce1f5e92e7cc"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:47.543Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ScalarEventData.json": +/*!***********************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/ScalarEventData.json ***! + \***********************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"ScalarEvent","abi":[{"constant":false,"inputs":[],"name":"setOutcome","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"collateralTokenCount","type":"uint256"}],"name":"buyAllOutcomes","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"getOutcomeTokenDistribution","outputs":[{"name":"outcomeTokenDistribution","type":"uint256[]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"OUTCOME_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenCount","type":"uint256"}],"name":"sellAllOutcomes","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcomeCount","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"outcomeTokens","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"lowerBound","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"SHORT","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"redeemWinnings","outputs":[{"name":"winnings","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"upperBound","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"collateralToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getEventHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcomeTokens","outputs":[{"name":"","type":"address[]"}],"payable":false,"type":"function"},{"inputs":[{"name":"_collateralToken","type":"address"},{"name":"_oracle","type":"address"},{"name":"_lowerBound","type":"int256"},{"name":"_upperBound","type":"int256"}],"payable":false,"type":"constructor"},{"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"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263313}; +module.exports = {"contractName":"ScalarEventData","abi":[{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OUTCOME_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lowerBound","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SHORT","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"upperBound","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506101a8806100206000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063561cce0a146100725780636e5452fe146100a3578063a384d6ff146100d8578063a871da9114610103578063b09ad8a014610134575b600080fd5b34801561007e57600080fd5b5061008761015f565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100af57600080fd5b506100b8610164565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b3480156100e457600080fd5b506100ed61016b565b6040518082815260200191505060405180910390f35b34801561010f57600080fd5b50610118610171565b604051808260ff1660ff16815260200191505060405180910390f35b34801561014057600080fd5b50610149610176565b6040518082815260200191505060405180910390f35b600181565b620f424081565b60005481565b600081565b600154815600a165627a7a723058202c8ab96d1550fed014ced5ebbf3302ed9c7a6ee8a4b4d2ca027cc1156a292bdb0029","deployedBytecode":"0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063561cce0a146100725780636e5452fe146100a3578063a384d6ff146100d8578063a871da9114610103578063b09ad8a014610134575b600080fd5b34801561007e57600080fd5b5061008761015f565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100af57600080fd5b506100b8610164565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b3480156100e457600080fd5b506100ed61016b565b6040518082815260200191505060405180910390f35b34801561010f57600080fd5b50610118610171565b604051808260ff1660ff16815260200191505060405180910390f35b34801561014057600080fd5b50610149610176565b6040518082815260200191505060405180910390f35b600181565b620f424081565b60005481565b600081565b600154815600a165627a7a723058202c8ab96d1550fed014ced5ebbf3302ed9c7a6ee8a4b4d2ca027cc1156a292bdb0029","sourceMap":"113:273:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;113:273:3;;;;;;;","deployedSourceMap":"113:273:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;215:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;215:30:3;;;;;;;;;;;;;;;;;;;;;;;;;;;251:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;251:46:3;;;;;;;;;;;;;;;;;;;;;;;;;;;335:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;335:21:3;;;;;;;;;;;;;;;;;;;;;;;178:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;178:31:3;;;;;;;;;;;;;;;;;;;;;;;;;;;362:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;362:21:3;;;;;;;;;;;;;;;;;;;;;;;215:30;244:1;215:30;:::o;251:46::-;290:7;251:46;:::o;335:21::-;;;;:::o;178:31::-;208:1;178:31;:::o;362:21::-;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Events/Event.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract ScalarEventData {\n\n /*\n * Constants\n */\n uint8 public constant SHORT = 0;\n uint8 public constant LONG = 1;\n uint24 public constant OUTCOME_RANGE = 1000000;\n\n /*\n * Storage\n */\n int public lowerBound;\n int public upperBound;\n}\n\ncontract ScalarEventProxy is Proxy, EventData, ScalarEventData {\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 _lowerBound Lower bound for event outcome\n /// @param _upperBound Lower bound for event outcome\n constructor(\n address proxied,\n address outcomeTokenMasterCopy,\n ERC20 _collateralToken,\n Oracle _oracle,\n int _lowerBound,\n int _upperBound\n )\n Proxy(proxied)\n public\n {\n // Validate input\n require(address(_collateralToken) != 0 && address(_oracle) != 0);\n collateralToken = _collateralToken;\n oracle = _oracle;\n // Create an outcome token for each outcome\n for (uint8 i = 0; i < 2; i++) {\n OutcomeToken outcomeToken = OutcomeToken(new OutcomeTokenProxy(outcomeTokenMasterCopy));\n outcomeTokens.push(outcomeToken);\n emit OutcomeTokenCreation(outcomeToken, i);\n }\n\n // Validate bounds\n require(_upperBound > _lowerBound);\n lowerBound = _lowerBound;\n upperBound = _upperBound;\n }\n}\n\n/// @title Scalar event contract - Scalar events resolve to a number within a range\n/// @author Stefan George - \ncontract ScalarEvent is Proxied, Event, ScalarEventData {\n using SafeMath for *;\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 uint24 convertedWinningOutcome;\n // Outcome is lower than defined lower bound\n if (outcome < lowerBound)\n convertedWinningOutcome = 0;\n // Outcome is higher than defined upper bound\n else if (outcome > upperBound)\n convertedWinningOutcome = OUTCOME_RANGE;\n // Map outcome to outcome range\n else\n convertedWinningOutcome = uint24(OUTCOME_RANGE * (outcome - lowerBound) / (upperBound - lowerBound));\n uint factorShort = OUTCOME_RANGE - convertedWinningOutcome;\n uint factorLong = OUTCOME_RANGE - factorShort;\n uint shortOutcomeTokenCount = outcomeTokens[SHORT].balanceOf(msg.sender);\n uint longOutcomeTokenCount = outcomeTokens[LONG].balanceOf(msg.sender);\n winnings = shortOutcomeTokenCount.mul(factorShort).add(longOutcomeTokenCount.mul(factorLong)) / OUTCOME_RANGE;\n // Revoke all outcome tokens\n outcomeTokens[SHORT].revoke(msg.sender, shortOutcomeTokenCount);\n outcomeTokens[LONG].revoke(msg.sender, longOutcomeTokenCount);\n // Payout winnings to sender\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, lowerBound, upperBound));\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","exportedSymbols":{"ScalarEvent":[840],"ScalarEventData":[596],"ScalarEventProxy":[690]},"id":841,"nodeType":"SourceUnit","nodes":[{"id":580,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":581,"nodeType":"ImportDirective","scope":841,"sourceUnit":385,"src":"25:29:3","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":582,"nodeType":"ImportDirective","scope":841,"sourceUnit":6702,"src":"55:55:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":596,"linearizedBaseContracts":[596],"name":"ScalarEventData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":585,"name":"SHORT","nodeType":"VariableDeclaration","scope":596,"src":"178:31:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":583,"name":"uint8","nodeType":"ElementaryTypeName","src":"178:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"30","id":584,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"208:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"visibility":"public"},{"constant":true,"id":588,"name":"LONG","nodeType":"VariableDeclaration","scope":596,"src":"215:30:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":586,"name":"uint8","nodeType":"ElementaryTypeName","src":"215:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":587,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"244:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":true,"id":591,"name":"OUTCOME_RANGE","nodeType":"VariableDeclaration","scope":596,"src":"251:46:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":589,"name":"uint24","nodeType":"ElementaryTypeName","src":"251:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":590,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"290:7:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":593,"name":"lowerBound","nodeType":"VariableDeclaration","scope":596,"src":"335:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":592,"name":"int","nodeType":"ElementaryTypeName","src":"335:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":595,"name":"upperBound","nodeType":"VariableDeclaration","scope":596,"src":"362:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":594,"name":"int","nodeType":"ElementaryTypeName","src":"362:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"}],"scope":841,"src":"113:273:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":597,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"417:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":598,"nodeType":"InheritanceSpecifier","src":"417:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":599,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"424:9:3","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":600,"nodeType":"InheritanceSpecifier","src":"424:9:3"},{"arguments":null,"baseName":{"contractScope":null,"id":601,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"435:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":602,"nodeType":"InheritanceSpecifier","src":"435:15:3"}],"contractDependencies":[198,596,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":690,"linearizedBaseContracts":[690,596,198,6701,6673],"name":"ScalarEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":688,"nodeType":"Block","src":"1033:622:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":631,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":622,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1085:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":621,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":623,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:25:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":624,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1106:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1077:30:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":627,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1119:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":626,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1111:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":628,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1111:16:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":629,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1131:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1111:21:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1077:55:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":620,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1069:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":632,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1069:64:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":633,"nodeType":"ExpressionStatement","src":"1069:64:3"},{"expression":{"argumentTypes":null,"id":636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":634,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1143:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":635,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1161:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"1143:34:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":637,"nodeType":"ExpressionStatement","src":"1143:34:3"},{"expression":{"argumentTypes":null,"id":640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":638,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"1187:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":639,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1196:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"1187:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":641,"nodeType":"ExpressionStatement","src":"1187:16:3"},{"body":{"id":672,"nodeType":"Block","src":"1295:214:3","statements":[{"assignments":[653],"declarations":[{"constant":false,"id":653,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":689,"src":"1309:25:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":652,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"1309:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":660,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":657,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":606,"src":"1372:22:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":656,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1350:21:3","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":655,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"1354:17:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1350:45:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":654,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"1337:12:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":659,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1337:59:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"1309:87:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":664,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1429:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":661,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1410:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":663,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1410:18:3","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":665,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1410:32:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":666,"nodeType":"ExpressionStatement","src":"1410:32:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":668,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1482:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":669,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1496:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":667,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1461:20:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1461:37:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":671,"nodeType":"EmitStatement","src":"1456:42:3"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1283:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"32","id":647,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1287:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1283:5:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":673,"initializationExpression":{"assignments":[643],"declarations":[{"constant":false,"id":643,"name":"i","nodeType":"VariableDeclaration","scope":689,"src":"1270:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":642,"name":"uint8","nodeType":"ElementaryTypeName","src":"1270:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1280:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1270:11:3"},"loopExpression":{"expression":{"argumentTypes":null,"id":650,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1290:3:3","subExpression":{"argumentTypes":null,"id":649,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1290:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":651,"nodeType":"ExpressionStatement","src":"1290:3:3"},"nodeType":"ForStatement","src":"1265:244:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":677,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":675,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1554:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":676,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1568:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1554:25:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":674,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1546:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":678,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1546:34:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":679,"nodeType":"ExpressionStatement","src":"1546:34:3"},{"expression":{"argumentTypes":null,"id":682,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":680,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"1590:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":681,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1603:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1590:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":683,"nodeType":"ExpressionStatement","src":"1590:24:3"},{"expression":{"argumentTypes":null,"id":686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":684,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"1624:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":685,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1637:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1624:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":687,"nodeType":"ExpressionStatement","src":"1624:24:3"}]},"documentation":"@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 _lowerBound Lower bound for event outcome\n @param _upperBound Lower bound for event outcome","id":689,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":617,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":604,"src":"1005:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":618,"modifierName":{"argumentTypes":null,"id":616,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"999:5:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"999:14:3"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":615,"nodeType":"ParameterList","parameters":[{"constant":false,"id":604,"name":"proxied","nodeType":"VariableDeclaration","scope":689,"src":"823:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":603,"name":"address","nodeType":"ElementaryTypeName","src":"823:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":606,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":689,"src":"848:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":605,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":608,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":689,"src":"888:22:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":607,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"888:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":610,"name":"_oracle","nodeType":"VariableDeclaration","scope":689,"src":"920:14:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":609,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"920:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":612,"name":"_lowerBound","nodeType":"VariableDeclaration","scope":689,"src":"944:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":611,"name":"int","nodeType":"ElementaryTypeName","src":"944:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":614,"name":"_upperBound","nodeType":"VariableDeclaration","scope":689,"src":"969:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":613,"name":"int","nodeType":"ElementaryTypeName","src":"969:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"813:177:3"},"payable":false,"returnParameters":{"id":619,"nodeType":"ParameterList","parameters":[],"src":"1033:0:3"},"scope":690,"src":"802:853:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":841,"src":"388:1269:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":691,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1814:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":692,"nodeType":"InheritanceSpecifier","src":"1814:7:3"},{"arguments":null,"baseName":{"contractScope":null,"id":693,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1823:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":694,"nodeType":"InheritanceSpecifier","src":"1823:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":695,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"1830:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":696,"nodeType":"InheritanceSpecifier","src":"1830:15:3"}],"contractDependencies":[198,384,596,6673],"contractKind":"contract","documentation":"@title Scalar event contract - Scalar events resolve to a number within a range\n @author Stefan George - ","fullyImplemented":true,"id":840,"linearizedBaseContracts":[840,596,384,198,6673],"name":"ScalarEvent","nodeType":"ContractDefinition","nodes":[{"id":698,"libraryName":{"contractScope":null,"id":697,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1858:8:3","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1852:21:3","typeName":null},{"body":{"id":822,"nodeType":"Block","src":"2107:1332:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":704,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2166:12:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":703,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2158:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":705,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:21:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":706,"nodeType":"ExpressionStatement","src":"2158:21:3"},{"assignments":[],"declarations":[{"constant":false,"id":708,"name":"convertedWinningOutcome","nodeType":"VariableDeclaration","scope":823,"src":"2219:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":707,"name":"uint24","nodeType":"ElementaryTypeName","src":"2219:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"id":709,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2219:30:3"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":710,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2316:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":711,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2326:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2316:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":719,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":717,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2450:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":718,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2460:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2450:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":738,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":724,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2590:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":736,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":726,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2623:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":727,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2640:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":728,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2650:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2640:20:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":730,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2639:22:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:38:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":734,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":732,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2665:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":733,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2678:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2665:23:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":735,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2664:25:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:66:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":725,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2616:6:3","typeDescriptions":{"typeIdentifier":"t_type$_t_uint24_$","typeString":"type(uint24)"},"typeName":"uint24"},"id":737,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2616:74:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2590:100:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":739,"nodeType":"ExpressionStatement","src":"2590:100:3"},"id":740,"nodeType":"IfStatement","src":"2446:244:3","trueBody":{"expression":{"argumentTypes":null,"id":722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":720,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2484:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":721,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2510:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2484:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":723,"nodeType":"ExpressionStatement","src":"2484:39:3"}},"id":741,"nodeType":"IfStatement","src":"2312:378:3","trueBody":{"expression":{"argumentTypes":null,"id":715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":713,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2350:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":714,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2376:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2350:27:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":716,"nodeType":"ExpressionStatement","src":"2350:27:3"}},{"assignments":[743],"declarations":[{"constant":false,"id":743,"name":"factorShort","nodeType":"VariableDeclaration","scope":823,"src":"2700:16:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":742,"name":"uint","nodeType":"ElementaryTypeName","src":"2700:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":747,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":744,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2719:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":745,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2735:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2719:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"VariableDeclarationStatement","src":"2700:58:3"},{"assignments":[749],"declarations":[{"constant":false,"id":749,"name":"factorLong","nodeType":"VariableDeclaration","scope":823,"src":"2768:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":748,"name":"uint","nodeType":"ElementaryTypeName","src":"2768:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":753,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":752,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":750,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2786:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":751,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"2802:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2786:27:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2768:45:3"},{"assignments":[755],"declarations":[{"constant":false,"id":755,"name":"shortOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2823:27:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":754,"name":"uint","nodeType":"ElementaryTypeName","src":"2823:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":763,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":760,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2884:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":761,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2884:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":756,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2853:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":758,"indexExpression":{"argumentTypes":null,"id":757,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"2867:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2853:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":759,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2853:30:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":762,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2853:42:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2823:72:3"},{"assignments":[765],"declarations":[{"constant":false,"id":765,"name":"longOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2905:26:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":764,"name":"uint","nodeType":"ElementaryTypeName","src":"2905:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":773,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":770,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2964:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2964:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":766,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2934:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":768,"indexExpression":{"argumentTypes":null,"id":767,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"2948:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2934:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":769,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2934:29:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":772,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2934:41:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2905:70:3"},{"expression":{"argumentTypes":null,"id":787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":774,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"2985:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":786,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":782,"name":"factorLong","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":749,"src":"3066:10:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":780,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3040:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"3040:25:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":783,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3040:37:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":777,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"3023:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":775,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"2996:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":776,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"2996:26:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":778,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:39:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"2996:43:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:82:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":785,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"3081:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2996:98:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2985:109:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":788,"nodeType":"ExpressionStatement","src":"2985:109:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":793,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3169:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":794,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3169:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":795,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"3181:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":789,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3141:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":791,"indexExpression":{"argumentTypes":null,"id":790,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"3155:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3141:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3141:27:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3141:63:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":797,"nodeType":"ExpressionStatement","src":"3141:63:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":802,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3241:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":803,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3241:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":804,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3253:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":798,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3214:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":800,"indexExpression":{"argumentTypes":null,"id":799,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"3228:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3214:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":801,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3214:26:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:61:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":806,"nodeType":"ExpressionStatement","src":"3214:61:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":810,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3355:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":811,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3355:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":812,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3367:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":808,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3330:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3330:24:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":813,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3330:46:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3322:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":814,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3322:55:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":815,"nodeType":"ExpressionStatement","src":"3322:55:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":817,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3411:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":818,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3411:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":819,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3423:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":816,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"3392:18:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":820,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3392:40:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":821,"nodeType":"EmitStatement","src":"3387:45:3"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":823,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":699,"nodeType":"ParameterList","parameters":[],"src":"2053:2:3"},"payable":false,"returnParameters":{"id":702,"nodeType":"ParameterList","parameters":[{"constant":false,"id":701,"name":"winnings","nodeType":"VariableDeclaration","scope":823,"src":"2088:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":700,"name":"uint","nodeType":"ElementaryTypeName","src":"2088:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2087:15:3"},"scope":840,"src":"2030:1409:3","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":838,"nodeType":"Block","src":"3601:100:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":831,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3645:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":832,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"3662:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":833,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"3670:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":834,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"3682:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":829,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"3628:3:3","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3628:16:3","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":835,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3628:65:3","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":828,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"3618:9:3","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":836,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3618:76:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":827,"id":837,"nodeType":"Return","src":"3611:83:3"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":839,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":824,"nodeType":"ParameterList","parameters":[],"src":"3540:2:3"},"payable":false,"returnParameters":{"id":827,"nodeType":"ParameterList","parameters":[{"constant":false,"id":826,"name":"","nodeType":"VariableDeclaration","scope":839,"src":"3588:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":825,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3588:7:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3587:9:3"},"scope":840,"src":"3519:182:3","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":841,"src":"1790:1913:3"}],"src":"0:3704:3"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","exportedSymbols":{"ScalarEvent":[840],"ScalarEventData":[596],"ScalarEventProxy":[690]},"id":841,"nodeType":"SourceUnit","nodes":[{"id":580,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":581,"nodeType":"ImportDirective","scope":841,"sourceUnit":385,"src":"25:29:3","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":582,"nodeType":"ImportDirective","scope":841,"sourceUnit":6702,"src":"55:55:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":596,"linearizedBaseContracts":[596],"name":"ScalarEventData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":585,"name":"SHORT","nodeType":"VariableDeclaration","scope":596,"src":"178:31:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":583,"name":"uint8","nodeType":"ElementaryTypeName","src":"178:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"30","id":584,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"208:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"visibility":"public"},{"constant":true,"id":588,"name":"LONG","nodeType":"VariableDeclaration","scope":596,"src":"215:30:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":586,"name":"uint8","nodeType":"ElementaryTypeName","src":"215:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":587,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"244:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":true,"id":591,"name":"OUTCOME_RANGE","nodeType":"VariableDeclaration","scope":596,"src":"251:46:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":589,"name":"uint24","nodeType":"ElementaryTypeName","src":"251:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":590,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"290:7:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":593,"name":"lowerBound","nodeType":"VariableDeclaration","scope":596,"src":"335:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":592,"name":"int","nodeType":"ElementaryTypeName","src":"335:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":595,"name":"upperBound","nodeType":"VariableDeclaration","scope":596,"src":"362:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":594,"name":"int","nodeType":"ElementaryTypeName","src":"362:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"}],"scope":841,"src":"113:273:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":597,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"417:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":598,"nodeType":"InheritanceSpecifier","src":"417:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":599,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"424:9:3","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":600,"nodeType":"InheritanceSpecifier","src":"424:9:3"},{"arguments":null,"baseName":{"contractScope":null,"id":601,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"435:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":602,"nodeType":"InheritanceSpecifier","src":"435:15:3"}],"contractDependencies":[198,596,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":690,"linearizedBaseContracts":[690,596,198,6701,6673],"name":"ScalarEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":688,"nodeType":"Block","src":"1033:622:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":631,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":622,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1085:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":621,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":623,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:25:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":624,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1106:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1077:30:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":627,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1119:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":626,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1111:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":628,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1111:16:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":629,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1131:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1111:21:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1077:55:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":620,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1069:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":632,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1069:64:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":633,"nodeType":"ExpressionStatement","src":"1069:64:3"},{"expression":{"argumentTypes":null,"id":636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":634,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1143:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":635,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1161:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"1143:34:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":637,"nodeType":"ExpressionStatement","src":"1143:34:3"},{"expression":{"argumentTypes":null,"id":640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":638,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"1187:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":639,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1196:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"1187:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":641,"nodeType":"ExpressionStatement","src":"1187:16:3"},{"body":{"id":672,"nodeType":"Block","src":"1295:214:3","statements":[{"assignments":[653],"declarations":[{"constant":false,"id":653,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":689,"src":"1309:25:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":652,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"1309:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":660,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":657,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":606,"src":"1372:22:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":656,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1350:21:3","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":655,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"1354:17:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1350:45:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":654,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"1337:12:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":659,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1337:59:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"1309:87:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":664,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1429:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":661,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1410:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":663,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1410:18:3","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":665,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1410:32:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":666,"nodeType":"ExpressionStatement","src":"1410:32:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":668,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1482:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":669,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1496:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":667,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1461:20:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1461:37:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":671,"nodeType":"EmitStatement","src":"1456:42:3"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1283:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"32","id":647,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1287:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1283:5:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":673,"initializationExpression":{"assignments":[643],"declarations":[{"constant":false,"id":643,"name":"i","nodeType":"VariableDeclaration","scope":689,"src":"1270:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":642,"name":"uint8","nodeType":"ElementaryTypeName","src":"1270:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1280:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1270:11:3"},"loopExpression":{"expression":{"argumentTypes":null,"id":650,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1290:3:3","subExpression":{"argumentTypes":null,"id":649,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1290:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":651,"nodeType":"ExpressionStatement","src":"1290:3:3"},"nodeType":"ForStatement","src":"1265:244:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":677,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":675,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1554:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":676,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1568:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1554:25:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":674,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1546:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":678,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1546:34:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":679,"nodeType":"ExpressionStatement","src":"1546:34:3"},{"expression":{"argumentTypes":null,"id":682,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":680,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"1590:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":681,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1603:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1590:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":683,"nodeType":"ExpressionStatement","src":"1590:24:3"},{"expression":{"argumentTypes":null,"id":686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":684,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"1624:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":685,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1637:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1624:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":687,"nodeType":"ExpressionStatement","src":"1624:24:3"}]},"documentation":"@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 _lowerBound Lower bound for event outcome\n @param _upperBound Lower bound for event outcome","id":689,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":617,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":604,"src":"1005:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":618,"modifierName":{"argumentTypes":null,"id":616,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"999:5:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"999:14:3"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":615,"nodeType":"ParameterList","parameters":[{"constant":false,"id":604,"name":"proxied","nodeType":"VariableDeclaration","scope":689,"src":"823:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":603,"name":"address","nodeType":"ElementaryTypeName","src":"823:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":606,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":689,"src":"848:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":605,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":608,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":689,"src":"888:22:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":607,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"888:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":610,"name":"_oracle","nodeType":"VariableDeclaration","scope":689,"src":"920:14:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":609,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"920:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":612,"name":"_lowerBound","nodeType":"VariableDeclaration","scope":689,"src":"944:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":611,"name":"int","nodeType":"ElementaryTypeName","src":"944:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":614,"name":"_upperBound","nodeType":"VariableDeclaration","scope":689,"src":"969:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":613,"name":"int","nodeType":"ElementaryTypeName","src":"969:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"813:177:3"},"payable":false,"returnParameters":{"id":619,"nodeType":"ParameterList","parameters":[],"src":"1033:0:3"},"scope":690,"src":"802:853:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":841,"src":"388:1269:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":691,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1814:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":692,"nodeType":"InheritanceSpecifier","src":"1814:7:3"},{"arguments":null,"baseName":{"contractScope":null,"id":693,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1823:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":694,"nodeType":"InheritanceSpecifier","src":"1823:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":695,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"1830:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":696,"nodeType":"InheritanceSpecifier","src":"1830:15:3"}],"contractDependencies":[198,384,596,6673],"contractKind":"contract","documentation":"@title Scalar event contract - Scalar events resolve to a number within a range\n @author Stefan George - ","fullyImplemented":true,"id":840,"linearizedBaseContracts":[840,596,384,198,6673],"name":"ScalarEvent","nodeType":"ContractDefinition","nodes":[{"id":698,"libraryName":{"contractScope":null,"id":697,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1858:8:3","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1852:21:3","typeName":null},{"body":{"id":822,"nodeType":"Block","src":"2107:1332:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":704,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2166:12:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":703,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2158:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":705,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:21:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":706,"nodeType":"ExpressionStatement","src":"2158:21:3"},{"assignments":[],"declarations":[{"constant":false,"id":708,"name":"convertedWinningOutcome","nodeType":"VariableDeclaration","scope":823,"src":"2219:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":707,"name":"uint24","nodeType":"ElementaryTypeName","src":"2219:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"id":709,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2219:30:3"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":710,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2316:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":711,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2326:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2316:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":719,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":717,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2450:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":718,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2460:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2450:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":738,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":724,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2590:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":736,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":726,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2623:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":727,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2640:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":728,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2650:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2640:20:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":730,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2639:22:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:38:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":734,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":732,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2665:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":733,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2678:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2665:23:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":735,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2664:25:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:66:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":725,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2616:6:3","typeDescriptions":{"typeIdentifier":"t_type$_t_uint24_$","typeString":"type(uint24)"},"typeName":"uint24"},"id":737,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2616:74:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2590:100:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":739,"nodeType":"ExpressionStatement","src":"2590:100:3"},"id":740,"nodeType":"IfStatement","src":"2446:244:3","trueBody":{"expression":{"argumentTypes":null,"id":722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":720,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2484:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":721,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2510:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2484:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":723,"nodeType":"ExpressionStatement","src":"2484:39:3"}},"id":741,"nodeType":"IfStatement","src":"2312:378:3","trueBody":{"expression":{"argumentTypes":null,"id":715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":713,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2350:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":714,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2376:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2350:27:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":716,"nodeType":"ExpressionStatement","src":"2350:27:3"}},{"assignments":[743],"declarations":[{"constant":false,"id":743,"name":"factorShort","nodeType":"VariableDeclaration","scope":823,"src":"2700:16:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":742,"name":"uint","nodeType":"ElementaryTypeName","src":"2700:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":747,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":744,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2719:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":745,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2735:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2719:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"VariableDeclarationStatement","src":"2700:58:3"},{"assignments":[749],"declarations":[{"constant":false,"id":749,"name":"factorLong","nodeType":"VariableDeclaration","scope":823,"src":"2768:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":748,"name":"uint","nodeType":"ElementaryTypeName","src":"2768:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":753,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":752,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":750,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2786:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":751,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"2802:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2786:27:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2768:45:3"},{"assignments":[755],"declarations":[{"constant":false,"id":755,"name":"shortOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2823:27:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":754,"name":"uint","nodeType":"ElementaryTypeName","src":"2823:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":763,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":760,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2884:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":761,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2884:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":756,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2853:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":758,"indexExpression":{"argumentTypes":null,"id":757,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"2867:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2853:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":759,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2853:30:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":762,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2853:42:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2823:72:3"},{"assignments":[765],"declarations":[{"constant":false,"id":765,"name":"longOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2905:26:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":764,"name":"uint","nodeType":"ElementaryTypeName","src":"2905:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":773,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":770,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2964:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2964:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":766,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2934:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":768,"indexExpression":{"argumentTypes":null,"id":767,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"2948:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2934:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":769,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2934:29:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":772,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2934:41:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2905:70:3"},{"expression":{"argumentTypes":null,"id":787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":774,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"2985:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":786,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":782,"name":"factorLong","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":749,"src":"3066:10:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":780,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3040:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"3040:25:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":783,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3040:37:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":777,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"3023:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":775,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"2996:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":776,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"2996:26:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":778,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:39:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"2996:43:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:82:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":785,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"3081:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2996:98:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2985:109:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":788,"nodeType":"ExpressionStatement","src":"2985:109:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":793,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3169:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":794,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3169:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":795,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"3181:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":789,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3141:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":791,"indexExpression":{"argumentTypes":null,"id":790,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"3155:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3141:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3141:27:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3141:63:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":797,"nodeType":"ExpressionStatement","src":"3141:63:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":802,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3241:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":803,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3241:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":804,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3253:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":798,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3214:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":800,"indexExpression":{"argumentTypes":null,"id":799,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"3228:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3214:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":801,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3214:26:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:61:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":806,"nodeType":"ExpressionStatement","src":"3214:61:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":810,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3355:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":811,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3355:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":812,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3367:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":808,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3330:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3330:24:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":813,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3330:46:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3322:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":814,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3322:55:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":815,"nodeType":"ExpressionStatement","src":"3322:55:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":817,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3411:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":818,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3411:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":819,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3423:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":816,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"3392:18:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":820,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3392:40:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":821,"nodeType":"EmitStatement","src":"3387:45:3"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":823,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":699,"nodeType":"ParameterList","parameters":[],"src":"2053:2:3"},"payable":false,"returnParameters":{"id":702,"nodeType":"ParameterList","parameters":[{"constant":false,"id":701,"name":"winnings","nodeType":"VariableDeclaration","scope":823,"src":"2088:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":700,"name":"uint","nodeType":"ElementaryTypeName","src":"2088:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2087:15:3"},"scope":840,"src":"2030:1409:3","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":838,"nodeType":"Block","src":"3601:100:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":831,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3645:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":832,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"3662:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":833,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"3670:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":834,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"3682:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":829,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"3628:3:3","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3628:16:3","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":835,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3628:65:3","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":828,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"3618:9:3","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":836,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3618:76:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":827,"id":837,"nodeType":"Return","src":"3611:83:3"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":839,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":824,"nodeType":"ParameterList","parameters":[],"src":"3540:2:3"},"payable":false,"returnParameters":{"id":827,"nodeType":"ParameterList","parameters":[{"constant":false,"id":826,"name":"","nodeType":"VariableDeclaration","scope":839,"src":"3588:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":825,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3588:7:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3587:9:3"},"scope":840,"src":"3519:182:3","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":841,"src":"1790:1913:3"}],"src":"0:3704:3"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.986Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/ScalarEventProxy.json": +/*!************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/ScalarEventProxy.json ***! + \************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"ScalarEventProxy","abi":[{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OUTCOME_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"name":"","type":"address"}],"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":"lowerBound","outputs":[{"name":"","type":"int256"}],"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":"SHORT","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"upperBound","outputs":[{"name":"","type":"int256"}],"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"},{"inputs":[{"name":"proxied","type":"address"},{"name":"outcomeTokenMasterCopy","type":"address"},{"name":"_collateralToken","type":"address"},{"name":"_oracle","type":"address"},{"name":"_lowerBound","type":"int256"},{"name":"_upperBound","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"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"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160c080610a208339810180604052810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000808760008173ffffffffffffffffffffffffffffffffffffffff161415151561008f57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff161415801561010e575060008573ffffffffffffffffffffffffffffffffffffffff1614155b151561011957600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600091505b60028260ff1610156102ee57866101b5610317565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080158015610207573d6000803e3d6000fd5b50905060048190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550507fad24776dc347085865b6988e249c191fc22d9b31cf54cb62233c3c16be1736ee8183604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff1681526020019250505060405180910390a181806001019250506101a0565b83831315156102fc57600080fd5b83600581905550826006819055505050505050505050610327565b604051610223806107fd83390190565b6104c7806103366000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100fd578063561cce0a146101285780636e5452fe146101595780637dc0d1d01461018e5780638abe59ea146101e5578063a384d6ff14610252578063a619486e1461027d578063a871da91146102d4578063b09ad8a014610305578063b2016bd414610330578063ccdf68f314610387575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100f8573d6000f35b3d6000fd5b34801561010957600080fd5b506101126103b6565b6040518082815260200191505060405180910390f35b34801561013457600080fd5b5061013d6103bc565b604051808260ff1660ff16815260200191505060405180910390f35b34801561016557600080fd5b5061016e6103c1565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561019a57600080fd5b506101a36103c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f157600080fd5b50610210600480360381019080803590602001909291905050506103ee565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025e57600080fd5b5061026761042c565b6040518082815260200191505060405180910390f35b34801561028957600080fd5b50610292610432565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102e057600080fd5b506102e9610457565b604051808260ff1660ff16815260200191505060405180910390f35b34801561031157600080fd5b5061031a61045c565b6040518082815260200191505060405180910390f35b34801561033c57600080fd5b50610345610462565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039357600080fd5b5061039c610488565b604051808215151515815260200191505060405180910390f35b60035481565b600181565b620f424081565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811015156103fd57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16815600a165627a7a72305820c0e6769066eae8eb5c6e67e64e822ae3de04085803e139b841ad67b5edd720c40029608060405234801561001057600080fd5b50604051602080610223833981018060405281019080805190602001909291905050508060008173ffffffffffffffffffffffffffffffffffffffff161415151561005a57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610137806100ec6000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a619486e1461008f575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461008a573d6000f35b3d6000fd5b34801561009b57600080fd5b506100a46100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582086062f64a8ac16b84a22859a0aaf50fd8f37056793cb37e21a8760b9712c9eed0029","deployedBytecode":"0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327793f87146100fd578063561cce0a146101285780636e5452fe146101595780637dc0d1d01461018e5780638abe59ea146101e5578063a384d6ff14610252578063a619486e1461027d578063a871da91146102d4578063b09ad8a014610305578063b2016bd414610330578063ccdf68f314610387575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100f8573d6000f35b3d6000fd5b34801561010957600080fd5b506101126103b6565b6040518082815260200191505060405180910390f35b34801561013457600080fd5b5061013d6103bc565b604051808260ff1660ff16815260200191505060405180910390f35b34801561016557600080fd5b5061016e6103c1565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561019a57600080fd5b506101a36103c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f157600080fd5b50610210600480360381019080803590602001909291905050506103ee565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025e57600080fd5b5061026761042c565b6040518082815260200191505060405180910390f35b34801561028957600080fd5b50610292610432565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102e057600080fd5b506102e9610457565b604051808260ff1660ff16815260200191505060405180910390f35b34801561031157600080fd5b5061031a61045c565b6040518082815260200191505060405180910390f35b34801561033c57600080fd5b50610345610462565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039357600080fd5b5061039c610488565b604051808215151515815260200191505060405180910390f35b60035481565b600181565b620f424081565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811015156103fd57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16815600a165627a7a72305820c0e6769066eae8eb5c6e67e64e822ae3de04085803e139b841ad67b5edd720c40029","sourceMap":"388:1269:3:-;;;802:853;8:9:-1;5:2;;;30:1;27;20:12;5:2;802:853:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1270:7;1309:25;1005:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;1106:1:3;1085:16;1077:30;;;;:55;;;;;1131:1;1119:7;1111:21;;;;1077:55;1069:64;;;;;;;;1161:16;1143:15;;:34;;;;;;;;;;;;;;;;;;1196:7;1187:6;;:16;;;;;;;;;;;;;;;;;;1280:1;1270:11;;1265:244;1287:1;1283;:5;;;1265:244;;;1372:22;1350:45;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1350:45:3;1309:87;;1410:13;1429:12;1410:32;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;1410:32:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1461:37;1482:12;1496:1;1461:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1290:3;;;;;;;1265:244;;;1568:11;1554;:25;1546:34;;;;;;;;1603:11;1590:10;:24;;;;1637:11;1624:10;:24;;;;802:853;;;;;;;;388:1269;;;;;;;;;;;;:::o;:::-;;;;;;;","deployedSourceMap":"388:1269:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;749:18:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;749:18:1;;;;;;;;;;;;;;;;;;;;;;;215:30:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;215:30:3;;;;;;;;;;;;;;;;;;;;;;;;;;;251:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;251:46:3;;;;;;;;;;;;;;;;;;;;;;;;;;;693:20:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;693:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;773:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;773:35:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;335:21:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;335:21:3;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;178:31:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;178:31:3;;;;;;;;;;;;;;;;;;;;;;;;;;;362:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;362:21:3;;;;;;;;;;;;;;;;;;;;;;;659:28:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;659:28:1;;;;;;;;;;;;;;;;;;;;;;;;;;;719:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;719:24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;749:18;;;;:::o;215:30:3:-;244:1;215:30;:::o;251:46::-;290:7;251:46;:::o;693:20:1:-;;;;;;;;;;;;;:::o;773:35::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;335:21:3:-;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;178:31:3:-;208:1;178:31;:::o;362:21::-;;;;:::o;659:28:1:-;;;;;;;;;;;;;:::o;719:24::-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Events/Event.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract ScalarEventData {\n\n /*\n * Constants\n */\n uint8 public constant SHORT = 0;\n uint8 public constant LONG = 1;\n uint24 public constant OUTCOME_RANGE = 1000000;\n\n /*\n * Storage\n */\n int public lowerBound;\n int public upperBound;\n}\n\ncontract ScalarEventProxy is Proxy, EventData, ScalarEventData {\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 _lowerBound Lower bound for event outcome\n /// @param _upperBound Lower bound for event outcome\n constructor(\n address proxied,\n address outcomeTokenMasterCopy,\n ERC20 _collateralToken,\n Oracle _oracle,\n int _lowerBound,\n int _upperBound\n )\n Proxy(proxied)\n public\n {\n // Validate input\n require(address(_collateralToken) != 0 && address(_oracle) != 0);\n collateralToken = _collateralToken;\n oracle = _oracle;\n // Create an outcome token for each outcome\n for (uint8 i = 0; i < 2; i++) {\n OutcomeToken outcomeToken = OutcomeToken(new OutcomeTokenProxy(outcomeTokenMasterCopy));\n outcomeTokens.push(outcomeToken);\n emit OutcomeTokenCreation(outcomeToken, i);\n }\n\n // Validate bounds\n require(_upperBound > _lowerBound);\n lowerBound = _lowerBound;\n upperBound = _upperBound;\n }\n}\n\n/// @title Scalar event contract - Scalar events resolve to a number within a range\n/// @author Stefan George - \ncontract ScalarEvent is Proxied, Event, ScalarEventData {\n using SafeMath for *;\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 uint24 convertedWinningOutcome;\n // Outcome is lower than defined lower bound\n if (outcome < lowerBound)\n convertedWinningOutcome = 0;\n // Outcome is higher than defined upper bound\n else if (outcome > upperBound)\n convertedWinningOutcome = OUTCOME_RANGE;\n // Map outcome to outcome range\n else\n convertedWinningOutcome = uint24(OUTCOME_RANGE * (outcome - lowerBound) / (upperBound - lowerBound));\n uint factorShort = OUTCOME_RANGE - convertedWinningOutcome;\n uint factorLong = OUTCOME_RANGE - factorShort;\n uint shortOutcomeTokenCount = outcomeTokens[SHORT].balanceOf(msg.sender);\n uint longOutcomeTokenCount = outcomeTokens[LONG].balanceOf(msg.sender);\n winnings = shortOutcomeTokenCount.mul(factorShort).add(longOutcomeTokenCount.mul(factorLong)) / OUTCOME_RANGE;\n // Revoke all outcome tokens\n outcomeTokens[SHORT].revoke(msg.sender, shortOutcomeTokenCount);\n outcomeTokens[LONG].revoke(msg.sender, longOutcomeTokenCount);\n // Payout winnings to sender\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, lowerBound, upperBound));\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","exportedSymbols":{"ScalarEvent":[840],"ScalarEventData":[596],"ScalarEventProxy":[690]},"id":841,"nodeType":"SourceUnit","nodes":[{"id":580,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":581,"nodeType":"ImportDirective","scope":841,"sourceUnit":385,"src":"25:29:3","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":582,"nodeType":"ImportDirective","scope":841,"sourceUnit":6702,"src":"55:55:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":596,"linearizedBaseContracts":[596],"name":"ScalarEventData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":585,"name":"SHORT","nodeType":"VariableDeclaration","scope":596,"src":"178:31:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":583,"name":"uint8","nodeType":"ElementaryTypeName","src":"178:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"30","id":584,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"208:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"visibility":"public"},{"constant":true,"id":588,"name":"LONG","nodeType":"VariableDeclaration","scope":596,"src":"215:30:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":586,"name":"uint8","nodeType":"ElementaryTypeName","src":"215:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":587,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"244:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":true,"id":591,"name":"OUTCOME_RANGE","nodeType":"VariableDeclaration","scope":596,"src":"251:46:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":589,"name":"uint24","nodeType":"ElementaryTypeName","src":"251:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":590,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"290:7:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":593,"name":"lowerBound","nodeType":"VariableDeclaration","scope":596,"src":"335:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":592,"name":"int","nodeType":"ElementaryTypeName","src":"335:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":595,"name":"upperBound","nodeType":"VariableDeclaration","scope":596,"src":"362:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":594,"name":"int","nodeType":"ElementaryTypeName","src":"362:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"}],"scope":841,"src":"113:273:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":597,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"417:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":598,"nodeType":"InheritanceSpecifier","src":"417:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":599,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"424:9:3","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":600,"nodeType":"InheritanceSpecifier","src":"424:9:3"},{"arguments":null,"baseName":{"contractScope":null,"id":601,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"435:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":602,"nodeType":"InheritanceSpecifier","src":"435:15:3"}],"contractDependencies":[198,596,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":690,"linearizedBaseContracts":[690,596,198,6701,6673],"name":"ScalarEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":688,"nodeType":"Block","src":"1033:622:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":631,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":622,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1085:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":621,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":623,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:25:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":624,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1106:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1077:30:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":627,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1119:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":626,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1111:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":628,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1111:16:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":629,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1131:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1111:21:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1077:55:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":620,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1069:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":632,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1069:64:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":633,"nodeType":"ExpressionStatement","src":"1069:64:3"},{"expression":{"argumentTypes":null,"id":636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":634,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1143:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":635,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1161:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"1143:34:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":637,"nodeType":"ExpressionStatement","src":"1143:34:3"},{"expression":{"argumentTypes":null,"id":640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":638,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"1187:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":639,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1196:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"1187:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":641,"nodeType":"ExpressionStatement","src":"1187:16:3"},{"body":{"id":672,"nodeType":"Block","src":"1295:214:3","statements":[{"assignments":[653],"declarations":[{"constant":false,"id":653,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":689,"src":"1309:25:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":652,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"1309:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":660,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":657,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":606,"src":"1372:22:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":656,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1350:21:3","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":655,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"1354:17:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1350:45:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":654,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"1337:12:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":659,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1337:59:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"1309:87:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":664,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1429:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":661,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1410:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":663,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1410:18:3","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":665,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1410:32:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":666,"nodeType":"ExpressionStatement","src":"1410:32:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":668,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1482:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":669,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1496:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":667,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1461:20:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1461:37:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":671,"nodeType":"EmitStatement","src":"1456:42:3"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1283:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"32","id":647,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1287:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1283:5:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":673,"initializationExpression":{"assignments":[643],"declarations":[{"constant":false,"id":643,"name":"i","nodeType":"VariableDeclaration","scope":689,"src":"1270:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":642,"name":"uint8","nodeType":"ElementaryTypeName","src":"1270:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1280:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1270:11:3"},"loopExpression":{"expression":{"argumentTypes":null,"id":650,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1290:3:3","subExpression":{"argumentTypes":null,"id":649,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1290:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":651,"nodeType":"ExpressionStatement","src":"1290:3:3"},"nodeType":"ForStatement","src":"1265:244:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":677,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":675,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1554:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":676,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1568:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1554:25:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":674,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1546:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":678,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1546:34:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":679,"nodeType":"ExpressionStatement","src":"1546:34:3"},{"expression":{"argumentTypes":null,"id":682,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":680,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"1590:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":681,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1603:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1590:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":683,"nodeType":"ExpressionStatement","src":"1590:24:3"},{"expression":{"argumentTypes":null,"id":686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":684,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"1624:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":685,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1637:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1624:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":687,"nodeType":"ExpressionStatement","src":"1624:24:3"}]},"documentation":"@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 _lowerBound Lower bound for event outcome\n @param _upperBound Lower bound for event outcome","id":689,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":617,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":604,"src":"1005:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":618,"modifierName":{"argumentTypes":null,"id":616,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"999:5:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"999:14:3"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":615,"nodeType":"ParameterList","parameters":[{"constant":false,"id":604,"name":"proxied","nodeType":"VariableDeclaration","scope":689,"src":"823:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":603,"name":"address","nodeType":"ElementaryTypeName","src":"823:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":606,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":689,"src":"848:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":605,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":608,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":689,"src":"888:22:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":607,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"888:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":610,"name":"_oracle","nodeType":"VariableDeclaration","scope":689,"src":"920:14:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":609,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"920:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":612,"name":"_lowerBound","nodeType":"VariableDeclaration","scope":689,"src":"944:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":611,"name":"int","nodeType":"ElementaryTypeName","src":"944:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":614,"name":"_upperBound","nodeType":"VariableDeclaration","scope":689,"src":"969:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":613,"name":"int","nodeType":"ElementaryTypeName","src":"969:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"813:177:3"},"payable":false,"returnParameters":{"id":619,"nodeType":"ParameterList","parameters":[],"src":"1033:0:3"},"scope":690,"src":"802:853:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":841,"src":"388:1269:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":691,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1814:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":692,"nodeType":"InheritanceSpecifier","src":"1814:7:3"},{"arguments":null,"baseName":{"contractScope":null,"id":693,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1823:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":694,"nodeType":"InheritanceSpecifier","src":"1823:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":695,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"1830:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":696,"nodeType":"InheritanceSpecifier","src":"1830:15:3"}],"contractDependencies":[198,384,596,6673],"contractKind":"contract","documentation":"@title Scalar event contract - Scalar events resolve to a number within a range\n @author Stefan George - ","fullyImplemented":true,"id":840,"linearizedBaseContracts":[840,596,384,198,6673],"name":"ScalarEvent","nodeType":"ContractDefinition","nodes":[{"id":698,"libraryName":{"contractScope":null,"id":697,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1858:8:3","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1852:21:3","typeName":null},{"body":{"id":822,"nodeType":"Block","src":"2107:1332:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":704,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2166:12:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":703,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2158:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":705,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:21:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":706,"nodeType":"ExpressionStatement","src":"2158:21:3"},{"assignments":[],"declarations":[{"constant":false,"id":708,"name":"convertedWinningOutcome","nodeType":"VariableDeclaration","scope":823,"src":"2219:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":707,"name":"uint24","nodeType":"ElementaryTypeName","src":"2219:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"id":709,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2219:30:3"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":710,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2316:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":711,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2326:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2316:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":719,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":717,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2450:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":718,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2460:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2450:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":738,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":724,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2590:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":736,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":726,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2623:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":727,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2640:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":728,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2650:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2640:20:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":730,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2639:22:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:38:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":734,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":732,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2665:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":733,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2678:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2665:23:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":735,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2664:25:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:66:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":725,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2616:6:3","typeDescriptions":{"typeIdentifier":"t_type$_t_uint24_$","typeString":"type(uint24)"},"typeName":"uint24"},"id":737,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2616:74:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2590:100:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":739,"nodeType":"ExpressionStatement","src":"2590:100:3"},"id":740,"nodeType":"IfStatement","src":"2446:244:3","trueBody":{"expression":{"argumentTypes":null,"id":722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":720,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2484:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":721,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2510:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2484:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":723,"nodeType":"ExpressionStatement","src":"2484:39:3"}},"id":741,"nodeType":"IfStatement","src":"2312:378:3","trueBody":{"expression":{"argumentTypes":null,"id":715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":713,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2350:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":714,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2376:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2350:27:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":716,"nodeType":"ExpressionStatement","src":"2350:27:3"}},{"assignments":[743],"declarations":[{"constant":false,"id":743,"name":"factorShort","nodeType":"VariableDeclaration","scope":823,"src":"2700:16:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":742,"name":"uint","nodeType":"ElementaryTypeName","src":"2700:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":747,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":744,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2719:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":745,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2735:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2719:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"VariableDeclarationStatement","src":"2700:58:3"},{"assignments":[749],"declarations":[{"constant":false,"id":749,"name":"factorLong","nodeType":"VariableDeclaration","scope":823,"src":"2768:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":748,"name":"uint","nodeType":"ElementaryTypeName","src":"2768:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":753,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":752,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":750,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2786:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":751,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"2802:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2786:27:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2768:45:3"},{"assignments":[755],"declarations":[{"constant":false,"id":755,"name":"shortOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2823:27:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":754,"name":"uint","nodeType":"ElementaryTypeName","src":"2823:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":763,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":760,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2884:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":761,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2884:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":756,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2853:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":758,"indexExpression":{"argumentTypes":null,"id":757,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"2867:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2853:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":759,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2853:30:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":762,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2853:42:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2823:72:3"},{"assignments":[765],"declarations":[{"constant":false,"id":765,"name":"longOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2905:26:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":764,"name":"uint","nodeType":"ElementaryTypeName","src":"2905:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":773,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":770,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2964:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2964:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":766,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2934:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":768,"indexExpression":{"argumentTypes":null,"id":767,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"2948:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2934:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":769,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2934:29:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":772,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2934:41:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2905:70:3"},{"expression":{"argumentTypes":null,"id":787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":774,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"2985:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":786,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":782,"name":"factorLong","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":749,"src":"3066:10:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":780,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3040:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"3040:25:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":783,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3040:37:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":777,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"3023:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":775,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"2996:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":776,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"2996:26:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":778,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:39:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"2996:43:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:82:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":785,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"3081:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2996:98:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2985:109:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":788,"nodeType":"ExpressionStatement","src":"2985:109:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":793,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3169:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":794,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3169:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":795,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"3181:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":789,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3141:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":791,"indexExpression":{"argumentTypes":null,"id":790,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"3155:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3141:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3141:27:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3141:63:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":797,"nodeType":"ExpressionStatement","src":"3141:63:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":802,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3241:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":803,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3241:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":804,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3253:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":798,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3214:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":800,"indexExpression":{"argumentTypes":null,"id":799,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"3228:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3214:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":801,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3214:26:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:61:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":806,"nodeType":"ExpressionStatement","src":"3214:61:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":810,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3355:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":811,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3355:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":812,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3367:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":808,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3330:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3330:24:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":813,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3330:46:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3322:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":814,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3322:55:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":815,"nodeType":"ExpressionStatement","src":"3322:55:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":817,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3411:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":818,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3411:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":819,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3423:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":816,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"3392:18:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":820,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3392:40:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":821,"nodeType":"EmitStatement","src":"3387:45:3"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":823,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":699,"nodeType":"ParameterList","parameters":[],"src":"2053:2:3"},"payable":false,"returnParameters":{"id":702,"nodeType":"ParameterList","parameters":[{"constant":false,"id":701,"name":"winnings","nodeType":"VariableDeclaration","scope":823,"src":"2088:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":700,"name":"uint","nodeType":"ElementaryTypeName","src":"2088:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2087:15:3"},"scope":840,"src":"2030:1409:3","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":838,"nodeType":"Block","src":"3601:100:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":831,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3645:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":832,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"3662:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":833,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"3670:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":834,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"3682:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":829,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"3628:3:3","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3628:16:3","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":835,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3628:65:3","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":828,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"3618:9:3","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":836,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3618:76:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":827,"id":837,"nodeType":"Return","src":"3611:83:3"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":839,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":824,"nodeType":"ParameterList","parameters":[],"src":"3540:2:3"},"payable":false,"returnParameters":{"id":827,"nodeType":"ParameterList","parameters":[{"constant":false,"id":826,"name":"","nodeType":"VariableDeclaration","scope":839,"src":"3588:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":825,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3588:7:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3587:9:3"},"scope":840,"src":"3519:182:3","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":841,"src":"1790:1913:3"}],"src":"0:3704:3"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/ScalarEvent.sol","exportedSymbols":{"ScalarEvent":[840],"ScalarEventData":[596],"ScalarEventProxy":[690]},"id":841,"nodeType":"SourceUnit","nodes":[{"id":580,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":581,"nodeType":"ImportDirective","scope":841,"sourceUnit":385,"src":"25:29:3","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":582,"nodeType":"ImportDirective","scope":841,"sourceUnit":6702,"src":"55:55:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":596,"linearizedBaseContracts":[596],"name":"ScalarEventData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":585,"name":"SHORT","nodeType":"VariableDeclaration","scope":596,"src":"178:31:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":583,"name":"uint8","nodeType":"ElementaryTypeName","src":"178:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"30","id":584,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"208:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"visibility":"public"},{"constant":true,"id":588,"name":"LONG","nodeType":"VariableDeclaration","scope":596,"src":"215:30:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":586,"name":"uint8","nodeType":"ElementaryTypeName","src":"215:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":587,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"244:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":true,"id":591,"name":"OUTCOME_RANGE","nodeType":"VariableDeclaration","scope":596,"src":"251:46:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":589,"name":"uint24","nodeType":"ElementaryTypeName","src":"251:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":590,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"290:7:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"},{"constant":false,"id":593,"name":"lowerBound","nodeType":"VariableDeclaration","scope":596,"src":"335:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":592,"name":"int","nodeType":"ElementaryTypeName","src":"335:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":595,"name":"upperBound","nodeType":"VariableDeclaration","scope":596,"src":"362:21:3","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":594,"name":"int","nodeType":"ElementaryTypeName","src":"362:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"}],"scope":841,"src":"113:273:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":597,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"417:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":598,"nodeType":"InheritanceSpecifier","src":"417:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":599,"name":"EventData","nodeType":"UserDefinedTypeName","referencedDeclaration":198,"src":"424:9:3","typeDescriptions":{"typeIdentifier":"t_contract$_EventData_$198","typeString":"contract EventData"}},"id":600,"nodeType":"InheritanceSpecifier","src":"424:9:3"},{"arguments":null,"baseName":{"contractScope":null,"id":601,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"435:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":602,"nodeType":"InheritanceSpecifier","src":"435:15:3"}],"contractDependencies":[198,596,5576,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":690,"linearizedBaseContracts":[690,596,198,6701,6673],"name":"ScalarEventProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":688,"nodeType":"Block","src":"1033:622:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":631,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":625,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":622,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1085:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":621,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":623,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:25:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":624,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1106:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1077:30:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":627,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1119:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":626,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1111:7:3","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":628,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1111:16:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":629,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1131:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1111:21:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1077:55:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":620,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1069:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":632,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1069:64:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":633,"nodeType":"ExpressionStatement","src":"1069:64:3"},{"expression":{"argumentTypes":null,"id":636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":634,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"1143:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":635,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":608,"src":"1161:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"1143:34:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":637,"nodeType":"ExpressionStatement","src":"1143:34:3"},{"expression":{"argumentTypes":null,"id":640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":638,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"1187:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":639,"name":"_oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":610,"src":"1196:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"1187:16:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":641,"nodeType":"ExpressionStatement","src":"1187:16:3"},{"body":{"id":672,"nodeType":"Block","src":"1295:214:3","statements":[{"assignments":[653],"declarations":[{"constant":false,"id":653,"name":"outcomeToken","nodeType":"VariableDeclaration","scope":689,"src":"1309:25:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},"typeName":{"contractScope":null,"id":652,"name":"OutcomeToken","nodeType":"UserDefinedTypeName","referencedDeclaration":5674,"src":"1309:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"value":null,"visibility":"internal"}],"id":660,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":657,"name":"outcomeTokenMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":606,"src":"1372:22:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":656,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1350:21:3","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$returns$_t_contract$_OutcomeTokenProxy_$5576_$","typeString":"function (address) returns (contract OutcomeTokenProxy)"},"typeName":{"contractScope":null,"id":655,"name":"OutcomeTokenProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5576,"src":"1354:17:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}},"id":658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1350:45:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeTokenProxy_$5576","typeString":"contract OutcomeTokenProxy"}],"id":654,"name":"OutcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5674,"src":"1337:12:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_OutcomeToken_$5674_$","typeString":"type(contract OutcomeToken)"}},"id":659,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1337:59:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"nodeType":"VariableDeclarationStatement","src":"1309:87:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":664,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1429:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}],"expression":{"argumentTypes":null,"id":661,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"1410:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":663,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"push","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1410:18:3","typeDescriptions":{"typeIdentifier":"t_function_arraypush_nonpayable$_t_contract$_OutcomeToken_$5674_$returns$_t_uint256_$","typeString":"function (contract OutcomeToken) returns (uint256)"}},"id":665,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1410:32:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":666,"nodeType":"ExpressionStatement","src":"1410:32:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":668,"name":"outcomeToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":653,"src":"1482:12:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},{"argumentTypes":null,"id":669,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1496:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":667,"name":"OutcomeTokenCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":164,"src":"1461:20:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_contract$_OutcomeToken_$5674_$_t_uint8_$returns$__$","typeString":"function (contract OutcomeToken,uint8)"}},"id":670,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1461:37:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":671,"nodeType":"EmitStatement","src":"1456:42:3"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":648,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":646,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1283:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"32","id":647,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1287:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1283:5:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":673,"initializationExpression":{"assignments":[643],"declarations":[{"constant":false,"id":643,"name":"i","nodeType":"VariableDeclaration","scope":689,"src":"1270:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":642,"name":"uint8","nodeType":"ElementaryTypeName","src":"1270:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":645,"initialValue":{"argumentTypes":null,"hexValue":"30","id":644,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1280:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1270:11:3"},"loopExpression":{"expression":{"argumentTypes":null,"id":650,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"1290:3:3","subExpression":{"argumentTypes":null,"id":649,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":643,"src":"1290:1:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":651,"nodeType":"ExpressionStatement","src":"1290:3:3"},"nodeType":"ForStatement","src":"1265:244:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":677,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":675,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1554:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":676,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1568:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1554:25:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":674,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1546:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":678,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1546:34:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":679,"nodeType":"ExpressionStatement","src":"1546:34:3"},{"expression":{"argumentTypes":null,"id":682,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":680,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"1590:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":681,"name":"_lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":612,"src":"1603:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1590:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":683,"nodeType":"ExpressionStatement","src":"1590:24:3"},{"expression":{"argumentTypes":null,"id":686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":684,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"1624:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":685,"name":"_upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":614,"src":"1637:11:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"1624:24:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":687,"nodeType":"ExpressionStatement","src":"1624:24:3"}]},"documentation":"@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 _lowerBound Lower bound for event outcome\n @param _upperBound Lower bound for event outcome","id":689,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":617,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":604,"src":"1005:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":618,"modifierName":{"argumentTypes":null,"id":616,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"999:5:3","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"999:14:3"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":615,"nodeType":"ParameterList","parameters":[{"constant":false,"id":604,"name":"proxied","nodeType":"VariableDeclaration","scope":689,"src":"823:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":603,"name":"address","nodeType":"ElementaryTypeName","src":"823:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":606,"name":"outcomeTokenMasterCopy","nodeType":"VariableDeclaration","scope":689,"src":"848:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":605,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":608,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":689,"src":"888:22:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":607,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"888:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":610,"name":"_oracle","nodeType":"VariableDeclaration","scope":689,"src":"920:14:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":609,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"920:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":612,"name":"_lowerBound","nodeType":"VariableDeclaration","scope":689,"src":"944:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":611,"name":"int","nodeType":"ElementaryTypeName","src":"944:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":614,"name":"_upperBound","nodeType":"VariableDeclaration","scope":689,"src":"969:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":613,"name":"int","nodeType":"ElementaryTypeName","src":"969:3:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"813:177:3"},"payable":false,"returnParameters":{"id":619,"nodeType":"ParameterList","parameters":[],"src":"1033:0:3"},"scope":690,"src":"802:853:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":841,"src":"388:1269:3"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":691,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1814:7:3","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":692,"nodeType":"InheritanceSpecifier","src":"1814:7:3"},{"arguments":null,"baseName":{"contractScope":null,"id":693,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1823:5:3","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":694,"nodeType":"InheritanceSpecifier","src":"1823:5:3"},{"arguments":null,"baseName":{"contractScope":null,"id":695,"name":"ScalarEventData","nodeType":"UserDefinedTypeName","referencedDeclaration":596,"src":"1830:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ScalarEventData_$596","typeString":"contract ScalarEventData"}},"id":696,"nodeType":"InheritanceSpecifier","src":"1830:15:3"}],"contractDependencies":[198,384,596,6673],"contractKind":"contract","documentation":"@title Scalar event contract - Scalar events resolve to a number within a range\n @author Stefan George - ","fullyImplemented":true,"id":840,"linearizedBaseContracts":[840,596,384,198,6673],"name":"ScalarEvent","nodeType":"ContractDefinition","nodes":[{"id":698,"libraryName":{"contractScope":null,"id":697,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1858:8:3","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1852:21:3","typeName":null},{"body":{"id":822,"nodeType":"Block","src":"2107:1332:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":704,"name":"isOutcomeSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":192,"src":"2166:12:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":703,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2158:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":705,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:21:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":706,"nodeType":"ExpressionStatement","src":"2158:21:3"},{"assignments":[],"declarations":[{"constant":false,"id":708,"name":"convertedWinningOutcome","nodeType":"VariableDeclaration","scope":823,"src":"2219:30:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":707,"name":"uint24","nodeType":"ElementaryTypeName","src":"2219:6:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"id":709,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"2219:30:3"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":712,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":710,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2316:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":711,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2326:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2316:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":719,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":717,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2450:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":718,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2460:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2450:20:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":738,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":724,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2590:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":736,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":726,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2623:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":727,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":194,"src":"2640:7:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":728,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2650:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2640:20:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":730,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2639:22:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:38:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":734,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":732,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"2665:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":733,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"2678:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2665:23:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"id":735,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2664:25:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2623:66:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":725,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2616:6:3","typeDescriptions":{"typeIdentifier":"t_type$_t_uint24_$","typeString":"type(uint24)"},"typeName":"uint24"},"id":737,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2616:74:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2590:100:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":739,"nodeType":"ExpressionStatement","src":"2590:100:3"},"id":740,"nodeType":"IfStatement","src":"2446:244:3","trueBody":{"expression":{"argumentTypes":null,"id":722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":720,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2484:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":721,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2510:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2484:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":723,"nodeType":"ExpressionStatement","src":"2484:39:3"}},"id":741,"nodeType":"IfStatement","src":"2312:378:3","trueBody":{"expression":{"argumentTypes":null,"id":715,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":713,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2350:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":714,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2376:1:3","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2350:27:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":716,"nodeType":"ExpressionStatement","src":"2350:27:3"}},{"assignments":[743],"declarations":[{"constant":false,"id":743,"name":"factorShort","nodeType":"VariableDeclaration","scope":823,"src":"2700:16:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":742,"name":"uint","nodeType":"ElementaryTypeName","src":"2700:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":747,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":744,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2719:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":745,"name":"convertedWinningOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":708,"src":"2735:23:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2719:39:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"VariableDeclarationStatement","src":"2700:58:3"},{"assignments":[749],"declarations":[{"constant":false,"id":749,"name":"factorLong","nodeType":"VariableDeclaration","scope":823,"src":"2768:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":748,"name":"uint","nodeType":"ElementaryTypeName","src":"2768:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":753,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":752,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":750,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"2786:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":751,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"2802:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2786:27:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2768:45:3"},{"assignments":[755],"declarations":[{"constant":false,"id":755,"name":"shortOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2823:27:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":754,"name":"uint","nodeType":"ElementaryTypeName","src":"2823:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":763,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":760,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2884:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":761,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2884:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":756,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2853:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":758,"indexExpression":{"argumentTypes":null,"id":757,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"2867:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2853:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":759,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2853:30:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":762,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2853:42:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2823:72:3"},{"assignments":[765],"declarations":[{"constant":false,"id":765,"name":"longOutcomeTokenCount","nodeType":"VariableDeclaration","scope":823,"src":"2905:26:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":764,"name":"uint","nodeType":"ElementaryTypeName","src":"2905:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":773,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":770,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"2964:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":771,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2964:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":766,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"2934:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":768,"indexExpression":{"argumentTypes":null,"id":767,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"2948:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2934:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":769,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2934:29:3","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":772,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2934:41:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2905:70:3"},{"expression":{"argumentTypes":null,"id":787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":774,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"2985:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":786,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":782,"name":"factorLong","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":749,"src":"3066:10:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":780,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3040:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"3040:25:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":783,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3040:37:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":777,"name":"factorShort","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"3023:11:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":775,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"2996:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":776,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"2996:26:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":778,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:39:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":779,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"2996:43:3","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":784,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2996:82:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":785,"name":"OUTCOME_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":591,"src":"3081:13:3","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"2996:98:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2985:109:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":788,"nodeType":"ExpressionStatement","src":"2985:109:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":793,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3169:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":794,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3169:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":795,"name":"shortOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"3181:22:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":789,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3141:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":791,"indexExpression":{"argumentTypes":null,"id":790,"name":"SHORT","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":585,"src":"3155:5:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3141:20:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":792,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3141:27:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":796,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3141:63:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":797,"nodeType":"ExpressionStatement","src":"3141:63:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":802,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3241:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":803,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3241:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":804,"name":"longOutcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":765,"src":"3253:21:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":798,"name":"outcomeTokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":197,"src":"3214:13:3","typeDescriptions":{"typeIdentifier":"t_array$_t_contract$_OutcomeToken_$5674_$dyn_storage","typeString":"contract OutcomeToken[] storage ref"}},"id":800,"indexExpression":{"argumentTypes":null,"id":799,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":588,"src":"3228:4:3","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3214:19:3","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":801,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"revoke","nodeType":"MemberAccess","referencedDeclaration":5673,"src":"3214:26:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256) external"}},"id":805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:61:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":806,"nodeType":"ExpressionStatement","src":"3214:61:3"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":810,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3355:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":811,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3355:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":812,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3367:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":808,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3330:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3330:24:3","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":813,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3330:46:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3322:7:3","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":814,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3322:55:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":815,"nodeType":"ExpressionStatement","src":"3322:55:3"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":817,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3411:3:3","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":818,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3411:10:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":819,"name":"winnings","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":701,"src":"3423:8:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":816,"name":"WinningsRedemption","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"3392:18:3","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":820,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3392:40:3","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":821,"nodeType":"EmitStatement","src":"3387:45:3"}]},"documentation":"@dev Exchanges sender's winning outcome tokens for collateral tokens\n @return Sender's winnings","id":823,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"redeemWinnings","nodeType":"FunctionDefinition","parameters":{"id":699,"nodeType":"ParameterList","parameters":[],"src":"2053:2:3"},"payable":false,"returnParameters":{"id":702,"nodeType":"ParameterList","parameters":[{"constant":false,"id":701,"name":"winnings","nodeType":"VariableDeclaration","scope":823,"src":"2088:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":700,"name":"uint","nodeType":"ElementaryTypeName","src":"2088:4:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2087:15:3"},"scope":840,"src":"2030:1409:3","stateMutability":"nonpayable","superFunction":383,"visibility":"public"},{"body":{"id":838,"nodeType":"Block","src":"3601:100:3","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":831,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3645:15:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":832,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":190,"src":"3662:6:3","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":833,"name":"lowerBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":593,"src":"3670:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":834,"name":"upperBound","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":595,"src":"3682:10:3","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":829,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"3628:3:3","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":830,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3628:16:3","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":835,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3628:65:3","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":828,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"3618:9:3","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":836,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3618:76:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"functionReturnParameters":827,"id":837,"nodeType":"Return","src":"3611:83:3"}]},"documentation":"@dev Calculates and returns event hash\n @return Event hash","id":839,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getEventHash","nodeType":"FunctionDefinition","parameters":{"id":824,"nodeType":"ParameterList","parameters":[],"src":"3540:2:3"},"payable":false,"returnParameters":{"id":827,"nodeType":"ParameterList","parameters":[{"constant":false,"id":826,"name":"","nodeType":"VariableDeclaration","scope":839,"src":"3588:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":825,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3588:7:3","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"3587:9:3"},"scope":840,"src":"3519:182:3","stateMutability":"view","superFunction":378,"visibility":"public"}],"scope":841,"src":"1790:1913:3"}],"src":"0:3704:3"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:42.988Z"}; /***/ }), @@ -396,10 +681,21 @@ module.exports = {"contract_name":"ScalarEvent","abi":[{"constant":false,"inputs /*!***************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracle.json ***! \***************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"SignedMessageOracle","abi":[{"constant":true,"inputs":[],"name":"signer","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newSigner","type":"address"},{"name":"_nonce","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"replaceSigner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"descriptionHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_outcome","type":"int256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"setOutcome","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_descriptionHash","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newSigner","type":"address"}],"name":"SignerReplacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeAssignment","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263311}; +module.exports = {"contractName":"SignedMessageOracle","abi":[{"constant":true,"inputs":[],"name":"signer","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"descriptionHash","outputs":[{"name":"","type":"bytes32"}],"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":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newSigner","type":"address"}],"name":"SignerReplacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeAssignment","type":"event"},{"constant":false,"inputs":[{"name":"newSigner","type":"address"},{"name":"_nonce","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"replaceSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_outcome","type":"int256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"setOutcome","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50610863806100206000396000f300608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063238ac9331461009e57806327793f87146100f55780635011e399146101205780637e7e4b471461019657806385dcee93146101c1578063a619486e146101f4578063c65fb3801461024b578063ccdf68f31461027a578063d9bf3187146102a9575b600080fd5b3480156100aa57600080fd5b506100b36102ff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010157600080fd5b5061010a610325565b6040518082815260200191505060405180910390f35b34801561012c57600080fd5b50610194600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803560ff1690602001909291908035600019169060200190929190803560001916906020019092919050505061032b565b005b3480156101a257600080fd5b506101ab6105f1565b6040518082815260200191505060405180910390f35b3480156101cd57600080fd5b506101d66105fb565b60405180826000191660001916815260200191505060405180910390f35b34801561020057600080fd5b50610209610601565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025757600080fd5b50610260610626565b604051808215151515815260200191505060405180910390f35b34801561028657600080fd5b5061028f610639565b604051808215151515815260200191505060405180910390f35b3480156102b557600080fd5b506102fd60048036038101908080359060200190929190803560ff16906020019092919080356000191690602001909291908035600019169060200190929190505050610650565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561038757600080fd5b600460009054906101000a900460ff161580156103a5575060035484115b80156105545750600160025486866040516020018084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040516020818303038152906040526040518082805190602001908083835b6020831015156104585780518252602082019150602081019050602083039250610433565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156104f9573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b151561055f57600080fd5b8360038190555084600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508473ffffffffffffffffffffffffffffffffffffffff167fdb3046afd053bee6427d6355ee95671fceb37ee6b944866f9ea86eaa213dac6860405160405180910390a25050505050565b6000600554905090565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900460ff1681565b6000600460009054906101000a900460ff16905090565b600460009054906101000a900460ff161580156107cd5750600160025485604051602001808360001916600019168152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831015156106d157805182526020820191506020810190506020830392506106ac565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af1158015610772573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15156107d857600080fd5b6001600460006101000a81548160ff021916908315150217905550836005819055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb71846040518082815260200191505060405180910390a1505050505600a165627a7a7230582007b4781d8e91c8d6f57a4553ec17aa294f4d5d2410a2e79f0c88177fead82d430029","deployedBytecode":"0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063238ac9331461009e57806327793f87146100f55780635011e399146101205780637e7e4b471461019657806385dcee93146101c1578063a619486e146101f4578063c65fb3801461024b578063ccdf68f31461027a578063d9bf3187146102a9575b600080fd5b3480156100aa57600080fd5b506100b36102ff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010157600080fd5b5061010a610325565b6040518082815260200191505060405180910390f35b34801561012c57600080fd5b50610194600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803560ff1690602001909291908035600019169060200190929190803560001916906020019092919050505061032b565b005b3480156101a257600080fd5b506101ab6105f1565b6040518082815260200191505060405180910390f35b3480156101cd57600080fd5b506101d66105fb565b60405180826000191660001916815260200191505060405180910390f35b34801561020057600080fd5b50610209610601565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025757600080fd5b50610260610626565b604051808215151515815260200191505060405180910390f35b34801561028657600080fd5b5061028f610639565b604051808215151515815260200191505060405180910390f35b3480156102b557600080fd5b506102fd60048036038101908080359060200190929190803560ff16906020019092919080356000191690602001909291908035600019169060200190929190505050610650565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561038757600080fd5b600460009054906101000a900460ff161580156103a5575060035484115b80156105545750600160025486866040516020018084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040516020818303038152906040526040518082805190602001908083835b6020831015156104585780518252602082019150602081019050602083039250610433565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156104f9573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b151561055f57600080fd5b8360038190555084600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508473ffffffffffffffffffffffffffffffffffffffff167fdb3046afd053bee6427d6355ee95671fceb37ee6b944866f9ea86eaa213dac6860405160405180910390a25050505050565b6000600554905090565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900460ff1681565b6000600460009054906101000a900460ff16905090565b600460009054906101000a900460ff161580156107cd5750600160025485604051602001808360001916600019168152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831015156106d157805182526020820191506020810190506020830392506106ac565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af1158015610772573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15156107d857600080fd5b6001600460006101000a81548160ff021916908315150217905550836005819055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb71846040518082815260200191505060405180910390a1505050505600a165627a7a7230582007b4781d8e91c8d6f57a4553ec17aa294f4d5d2410a2e79f0c88177fead82d430029","sourceMap":"1305:1762:23:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1305:1762:23;;;;;;;","deployedSourceMap":"1305:1762:23:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;315:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;315:21:23;;;;;;;;;;;;;;;;;;;;;;;;;;;417:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;417:18:23;;;;;;;;;;;;;;;;;;;;;;;1662:463;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1662:463:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2958:107;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2958:107:23;;;;;;;;;;;;;;;;;;;;;;;342:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;342:30:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;394:17:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;394:17:23;;;;;;;;;;;;;;;;;;;;;;;;;;;2783:108;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2783:108:23;;;;;;;;;;;;;;;;;;;;;;;;;;;2337:368;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2337:368:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;315:21;;;;;;;;;;;;;:::o;417:18::-;;;;:::o;1662:463::-;573:6;;;;;;;;;;;559:20;;:10;:20;;;551:29;;;;;;;;1870:5;;;;;;;;;;;1869:6;:40;;;;;1904:5;;1895:6;:14;1869:40;:153;;;;;1939:83;1976:15;;1993:9;2004:6;1959:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;1959:52:23;;;1949:63;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1949:63:23;;;;;;;;;;;;;;;;2014:1;2017;2020;1939:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1939:83:23;;;;;;;;1929:93;;:6;;;;;;;;;;;:93;;;1869:153;1858:165;;;;;;;;2041:6;2033:5;:14;;;;2066:9;2057:6;;:18;;;;;;;;;;;;;;;;;;2108:9;2090:28;;;;;;;;;;;;1662:463;;;;;:::o;2958:107::-;3025:3;3051:7;;3044:14;;2958:107;:::o;342:30::-;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;394:17:23:-;;;;;;;;;;;;;:::o;2783:108::-;2852:4;2879:5;;;;;;;;;;;2872:12;;2783:108;:::o;2337:368::-;2496:5;;;;;;;;;;;2495:6;:110;;;;;2531:74;2568:15;;2585:8;2551:43;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2551:43:23;;;2541:54;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2541:54:23;;;;;;;;;;;;;;;;2597:1;2600;2603;2531:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2531:74:23;;;;;;;;2521:84;;:6;;;;;;;;;;;:84;;;2495:110;2484:122;;;;;;;;2624:4;2616:5;;:12;;;;;;;;;;;;;;;;;;2648:8;2638:7;:18;;;;2671:27;2689:8;2671:27;;;;;;;;;;;;;;;;;;2337:368;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract SignedMessageOracleData {\n\n /*\n * Events\n */\n event SignerReplacement(address indexed newSigner);\n event OutcomeAssignment(int outcome);\n\n /*\n * Storage\n */\n address public signer;\n bytes32 public descriptionHash;\n uint nonce;\n bool public isSet;\n int public outcome;\n\n /*\n * Modifiers\n */\n modifier isSigner () {\n // Only signer is allowed to proceed\n require(msg.sender == signer);\n _;\n }\n}\n\ncontract SignedMessageOracleProxy is Proxy, SignedMessageOracleData {\n\n /// @dev Constructor sets signer address based on signature\n /// @param _descriptionHash Hash identifying off chain event description\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n constructor(address proxied, bytes32 _descriptionHash, uint8 v, bytes32 r, bytes32 s)\n Proxy(proxied)\n public\n {\n signer = ecrecover(_descriptionHash, v, r, s);\n descriptionHash = _descriptionHash;\n }\n}\n\n/// @title Signed message oracle contract - Allows to set an outcome with a signed message\n/// @author Stefan George - \ncontract SignedMessageOracle is Proxied, Oracle, SignedMessageOracleData {\n\n /*\n * Public functions\n */\n /// @dev Replaces signer\n /// @param newSigner New signer\n /// @param _nonce Unique nonce to prevent replay attacks\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n function replaceSigner(address newSigner, uint _nonce, uint8 v, bytes32 r, bytes32 s)\n public\n isSigner\n {\n // Result is not set yet and nonce and signer are valid\n require( !isSet\n && _nonce > nonce\n && signer == ecrecover(keccak256(abi.encodePacked(descriptionHash, newSigner, _nonce)), v, r, s));\n nonce = _nonce;\n signer = newSigner;\n emit SignerReplacement(newSigner);\n }\n\n /// @dev Sets outcome based on signed message\n /// @param _outcome Signed event outcome\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n function setOutcome(int _outcome, uint8 v, bytes32 r, bytes32 s)\n public\n {\n // Result is not set yet and signer is valid\n require( !isSet\n && signer == ecrecover(keccak256(abi.encodePacked(descriptionHash, _outcome)), v, r, s));\n isSet = true;\n outcome = _outcome;\n emit OutcomeAssignment(_outcome);\n }\n\n /// @dev Returns if winning outcome\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return outcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","exportedSymbols":{"SignedMessageOracle":[4906],"SignedMessageOracleData":[4751],"SignedMessageOracleProxy":[4786]},"id":4907,"nodeType":"SourceUnit","nodes":[{"id":4719,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:23"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4720,"nodeType":"ImportDirective","scope":4907,"sourceUnit":4718,"src":"25:31:23","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4721,"nodeType":"ImportDirective","scope":4907,"sourceUnit":6702,"src":"57:55:23","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4751,"linearizedBaseContracts":[4751],"name":"SignedMessageOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4725,"name":"SignerReplacement","nodeType":"EventDefinition","parameters":{"id":4724,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4723,"indexed":true,"name":"newSigner","nodeType":"VariableDeclaration","scope":4725,"src":"209:25:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4722,"name":"address","nodeType":"ElementaryTypeName","src":"209:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"208:27:23"},"src":"185:51:23"},{"anonymous":false,"documentation":null,"id":4729,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4728,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4727,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4729,"src":"265:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4726,"name":"int","nodeType":"ElementaryTypeName","src":"265:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"264:13:23"},"src":"241:37:23"},{"constant":false,"id":4731,"name":"signer","nodeType":"VariableDeclaration","scope":4751,"src":"315:21:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4730,"name":"address","nodeType":"ElementaryTypeName","src":"315:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":4733,"name":"descriptionHash","nodeType":"VariableDeclaration","scope":4751,"src":"342:30:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4732,"name":"bytes32","nodeType":"ElementaryTypeName","src":"342:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"public"},{"constant":false,"id":4735,"name":"nonce","nodeType":"VariableDeclaration","scope":4751,"src":"378:10:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4734,"name":"uint","nodeType":"ElementaryTypeName","src":"378:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4737,"name":"isSet","nodeType":"VariableDeclaration","scope":4751,"src":"394:17:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4736,"name":"bool","nodeType":"ElementaryTypeName","src":"394:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":4739,"name":"outcome","nodeType":"VariableDeclaration","scope":4751,"src":"417:18:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4738,"name":"int","nodeType":"ElementaryTypeName","src":"417:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":4749,"nodeType":"Block","src":"496:102:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4745,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4742,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"559:3:23","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4743,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"559:10:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":4744,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"573:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"559:20:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4741,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"551:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4746,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"551:29:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4747,"nodeType":"ExpressionStatement","src":"551:29:23"},{"id":4748,"nodeType":"PlaceholderStatement","src":"590:1:23"}]},"documentation":null,"id":4750,"name":"isSigner","nodeType":"ModifierDefinition","parameters":{"id":4740,"nodeType":"ParameterList","parameters":[],"src":"493:2:23"},"src":"475:123:23","visibility":"internal"}],"scope":4907,"src":"115:485:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4752,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"639:5:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4753,"nodeType":"InheritanceSpecifier","src":"639:5:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4754,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"646:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4755,"nodeType":"InheritanceSpecifier","src":"646:23:23"}],"contractDependencies":[4751,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4786,"linearizedBaseContracts":[4786,4751,6701,6673],"name":"SignedMessageOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4784,"nodeType":"Block","src":"1057:106:23","statements":[{"expression":{"argumentTypes":null,"id":4778,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4771,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1067:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4773,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1086:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4774,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4761,"src":"1104:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4775,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4763,"src":"1107:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4776,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4765,"src":"1110:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4772,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1076:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4777,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1076:36:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1067:45:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4779,"nodeType":"ExpressionStatement","src":"1067:45:23"},{"expression":{"argumentTypes":null,"id":4782,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4780,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1122:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4781,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1140:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"src":"1122:34:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"id":4783,"nodeType":"ExpressionStatement","src":"1122:34:23"}]},"documentation":"@dev Constructor sets signer address based on signature\n @param _descriptionHash Hash identifying off chain event description\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4785,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4768,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4757,"src":"1029:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4769,"modifierName":{"argumentTypes":null,"id":4767,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1023:5:23","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1023:14:23"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4766,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4757,"name":"proxied","nodeType":"VariableDeclaration","scope":4785,"src":"941:15:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4756,"name":"address","nodeType":"ElementaryTypeName","src":"941:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4759,"name":"_descriptionHash","nodeType":"VariableDeclaration","scope":4785,"src":"958:24:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4758,"name":"bytes32","nodeType":"ElementaryTypeName","src":"958:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4761,"name":"v","nodeType":"VariableDeclaration","scope":4785,"src":"984:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4760,"name":"uint8","nodeType":"ElementaryTypeName","src":"984:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4763,"name":"r","nodeType":"VariableDeclaration","scope":4785,"src":"993:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4762,"name":"bytes32","nodeType":"ElementaryTypeName","src":"993:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4765,"name":"s","nodeType":"VariableDeclaration","scope":4785,"src":"1004:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4764,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1004:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"940:74:23"},"payable":false,"returnParameters":{"id":4770,"nodeType":"ParameterList","parameters":[],"src":"1057:0:23"},"scope":4786,"src":"929:234:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4907,"src":"602:563:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4787,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1337:7:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4788,"nodeType":"InheritanceSpecifier","src":"1337:7:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4789,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1346:6:23","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4790,"nodeType":"InheritanceSpecifier","src":"1346:6:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4791,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"1354:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4792,"nodeType":"InheritanceSpecifier","src":"1354:23:23"}],"contractDependencies":[4717,4751,6673],"contractKind":"contract","documentation":"@title Signed message oracle contract - Allows to set an outcome with a signed message\n @author Stefan George - ","fullyImplemented":true,"id":4906,"linearizedBaseContracts":[4906,4751,4717,6673],"name":"SignedMessageOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4844,"nodeType":"Block","src":"1784:341:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4829,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1869:6:23","subExpression":{"argumentTypes":null,"id":4808,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"1870:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4812,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4810,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"1895:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4811,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"1904:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1895:14:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:40:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4828,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4814,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1929:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4819,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1976:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4820,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"1993:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4821,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2004:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4817,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"1959:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4818,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1959:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4822,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1959:52:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4816,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"1949:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4823,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1949:63:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4824,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4798,"src":"2014:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4825,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4800,"src":"2017:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4826,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4802,"src":"2020:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4815,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1939:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4827,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1939:83:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1929:93:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:153:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1858:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4830,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1858:165:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4831,"nodeType":"ExpressionStatement","src":"1858:165:23"},{"expression":{"argumentTypes":null,"id":4834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4832,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"2033:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4833,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2041:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2033:14:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4835,"nodeType":"ExpressionStatement","src":"2033:14:23"},{"expression":{"argumentTypes":null,"id":4838,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4836,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2057:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4837,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2066:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2057:18:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4839,"nodeType":"ExpressionStatement","src":"2057:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4841,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2108:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":4840,"name":"SignerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4725,"src":"2090:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":4842,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2090:28:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4843,"nodeType":"EmitStatement","src":"2085:33:23"}]},"documentation":"@dev Replaces signer\n @param newSigner New signer\n @param _nonce Unique nonce to prevent replay attacks\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4845,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4805,"modifierName":{"argumentTypes":null,"id":4804,"name":"isSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4750,"src":"1771:8:23","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1771:8:23"}],"name":"replaceSigner","nodeType":"FunctionDefinition","parameters":{"id":4803,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4794,"name":"newSigner","nodeType":"VariableDeclaration","scope":4845,"src":"1685:17:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4793,"name":"address","nodeType":"ElementaryTypeName","src":"1685:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4796,"name":"_nonce","nodeType":"VariableDeclaration","scope":4845,"src":"1704:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4795,"name":"uint","nodeType":"ElementaryTypeName","src":"1704:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4798,"name":"v","nodeType":"VariableDeclaration","scope":4845,"src":"1717:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4797,"name":"uint8","nodeType":"ElementaryTypeName","src":"1717:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4800,"name":"r","nodeType":"VariableDeclaration","scope":4845,"src":"1726:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4799,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1726:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4802,"name":"s","nodeType":"VariableDeclaration","scope":4845,"src":"1737:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4801,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1737:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"1684:63:23"},"payable":false,"returnParameters":{"id":4806,"nodeType":"ParameterList","parameters":[],"src":"1784:0:23"},"scope":4906,"src":"1662:463:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4888,"nodeType":"Block","src":"2421:284:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4873,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:6:23","subExpression":{"argumentTypes":null,"id":4857,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2496:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4859,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2521:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4864,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"2568:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4865,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2585:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":4862,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2551:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4863,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2551:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4866,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2551:43:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4861,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2541:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2541:54:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4868,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4849,"src":"2597:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4869,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4851,"src":"2600:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4870,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4853,"src":"2603:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4860,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"2531:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4871,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2531:74:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2521:84:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:110:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4856,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2484:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4874,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2484:122:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4875,"nodeType":"ExpressionStatement","src":"2484:122:23"},{"expression":{"argumentTypes":null,"id":4878,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4876,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2616:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4877,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2624:4:23","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2616:12:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4879,"nodeType":"ExpressionStatement","src":"2616:12:23"},{"expression":{"argumentTypes":null,"id":4882,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4880,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"2638:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4881,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2648:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2638:18:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4883,"nodeType":"ExpressionStatement","src":"2638:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4885,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2689:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4884,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4729,"src":"2671:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":4886,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2671:27:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4887,"nodeType":"EmitStatement","src":"2666:32:23"}]},"documentation":"@dev Sets outcome based on signed message\n @param _outcome Signed event outcome\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4889,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4854,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4847,"name":"_outcome","nodeType":"VariableDeclaration","scope":4889,"src":"2357:12:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4846,"name":"int","nodeType":"ElementaryTypeName","src":"2357:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4849,"name":"v","nodeType":"VariableDeclaration","scope":4889,"src":"2371:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4848,"name":"uint8","nodeType":"ElementaryTypeName","src":"2371:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4851,"name":"r","nodeType":"VariableDeclaration","scope":4889,"src":"2380:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4850,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2380:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4853,"name":"s","nodeType":"VariableDeclaration","scope":4889,"src":"2391:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4852,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2391:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2356:45:23"},"payable":false,"returnParameters":{"id":4855,"nodeType":"ParameterList","parameters":[],"src":"2421:0:23"},"scope":4906,"src":"2337:368:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4896,"nodeType":"Block","src":"2862:29:23","statements":[{"expression":{"argumentTypes":null,"id":4894,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2879:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4893,"id":4895,"nodeType":"Return","src":"2872:12:23"}]},"documentation":"@dev Returns if winning outcome\n @return Is outcome set?","id":4897,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4890,"nodeType":"ParameterList","parameters":[],"src":"2804:2:23"},"payable":false,"returnParameters":{"id":4893,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4892,"name":"","nodeType":"VariableDeclaration","scope":4897,"src":"2852:4:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4891,"name":"bool","nodeType":"ElementaryTypeName","src":"2852:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2851:6:23"},"scope":4906,"src":"2783:108:23","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4904,"nodeType":"Block","src":"3034:31:23","statements":[{"expression":{"argumentTypes":null,"id":4902,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"3051:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4901,"id":4903,"nodeType":"Return","src":"3044:14:23"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4905,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4898,"nodeType":"ParameterList","parameters":[],"src":"2977:2:23"},"payable":false,"returnParameters":{"id":4901,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4900,"name":"","nodeType":"VariableDeclaration","scope":4905,"src":"3025:3:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4899,"name":"int","nodeType":"ElementaryTypeName","src":"3025:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3024:5:23"},"scope":4906,"src":"2958:107:23","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4907,"src":"1305:1762:23"}],"src":"0:3068:23"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","exportedSymbols":{"SignedMessageOracle":[4906],"SignedMessageOracleData":[4751],"SignedMessageOracleProxy":[4786]},"id":4907,"nodeType":"SourceUnit","nodes":[{"id":4719,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:23"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4720,"nodeType":"ImportDirective","scope":4907,"sourceUnit":4718,"src":"25:31:23","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4721,"nodeType":"ImportDirective","scope":4907,"sourceUnit":6702,"src":"57:55:23","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4751,"linearizedBaseContracts":[4751],"name":"SignedMessageOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4725,"name":"SignerReplacement","nodeType":"EventDefinition","parameters":{"id":4724,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4723,"indexed":true,"name":"newSigner","nodeType":"VariableDeclaration","scope":4725,"src":"209:25:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4722,"name":"address","nodeType":"ElementaryTypeName","src":"209:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"208:27:23"},"src":"185:51:23"},{"anonymous":false,"documentation":null,"id":4729,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4728,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4727,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4729,"src":"265:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4726,"name":"int","nodeType":"ElementaryTypeName","src":"265:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"264:13:23"},"src":"241:37:23"},{"constant":false,"id":4731,"name":"signer","nodeType":"VariableDeclaration","scope":4751,"src":"315:21:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4730,"name":"address","nodeType":"ElementaryTypeName","src":"315:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":4733,"name":"descriptionHash","nodeType":"VariableDeclaration","scope":4751,"src":"342:30:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4732,"name":"bytes32","nodeType":"ElementaryTypeName","src":"342:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"public"},{"constant":false,"id":4735,"name":"nonce","nodeType":"VariableDeclaration","scope":4751,"src":"378:10:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4734,"name":"uint","nodeType":"ElementaryTypeName","src":"378:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4737,"name":"isSet","nodeType":"VariableDeclaration","scope":4751,"src":"394:17:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4736,"name":"bool","nodeType":"ElementaryTypeName","src":"394:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":4739,"name":"outcome","nodeType":"VariableDeclaration","scope":4751,"src":"417:18:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4738,"name":"int","nodeType":"ElementaryTypeName","src":"417:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":4749,"nodeType":"Block","src":"496:102:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4745,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4742,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"559:3:23","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4743,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"559:10:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":4744,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"573:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"559:20:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4741,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"551:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4746,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"551:29:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4747,"nodeType":"ExpressionStatement","src":"551:29:23"},{"id":4748,"nodeType":"PlaceholderStatement","src":"590:1:23"}]},"documentation":null,"id":4750,"name":"isSigner","nodeType":"ModifierDefinition","parameters":{"id":4740,"nodeType":"ParameterList","parameters":[],"src":"493:2:23"},"src":"475:123:23","visibility":"internal"}],"scope":4907,"src":"115:485:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4752,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"639:5:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4753,"nodeType":"InheritanceSpecifier","src":"639:5:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4754,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"646:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4755,"nodeType":"InheritanceSpecifier","src":"646:23:23"}],"contractDependencies":[4751,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4786,"linearizedBaseContracts":[4786,4751,6701,6673],"name":"SignedMessageOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4784,"nodeType":"Block","src":"1057:106:23","statements":[{"expression":{"argumentTypes":null,"id":4778,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4771,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1067:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4773,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1086:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4774,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4761,"src":"1104:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4775,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4763,"src":"1107:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4776,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4765,"src":"1110:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4772,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1076:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4777,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1076:36:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1067:45:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4779,"nodeType":"ExpressionStatement","src":"1067:45:23"},{"expression":{"argumentTypes":null,"id":4782,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4780,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1122:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4781,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1140:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"src":"1122:34:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"id":4783,"nodeType":"ExpressionStatement","src":"1122:34:23"}]},"documentation":"@dev Constructor sets signer address based on signature\n @param _descriptionHash Hash identifying off chain event description\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4785,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4768,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4757,"src":"1029:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4769,"modifierName":{"argumentTypes":null,"id":4767,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1023:5:23","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1023:14:23"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4766,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4757,"name":"proxied","nodeType":"VariableDeclaration","scope":4785,"src":"941:15:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4756,"name":"address","nodeType":"ElementaryTypeName","src":"941:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4759,"name":"_descriptionHash","nodeType":"VariableDeclaration","scope":4785,"src":"958:24:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4758,"name":"bytes32","nodeType":"ElementaryTypeName","src":"958:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4761,"name":"v","nodeType":"VariableDeclaration","scope":4785,"src":"984:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4760,"name":"uint8","nodeType":"ElementaryTypeName","src":"984:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4763,"name":"r","nodeType":"VariableDeclaration","scope":4785,"src":"993:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4762,"name":"bytes32","nodeType":"ElementaryTypeName","src":"993:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4765,"name":"s","nodeType":"VariableDeclaration","scope":4785,"src":"1004:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4764,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1004:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"940:74:23"},"payable":false,"returnParameters":{"id":4770,"nodeType":"ParameterList","parameters":[],"src":"1057:0:23"},"scope":4786,"src":"929:234:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4907,"src":"602:563:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4787,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1337:7:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4788,"nodeType":"InheritanceSpecifier","src":"1337:7:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4789,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1346:6:23","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4790,"nodeType":"InheritanceSpecifier","src":"1346:6:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4791,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"1354:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4792,"nodeType":"InheritanceSpecifier","src":"1354:23:23"}],"contractDependencies":[4717,4751,6673],"contractKind":"contract","documentation":"@title Signed message oracle contract - Allows to set an outcome with a signed message\n @author Stefan George - ","fullyImplemented":true,"id":4906,"linearizedBaseContracts":[4906,4751,4717,6673],"name":"SignedMessageOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4844,"nodeType":"Block","src":"1784:341:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4829,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1869:6:23","subExpression":{"argumentTypes":null,"id":4808,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"1870:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4812,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4810,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"1895:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4811,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"1904:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1895:14:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:40:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4828,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4814,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1929:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4819,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1976:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4820,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"1993:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4821,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2004:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4817,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"1959:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4818,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1959:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4822,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1959:52:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4816,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"1949:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4823,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1949:63:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4824,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4798,"src":"2014:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4825,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4800,"src":"2017:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4826,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4802,"src":"2020:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4815,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1939:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4827,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1939:83:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1929:93:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:153:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1858:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4830,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1858:165:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4831,"nodeType":"ExpressionStatement","src":"1858:165:23"},{"expression":{"argumentTypes":null,"id":4834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4832,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"2033:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4833,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2041:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2033:14:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4835,"nodeType":"ExpressionStatement","src":"2033:14:23"},{"expression":{"argumentTypes":null,"id":4838,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4836,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2057:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4837,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2066:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2057:18:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4839,"nodeType":"ExpressionStatement","src":"2057:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4841,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2108:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":4840,"name":"SignerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4725,"src":"2090:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":4842,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2090:28:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4843,"nodeType":"EmitStatement","src":"2085:33:23"}]},"documentation":"@dev Replaces signer\n @param newSigner New signer\n @param _nonce Unique nonce to prevent replay attacks\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4845,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4805,"modifierName":{"argumentTypes":null,"id":4804,"name":"isSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4750,"src":"1771:8:23","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1771:8:23"}],"name":"replaceSigner","nodeType":"FunctionDefinition","parameters":{"id":4803,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4794,"name":"newSigner","nodeType":"VariableDeclaration","scope":4845,"src":"1685:17:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4793,"name":"address","nodeType":"ElementaryTypeName","src":"1685:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4796,"name":"_nonce","nodeType":"VariableDeclaration","scope":4845,"src":"1704:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4795,"name":"uint","nodeType":"ElementaryTypeName","src":"1704:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4798,"name":"v","nodeType":"VariableDeclaration","scope":4845,"src":"1717:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4797,"name":"uint8","nodeType":"ElementaryTypeName","src":"1717:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4800,"name":"r","nodeType":"VariableDeclaration","scope":4845,"src":"1726:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4799,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1726:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4802,"name":"s","nodeType":"VariableDeclaration","scope":4845,"src":"1737:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4801,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1737:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"1684:63:23"},"payable":false,"returnParameters":{"id":4806,"nodeType":"ParameterList","parameters":[],"src":"1784:0:23"},"scope":4906,"src":"1662:463:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4888,"nodeType":"Block","src":"2421:284:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4873,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:6:23","subExpression":{"argumentTypes":null,"id":4857,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2496:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4859,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2521:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4864,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"2568:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4865,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2585:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":4862,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2551:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4863,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2551:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4866,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2551:43:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4861,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2541:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2541:54:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4868,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4849,"src":"2597:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4869,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4851,"src":"2600:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4870,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4853,"src":"2603:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4860,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"2531:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4871,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2531:74:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2521:84:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:110:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4856,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2484:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4874,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2484:122:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4875,"nodeType":"ExpressionStatement","src":"2484:122:23"},{"expression":{"argumentTypes":null,"id":4878,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4876,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2616:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4877,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2624:4:23","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2616:12:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4879,"nodeType":"ExpressionStatement","src":"2616:12:23"},{"expression":{"argumentTypes":null,"id":4882,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4880,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"2638:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4881,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2648:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2638:18:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4883,"nodeType":"ExpressionStatement","src":"2638:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4885,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2689:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4884,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4729,"src":"2671:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":4886,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2671:27:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4887,"nodeType":"EmitStatement","src":"2666:32:23"}]},"documentation":"@dev Sets outcome based on signed message\n @param _outcome Signed event outcome\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4889,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4854,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4847,"name":"_outcome","nodeType":"VariableDeclaration","scope":4889,"src":"2357:12:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4846,"name":"int","nodeType":"ElementaryTypeName","src":"2357:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4849,"name":"v","nodeType":"VariableDeclaration","scope":4889,"src":"2371:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4848,"name":"uint8","nodeType":"ElementaryTypeName","src":"2371:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4851,"name":"r","nodeType":"VariableDeclaration","scope":4889,"src":"2380:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4850,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2380:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4853,"name":"s","nodeType":"VariableDeclaration","scope":4889,"src":"2391:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4852,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2391:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2356:45:23"},"payable":false,"returnParameters":{"id":4855,"nodeType":"ParameterList","parameters":[],"src":"2421:0:23"},"scope":4906,"src":"2337:368:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4896,"nodeType":"Block","src":"2862:29:23","statements":[{"expression":{"argumentTypes":null,"id":4894,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2879:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4893,"id":4895,"nodeType":"Return","src":"2872:12:23"}]},"documentation":"@dev Returns if winning outcome\n @return Is outcome set?","id":4897,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4890,"nodeType":"ParameterList","parameters":[],"src":"2804:2:23"},"payable":false,"returnParameters":{"id":4893,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4892,"name":"","nodeType":"VariableDeclaration","scope":4897,"src":"2852:4:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4891,"name":"bool","nodeType":"ElementaryTypeName","src":"2852:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2851:6:23"},"scope":4906,"src":"2783:108:23","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4904,"nodeType":"Block","src":"3034:31:23","statements":[{"expression":{"argumentTypes":null,"id":4902,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"3051:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4901,"id":4903,"nodeType":"Return","src":"3044:14:23"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4905,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4898,"nodeType":"ParameterList","parameters":[],"src":"2977:2:23"},"payable":false,"returnParameters":{"id":4901,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4900,"name":"","nodeType":"VariableDeclaration","scope":4905,"src":"3025:3:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4899,"name":"int","nodeType":"ElementaryTypeName","src":"3025:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3024:5:23"},"scope":4906,"src":"2958:107:23","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4907,"src":"1305:1762:23"}],"src":"0:3068:23"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0xf4b7cc4757a27424a4266ab0767151a3899fce7e","transactionHash":"0xeaa40ead0ca38258e06ce91f660e6878df0606485cecd4b9ccf71e011d3eaa21"},"4":{"address":"0xa6c535ae22a329991d0391aa2ac671fb2c4ab600","transactionHash":"0x842cef24885676988b73d73a641ec7ab36d905cde2e17f9404f1dcc90e7d3f00"},"42":{"address":"0x7798870dfb8471b91428fb09c67d41f5693bbd8d","transactionHash":"0xc201bfd9e0c9d3320e1fa2bf2a46f2a65499c5cb839d973081bec897346717c9"},"437894314312":{"address":"0xe982e462b094850f12af94d21d470e21be9d0e9c","transactionHash":"0xb07a1066f89976769f172c1f8cf4e146f5c494b1a51a7b80b17e8d6faf8bd4d9"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.805Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracleData.json": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracleData.json ***! + \*******************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"SignedMessageOracleData","abi":[{"constant":true,"inputs":[],"name":"signer","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"descriptionHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newSigner","type":"address"}],"name":"SignerReplacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeAssignment","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b506101bb806100206000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063238ac9331461006757806327793f87146100be57806385dcee93146100e9578063c65fb3801461011c575b600080fd5b34801561007357600080fd5b5061007c61014b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100ca57600080fd5b506100d3610170565b6040518082815260200191505060405180910390f35b3480156100f557600080fd5b506100fe610176565b60405180826000191660001916815260200191505060405180910390f35b34801561012857600080fd5b5061013161017c565b604051808215151515815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60015481565b600360009054906101000a900460ff16815600a165627a7a72305820e50eafe59d99cd8dcfa9b4dd0f25cd8982da6416cf3b39f3daf9dc0a2b7c98170029","deployedBytecode":"0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063238ac9331461006757806327793f87146100be57806385dcee93146100e9578063c65fb3801461011c575b600080fd5b34801561007357600080fd5b5061007c61014b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100ca57600080fd5b506100d3610170565b6040518082815260200191505060405180910390f35b3480156100f557600080fd5b506100fe610176565b60405180826000191660001916815260200191505060405180910390f35b34801561012857600080fd5b5061013161017c565b604051808215151515815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60015481565b600360009054906101000a900460ff16815600a165627a7a72305820e50eafe59d99cd8dcfa9b4dd0f25cd8982da6416cf3b39f3daf9dc0a2b7c98170029","sourceMap":"115:485:23:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;115:485:23;;;;;;;","deployedSourceMap":"115:485:23:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;315:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;315:21:23;;;;;;;;;;;;;;;;;;;;;;;;;;;417:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;417:18:23;;;;;;;;;;;;;;;;;;;;;;;342:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;342:30:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;394:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;394:17:23;;;;;;;;;;;;;;;;;;;;;;;;;;;315:21;;;;;;;;;;;;;:::o;417:18::-;;;;:::o;342:30::-;;;;:::o;394:17::-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract SignedMessageOracleData {\n\n /*\n * Events\n */\n event SignerReplacement(address indexed newSigner);\n event OutcomeAssignment(int outcome);\n\n /*\n * Storage\n */\n address public signer;\n bytes32 public descriptionHash;\n uint nonce;\n bool public isSet;\n int public outcome;\n\n /*\n * Modifiers\n */\n modifier isSigner () {\n // Only signer is allowed to proceed\n require(msg.sender == signer);\n _;\n }\n}\n\ncontract SignedMessageOracleProxy is Proxy, SignedMessageOracleData {\n\n /// @dev Constructor sets signer address based on signature\n /// @param _descriptionHash Hash identifying off chain event description\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n constructor(address proxied, bytes32 _descriptionHash, uint8 v, bytes32 r, bytes32 s)\n Proxy(proxied)\n public\n {\n signer = ecrecover(_descriptionHash, v, r, s);\n descriptionHash = _descriptionHash;\n }\n}\n\n/// @title Signed message oracle contract - Allows to set an outcome with a signed message\n/// @author Stefan George - \ncontract SignedMessageOracle is Proxied, Oracle, SignedMessageOracleData {\n\n /*\n * Public functions\n */\n /// @dev Replaces signer\n /// @param newSigner New signer\n /// @param _nonce Unique nonce to prevent replay attacks\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n function replaceSigner(address newSigner, uint _nonce, uint8 v, bytes32 r, bytes32 s)\n public\n isSigner\n {\n // Result is not set yet and nonce and signer are valid\n require( !isSet\n && _nonce > nonce\n && signer == ecrecover(keccak256(abi.encodePacked(descriptionHash, newSigner, _nonce)), v, r, s));\n nonce = _nonce;\n signer = newSigner;\n emit SignerReplacement(newSigner);\n }\n\n /// @dev Sets outcome based on signed message\n /// @param _outcome Signed event outcome\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n function setOutcome(int _outcome, uint8 v, bytes32 r, bytes32 s)\n public\n {\n // Result is not set yet and signer is valid\n require( !isSet\n && signer == ecrecover(keccak256(abi.encodePacked(descriptionHash, _outcome)), v, r, s));\n isSet = true;\n outcome = _outcome;\n emit OutcomeAssignment(_outcome);\n }\n\n /// @dev Returns if winning outcome\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return outcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","exportedSymbols":{"SignedMessageOracle":[4906],"SignedMessageOracleData":[4751],"SignedMessageOracleProxy":[4786]},"id":4907,"nodeType":"SourceUnit","nodes":[{"id":4719,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:23"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4720,"nodeType":"ImportDirective","scope":4907,"sourceUnit":4718,"src":"25:31:23","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4721,"nodeType":"ImportDirective","scope":4907,"sourceUnit":6702,"src":"57:55:23","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4751,"linearizedBaseContracts":[4751],"name":"SignedMessageOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4725,"name":"SignerReplacement","nodeType":"EventDefinition","parameters":{"id":4724,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4723,"indexed":true,"name":"newSigner","nodeType":"VariableDeclaration","scope":4725,"src":"209:25:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4722,"name":"address","nodeType":"ElementaryTypeName","src":"209:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"208:27:23"},"src":"185:51:23"},{"anonymous":false,"documentation":null,"id":4729,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4728,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4727,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4729,"src":"265:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4726,"name":"int","nodeType":"ElementaryTypeName","src":"265:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"264:13:23"},"src":"241:37:23"},{"constant":false,"id":4731,"name":"signer","nodeType":"VariableDeclaration","scope":4751,"src":"315:21:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4730,"name":"address","nodeType":"ElementaryTypeName","src":"315:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":4733,"name":"descriptionHash","nodeType":"VariableDeclaration","scope":4751,"src":"342:30:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4732,"name":"bytes32","nodeType":"ElementaryTypeName","src":"342:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"public"},{"constant":false,"id":4735,"name":"nonce","nodeType":"VariableDeclaration","scope":4751,"src":"378:10:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4734,"name":"uint","nodeType":"ElementaryTypeName","src":"378:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4737,"name":"isSet","nodeType":"VariableDeclaration","scope":4751,"src":"394:17:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4736,"name":"bool","nodeType":"ElementaryTypeName","src":"394:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":4739,"name":"outcome","nodeType":"VariableDeclaration","scope":4751,"src":"417:18:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4738,"name":"int","nodeType":"ElementaryTypeName","src":"417:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":4749,"nodeType":"Block","src":"496:102:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4745,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4742,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"559:3:23","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4743,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"559:10:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":4744,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"573:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"559:20:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4741,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"551:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4746,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"551:29:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4747,"nodeType":"ExpressionStatement","src":"551:29:23"},{"id":4748,"nodeType":"PlaceholderStatement","src":"590:1:23"}]},"documentation":null,"id":4750,"name":"isSigner","nodeType":"ModifierDefinition","parameters":{"id":4740,"nodeType":"ParameterList","parameters":[],"src":"493:2:23"},"src":"475:123:23","visibility":"internal"}],"scope":4907,"src":"115:485:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4752,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"639:5:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4753,"nodeType":"InheritanceSpecifier","src":"639:5:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4754,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"646:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4755,"nodeType":"InheritanceSpecifier","src":"646:23:23"}],"contractDependencies":[4751,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4786,"linearizedBaseContracts":[4786,4751,6701,6673],"name":"SignedMessageOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4784,"nodeType":"Block","src":"1057:106:23","statements":[{"expression":{"argumentTypes":null,"id":4778,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4771,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1067:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4773,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1086:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4774,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4761,"src":"1104:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4775,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4763,"src":"1107:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4776,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4765,"src":"1110:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4772,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1076:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4777,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1076:36:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1067:45:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4779,"nodeType":"ExpressionStatement","src":"1067:45:23"},{"expression":{"argumentTypes":null,"id":4782,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4780,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1122:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4781,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1140:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"src":"1122:34:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"id":4783,"nodeType":"ExpressionStatement","src":"1122:34:23"}]},"documentation":"@dev Constructor sets signer address based on signature\n @param _descriptionHash Hash identifying off chain event description\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4785,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4768,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4757,"src":"1029:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4769,"modifierName":{"argumentTypes":null,"id":4767,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1023:5:23","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1023:14:23"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4766,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4757,"name":"proxied","nodeType":"VariableDeclaration","scope":4785,"src":"941:15:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4756,"name":"address","nodeType":"ElementaryTypeName","src":"941:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4759,"name":"_descriptionHash","nodeType":"VariableDeclaration","scope":4785,"src":"958:24:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4758,"name":"bytes32","nodeType":"ElementaryTypeName","src":"958:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4761,"name":"v","nodeType":"VariableDeclaration","scope":4785,"src":"984:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4760,"name":"uint8","nodeType":"ElementaryTypeName","src":"984:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4763,"name":"r","nodeType":"VariableDeclaration","scope":4785,"src":"993:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4762,"name":"bytes32","nodeType":"ElementaryTypeName","src":"993:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4765,"name":"s","nodeType":"VariableDeclaration","scope":4785,"src":"1004:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4764,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1004:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"940:74:23"},"payable":false,"returnParameters":{"id":4770,"nodeType":"ParameterList","parameters":[],"src":"1057:0:23"},"scope":4786,"src":"929:234:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4907,"src":"602:563:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4787,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1337:7:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4788,"nodeType":"InheritanceSpecifier","src":"1337:7:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4789,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1346:6:23","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4790,"nodeType":"InheritanceSpecifier","src":"1346:6:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4791,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"1354:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4792,"nodeType":"InheritanceSpecifier","src":"1354:23:23"}],"contractDependencies":[4717,4751,6673],"contractKind":"contract","documentation":"@title Signed message oracle contract - Allows to set an outcome with a signed message\n @author Stefan George - ","fullyImplemented":true,"id":4906,"linearizedBaseContracts":[4906,4751,4717,6673],"name":"SignedMessageOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4844,"nodeType":"Block","src":"1784:341:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4829,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1869:6:23","subExpression":{"argumentTypes":null,"id":4808,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"1870:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4812,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4810,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"1895:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4811,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"1904:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1895:14:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:40:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4828,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4814,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1929:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4819,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1976:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4820,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"1993:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4821,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2004:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4817,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"1959:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4818,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1959:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4822,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1959:52:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4816,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"1949:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4823,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1949:63:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4824,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4798,"src":"2014:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4825,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4800,"src":"2017:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4826,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4802,"src":"2020:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4815,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1939:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4827,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1939:83:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1929:93:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:153:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1858:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4830,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1858:165:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4831,"nodeType":"ExpressionStatement","src":"1858:165:23"},{"expression":{"argumentTypes":null,"id":4834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4832,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"2033:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4833,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2041:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2033:14:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4835,"nodeType":"ExpressionStatement","src":"2033:14:23"},{"expression":{"argumentTypes":null,"id":4838,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4836,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2057:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4837,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2066:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2057:18:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4839,"nodeType":"ExpressionStatement","src":"2057:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4841,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2108:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":4840,"name":"SignerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4725,"src":"2090:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":4842,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2090:28:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4843,"nodeType":"EmitStatement","src":"2085:33:23"}]},"documentation":"@dev Replaces signer\n @param newSigner New signer\n @param _nonce Unique nonce to prevent replay attacks\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4845,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4805,"modifierName":{"argumentTypes":null,"id":4804,"name":"isSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4750,"src":"1771:8:23","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1771:8:23"}],"name":"replaceSigner","nodeType":"FunctionDefinition","parameters":{"id":4803,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4794,"name":"newSigner","nodeType":"VariableDeclaration","scope":4845,"src":"1685:17:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4793,"name":"address","nodeType":"ElementaryTypeName","src":"1685:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4796,"name":"_nonce","nodeType":"VariableDeclaration","scope":4845,"src":"1704:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4795,"name":"uint","nodeType":"ElementaryTypeName","src":"1704:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4798,"name":"v","nodeType":"VariableDeclaration","scope":4845,"src":"1717:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4797,"name":"uint8","nodeType":"ElementaryTypeName","src":"1717:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4800,"name":"r","nodeType":"VariableDeclaration","scope":4845,"src":"1726:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4799,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1726:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4802,"name":"s","nodeType":"VariableDeclaration","scope":4845,"src":"1737:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4801,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1737:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"1684:63:23"},"payable":false,"returnParameters":{"id":4806,"nodeType":"ParameterList","parameters":[],"src":"1784:0:23"},"scope":4906,"src":"1662:463:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4888,"nodeType":"Block","src":"2421:284:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4873,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:6:23","subExpression":{"argumentTypes":null,"id":4857,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2496:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4859,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2521:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4864,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"2568:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4865,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2585:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":4862,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2551:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4863,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2551:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4866,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2551:43:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4861,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2541:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2541:54:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4868,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4849,"src":"2597:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4869,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4851,"src":"2600:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4870,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4853,"src":"2603:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4860,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"2531:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4871,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2531:74:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2521:84:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:110:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4856,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2484:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4874,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2484:122:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4875,"nodeType":"ExpressionStatement","src":"2484:122:23"},{"expression":{"argumentTypes":null,"id":4878,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4876,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2616:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4877,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2624:4:23","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2616:12:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4879,"nodeType":"ExpressionStatement","src":"2616:12:23"},{"expression":{"argumentTypes":null,"id":4882,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4880,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"2638:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4881,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2648:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2638:18:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4883,"nodeType":"ExpressionStatement","src":"2638:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4885,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2689:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4884,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4729,"src":"2671:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":4886,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2671:27:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4887,"nodeType":"EmitStatement","src":"2666:32:23"}]},"documentation":"@dev Sets outcome based on signed message\n @param _outcome Signed event outcome\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4889,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4854,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4847,"name":"_outcome","nodeType":"VariableDeclaration","scope":4889,"src":"2357:12:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4846,"name":"int","nodeType":"ElementaryTypeName","src":"2357:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4849,"name":"v","nodeType":"VariableDeclaration","scope":4889,"src":"2371:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4848,"name":"uint8","nodeType":"ElementaryTypeName","src":"2371:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4851,"name":"r","nodeType":"VariableDeclaration","scope":4889,"src":"2380:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4850,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2380:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4853,"name":"s","nodeType":"VariableDeclaration","scope":4889,"src":"2391:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4852,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2391:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2356:45:23"},"payable":false,"returnParameters":{"id":4855,"nodeType":"ParameterList","parameters":[],"src":"2421:0:23"},"scope":4906,"src":"2337:368:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4896,"nodeType":"Block","src":"2862:29:23","statements":[{"expression":{"argumentTypes":null,"id":4894,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2879:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4893,"id":4895,"nodeType":"Return","src":"2872:12:23"}]},"documentation":"@dev Returns if winning outcome\n @return Is outcome set?","id":4897,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4890,"nodeType":"ParameterList","parameters":[],"src":"2804:2:23"},"payable":false,"returnParameters":{"id":4893,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4892,"name":"","nodeType":"VariableDeclaration","scope":4897,"src":"2852:4:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4891,"name":"bool","nodeType":"ElementaryTypeName","src":"2852:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2851:6:23"},"scope":4906,"src":"2783:108:23","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4904,"nodeType":"Block","src":"3034:31:23","statements":[{"expression":{"argumentTypes":null,"id":4902,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"3051:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4901,"id":4903,"nodeType":"Return","src":"3044:14:23"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4905,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4898,"nodeType":"ParameterList","parameters":[],"src":"2977:2:23"},"payable":false,"returnParameters":{"id":4901,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4900,"name":"","nodeType":"VariableDeclaration","scope":4905,"src":"3025:3:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4899,"name":"int","nodeType":"ElementaryTypeName","src":"3025:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3024:5:23"},"scope":4906,"src":"2958:107:23","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4907,"src":"1305:1762:23"}],"src":"0:3068:23"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","exportedSymbols":{"SignedMessageOracle":[4906],"SignedMessageOracleData":[4751],"SignedMessageOracleProxy":[4786]},"id":4907,"nodeType":"SourceUnit","nodes":[{"id":4719,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:23"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4720,"nodeType":"ImportDirective","scope":4907,"sourceUnit":4718,"src":"25:31:23","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4721,"nodeType":"ImportDirective","scope":4907,"sourceUnit":6702,"src":"57:55:23","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4751,"linearizedBaseContracts":[4751],"name":"SignedMessageOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4725,"name":"SignerReplacement","nodeType":"EventDefinition","parameters":{"id":4724,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4723,"indexed":true,"name":"newSigner","nodeType":"VariableDeclaration","scope":4725,"src":"209:25:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4722,"name":"address","nodeType":"ElementaryTypeName","src":"209:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"208:27:23"},"src":"185:51:23"},{"anonymous":false,"documentation":null,"id":4729,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4728,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4727,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4729,"src":"265:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4726,"name":"int","nodeType":"ElementaryTypeName","src":"265:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"264:13:23"},"src":"241:37:23"},{"constant":false,"id":4731,"name":"signer","nodeType":"VariableDeclaration","scope":4751,"src":"315:21:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4730,"name":"address","nodeType":"ElementaryTypeName","src":"315:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":4733,"name":"descriptionHash","nodeType":"VariableDeclaration","scope":4751,"src":"342:30:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4732,"name":"bytes32","nodeType":"ElementaryTypeName","src":"342:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"public"},{"constant":false,"id":4735,"name":"nonce","nodeType":"VariableDeclaration","scope":4751,"src":"378:10:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4734,"name":"uint","nodeType":"ElementaryTypeName","src":"378:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4737,"name":"isSet","nodeType":"VariableDeclaration","scope":4751,"src":"394:17:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4736,"name":"bool","nodeType":"ElementaryTypeName","src":"394:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":4739,"name":"outcome","nodeType":"VariableDeclaration","scope":4751,"src":"417:18:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4738,"name":"int","nodeType":"ElementaryTypeName","src":"417:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":4749,"nodeType":"Block","src":"496:102:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4745,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4742,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"559:3:23","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4743,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"559:10:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":4744,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"573:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"559:20:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4741,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"551:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4746,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"551:29:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4747,"nodeType":"ExpressionStatement","src":"551:29:23"},{"id":4748,"nodeType":"PlaceholderStatement","src":"590:1:23"}]},"documentation":null,"id":4750,"name":"isSigner","nodeType":"ModifierDefinition","parameters":{"id":4740,"nodeType":"ParameterList","parameters":[],"src":"493:2:23"},"src":"475:123:23","visibility":"internal"}],"scope":4907,"src":"115:485:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4752,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"639:5:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4753,"nodeType":"InheritanceSpecifier","src":"639:5:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4754,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"646:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4755,"nodeType":"InheritanceSpecifier","src":"646:23:23"}],"contractDependencies":[4751,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4786,"linearizedBaseContracts":[4786,4751,6701,6673],"name":"SignedMessageOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4784,"nodeType":"Block","src":"1057:106:23","statements":[{"expression":{"argumentTypes":null,"id":4778,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4771,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1067:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4773,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1086:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4774,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4761,"src":"1104:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4775,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4763,"src":"1107:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4776,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4765,"src":"1110:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4772,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1076:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4777,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1076:36:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1067:45:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4779,"nodeType":"ExpressionStatement","src":"1067:45:23"},{"expression":{"argumentTypes":null,"id":4782,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4780,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1122:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4781,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1140:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"src":"1122:34:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"id":4783,"nodeType":"ExpressionStatement","src":"1122:34:23"}]},"documentation":"@dev Constructor sets signer address based on signature\n @param _descriptionHash Hash identifying off chain event description\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4785,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4768,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4757,"src":"1029:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4769,"modifierName":{"argumentTypes":null,"id":4767,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1023:5:23","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1023:14:23"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4766,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4757,"name":"proxied","nodeType":"VariableDeclaration","scope":4785,"src":"941:15:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4756,"name":"address","nodeType":"ElementaryTypeName","src":"941:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4759,"name":"_descriptionHash","nodeType":"VariableDeclaration","scope":4785,"src":"958:24:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4758,"name":"bytes32","nodeType":"ElementaryTypeName","src":"958:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4761,"name":"v","nodeType":"VariableDeclaration","scope":4785,"src":"984:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4760,"name":"uint8","nodeType":"ElementaryTypeName","src":"984:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4763,"name":"r","nodeType":"VariableDeclaration","scope":4785,"src":"993:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4762,"name":"bytes32","nodeType":"ElementaryTypeName","src":"993:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4765,"name":"s","nodeType":"VariableDeclaration","scope":4785,"src":"1004:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4764,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1004:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"940:74:23"},"payable":false,"returnParameters":{"id":4770,"nodeType":"ParameterList","parameters":[],"src":"1057:0:23"},"scope":4786,"src":"929:234:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4907,"src":"602:563:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4787,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1337:7:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4788,"nodeType":"InheritanceSpecifier","src":"1337:7:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4789,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1346:6:23","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4790,"nodeType":"InheritanceSpecifier","src":"1346:6:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4791,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"1354:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4792,"nodeType":"InheritanceSpecifier","src":"1354:23:23"}],"contractDependencies":[4717,4751,6673],"contractKind":"contract","documentation":"@title Signed message oracle contract - Allows to set an outcome with a signed message\n @author Stefan George - ","fullyImplemented":true,"id":4906,"linearizedBaseContracts":[4906,4751,4717,6673],"name":"SignedMessageOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4844,"nodeType":"Block","src":"1784:341:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4829,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1869:6:23","subExpression":{"argumentTypes":null,"id":4808,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"1870:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4812,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4810,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"1895:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4811,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"1904:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1895:14:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:40:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4828,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4814,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1929:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4819,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1976:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4820,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"1993:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4821,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2004:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4817,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"1959:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4818,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1959:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4822,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1959:52:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4816,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"1949:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4823,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1949:63:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4824,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4798,"src":"2014:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4825,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4800,"src":"2017:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4826,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4802,"src":"2020:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4815,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1939:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4827,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1939:83:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1929:93:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:153:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1858:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4830,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1858:165:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4831,"nodeType":"ExpressionStatement","src":"1858:165:23"},{"expression":{"argumentTypes":null,"id":4834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4832,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"2033:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4833,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2041:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2033:14:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4835,"nodeType":"ExpressionStatement","src":"2033:14:23"},{"expression":{"argumentTypes":null,"id":4838,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4836,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2057:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4837,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2066:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2057:18:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4839,"nodeType":"ExpressionStatement","src":"2057:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4841,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2108:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":4840,"name":"SignerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4725,"src":"2090:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":4842,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2090:28:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4843,"nodeType":"EmitStatement","src":"2085:33:23"}]},"documentation":"@dev Replaces signer\n @param newSigner New signer\n @param _nonce Unique nonce to prevent replay attacks\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4845,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4805,"modifierName":{"argumentTypes":null,"id":4804,"name":"isSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4750,"src":"1771:8:23","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1771:8:23"}],"name":"replaceSigner","nodeType":"FunctionDefinition","parameters":{"id":4803,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4794,"name":"newSigner","nodeType":"VariableDeclaration","scope":4845,"src":"1685:17:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4793,"name":"address","nodeType":"ElementaryTypeName","src":"1685:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4796,"name":"_nonce","nodeType":"VariableDeclaration","scope":4845,"src":"1704:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4795,"name":"uint","nodeType":"ElementaryTypeName","src":"1704:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4798,"name":"v","nodeType":"VariableDeclaration","scope":4845,"src":"1717:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4797,"name":"uint8","nodeType":"ElementaryTypeName","src":"1717:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4800,"name":"r","nodeType":"VariableDeclaration","scope":4845,"src":"1726:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4799,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1726:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4802,"name":"s","nodeType":"VariableDeclaration","scope":4845,"src":"1737:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4801,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1737:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"1684:63:23"},"payable":false,"returnParameters":{"id":4806,"nodeType":"ParameterList","parameters":[],"src":"1784:0:23"},"scope":4906,"src":"1662:463:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4888,"nodeType":"Block","src":"2421:284:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4873,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:6:23","subExpression":{"argumentTypes":null,"id":4857,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2496:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4859,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2521:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4864,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"2568:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4865,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2585:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":4862,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2551:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4863,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2551:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4866,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2551:43:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4861,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2541:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2541:54:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4868,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4849,"src":"2597:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4869,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4851,"src":"2600:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4870,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4853,"src":"2603:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4860,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"2531:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4871,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2531:74:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2521:84:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:110:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4856,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2484:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4874,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2484:122:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4875,"nodeType":"ExpressionStatement","src":"2484:122:23"},{"expression":{"argumentTypes":null,"id":4878,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4876,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2616:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4877,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2624:4:23","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2616:12:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4879,"nodeType":"ExpressionStatement","src":"2616:12:23"},{"expression":{"argumentTypes":null,"id":4882,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4880,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"2638:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4881,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2648:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2638:18:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4883,"nodeType":"ExpressionStatement","src":"2638:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4885,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2689:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4884,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4729,"src":"2671:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":4886,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2671:27:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4887,"nodeType":"EmitStatement","src":"2666:32:23"}]},"documentation":"@dev Sets outcome based on signed message\n @param _outcome Signed event outcome\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4889,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4854,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4847,"name":"_outcome","nodeType":"VariableDeclaration","scope":4889,"src":"2357:12:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4846,"name":"int","nodeType":"ElementaryTypeName","src":"2357:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4849,"name":"v","nodeType":"VariableDeclaration","scope":4889,"src":"2371:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4848,"name":"uint8","nodeType":"ElementaryTypeName","src":"2371:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4851,"name":"r","nodeType":"VariableDeclaration","scope":4889,"src":"2380:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4850,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2380:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4853,"name":"s","nodeType":"VariableDeclaration","scope":4889,"src":"2391:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4852,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2391:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2356:45:23"},"payable":false,"returnParameters":{"id":4855,"nodeType":"ParameterList","parameters":[],"src":"2421:0:23"},"scope":4906,"src":"2337:368:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4896,"nodeType":"Block","src":"2862:29:23","statements":[{"expression":{"argumentTypes":null,"id":4894,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2879:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4893,"id":4895,"nodeType":"Return","src":"2872:12:23"}]},"documentation":"@dev Returns if winning outcome\n @return Is outcome set?","id":4897,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4890,"nodeType":"ParameterList","parameters":[],"src":"2804:2:23"},"payable":false,"returnParameters":{"id":4893,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4892,"name":"","nodeType":"VariableDeclaration","scope":4897,"src":"2852:4:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4891,"name":"bool","nodeType":"ElementaryTypeName","src":"2852:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2851:6:23"},"scope":4906,"src":"2783:108:23","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4904,"nodeType":"Block","src":"3034:31:23","statements":[{"expression":{"argumentTypes":null,"id":4902,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"3051:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4901,"id":4903,"nodeType":"Return","src":"3044:14:23"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4905,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4898,"nodeType":"ParameterList","parameters":[],"src":"2977:2:23"},"payable":false,"returnParameters":{"id":4901,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4900,"name":"","nodeType":"VariableDeclaration","scope":4905,"src":"3025:3:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4899,"name":"int","nodeType":"ElementaryTypeName","src":"3025:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3024:5:23"},"scope":4906,"src":"2958:107:23","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4907,"src":"1305:1762:23"}],"src":"0:3068:23"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.029Z"}; /***/ }), @@ -407,10 +703,21 @@ module.exports = {"contract_name":"SignedMessageOracle","abi":[{"constant":true, /*!**********************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracleFactory.json ***! \**********************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"SignedMessageOracleFactory","abi":[{"constant":false,"inputs":[{"name":"descriptionHash","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"createSignedMessageOracle","outputs":[{"name":"signedMessageOracle","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"signedMessageOracle","type":"address"},{"indexed":false,"name":"oracle","type":"address"}],"name":"SignedMessageOracleCreation","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263311}; +module.exports = {"contractName":"SignedMessageOracleFactory","abi":[{"constant":true,"inputs":[],"name":"signedMessageOracleMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_signedMessageOracleMasterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"signedMessageOracle","type":"address"},{"indexed":false,"name":"oracle","type":"address"}],"name":"SignedMessageOracleCreation","type":"event"},{"constant":false,"inputs":[{"name":"descriptionHash","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"createSignedMessageOracle","outputs":[{"name":"signedMessageOracle","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160208061084f83398101806040528101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506107cc806100836000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063515dc0be14610051578063655d0862146100a8575b600080fd5b34801561005d57600080fd5b50610066610142565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b506101006004803603810190808035600019169060200190929190803560ff16906020019092919080356000191690602001909291908035600019169060200190929190505050610167565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686868686610198610361565b808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200195505050505050604051809103906000f080158015610224573d6000803e3d6000fd5b509150600186868686604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561029e573d6000803e3d6000fd5b5050506020604051035190503373ffffffffffffffffffffffffffffffffffffffff167f7be438e4a33b832fcd7adccf30167ee27bd3e693a5ff6daf7fcf98fb2163b7a28383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a250949350505050565b60405161042f80610372833901905600608060405234801561001057600080fd5b5060405160a08061042f83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508460008173ffffffffffffffffffffffffffffffffffffffff161415151561008257600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600184848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561013a573d6000803e3d6000fd5b50505060206040510351600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360028160001916905550505050505061028c806101a36000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063238ac933146100bb57806327793f871461011257806385dcee931461013d578063a619486e14610170578063c65fb380146101c7575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100b6573d6000f35b3d6000fd5b3480156100c757600080fd5b506100d06101f6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011e57600080fd5b5061012761021c565b6040518082815260200191505060405180910390f35b34801561014957600080fd5b50610152610222565b60405180826000191660001916815260200191505060405180910390f35b34801561017c57600080fd5b50610185610228565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d357600080fd5b506101dc61024d565b604051808215151515815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900460ff16815600a165627a7a72305820fd156257552e0d156005efe91d3b6e398765afe507ed3c6c0ca7c9d756e3b5840029a165627a7a72305820edd60d2cd58809c3970050c2bd3f3e6c460c6e8a1ef461bd73e1bd1bce3147f50029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063515dc0be14610051578063655d0862146100a8575b600080fd5b34801561005d57600080fd5b50610066610142565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b506101006004803603810190808035600019169060200190929190803560ff16906020019092919080356000191690602001909291908035600019169060200190929190505050610167565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686868686610198610361565b808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200195505050505050604051809103906000f080158015610224573d6000803e3d6000fd5b509150600186868686604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561029e573d6000803e3d6000fd5b5050506020604051035190503373ffffffffffffffffffffffffffffffffffffffff167f7be438e4a33b832fcd7adccf30167ee27bd3e693a5ff6daf7fcf98fb2163b7a28383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a250949350505050565b60405161042f80610372833901905600608060405234801561001057600080fd5b5060405160a08061042f83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508460008173ffffffffffffffffffffffffffffffffffffffff161415151561008257600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600184848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561013a573d6000803e3d6000fd5b50505060206040510351600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360028160001916905550505050505061028c806101a36000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063238ac933146100bb57806327793f871461011257806385dcee931461013d578063a619486e14610170578063c65fb380146101c7575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100b6573d6000f35b3d6000fd5b3480156100c757600080fd5b506100d06101f6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011e57600080fd5b5061012761021c565b6040518082815260200191505060405180910390f35b34801561014957600080fd5b50610152610222565b60405180826000191660001916815260200191505060405180910390f35b34801561017c57600080fd5b50610185610228565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d357600080fd5b506101dc61024d565b604051808215151515815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900460ff16815600a165627a7a72305820fd156257552e0d156005efe91d3b6e398765afe507ed3c6c0ca7c9d756e3b5840029a165627a7a72305820edd60d2cd58809c3970050c2bd3f3e6c460c6e8a1ef461bd73e1bd1bce3147f50029","sourceMap":"220:1234:24:-;;;549:162;8:9:-1;5:2;;;30:1;27;20:12;5:2;549:162:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;674:30;642:29;;:62;;;;;;;;;;;;;;;;;;549:162;220:1234;;;;;;","deployedSourceMap":"220:1234:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;446:56;;8:9:-1;5:2;;;30:1;27;20:12;5:2;446:56:24;;;;;;;;;;;;;;;;;;;;;;;;;;;994:458;;8:9:-1;5:2;;;30:1;27;20:12;5:2;994:458:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;446:56;;;;;;;;;;;;;:::o;994:458::-;1117:39;1310:14;1243:29;;;;;;;;;;;1274:15;1291:1;1294;1297;1214:85;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1214:85:24;1172:128;;1327:35;1337:15;1354:1;1357;1360;1327:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1327:35:24;;;;;;;;1310:52;;1405:10;1377:68;;;1417:19;1438:6;1377:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;994:458;;;;;;;:::o;220:1234::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/SignedMessageOracle.sol\";\n\n\n/// @title Signed message oracle factory contract - Allows to create signed message oracle contracts\n/// @author Stefan George - \ncontract SignedMessageOracleFactory {\n\n /*\n * Events\n */\n event SignedMessageOracleCreation(address indexed creator, SignedMessageOracle signedMessageOracle, address oracle);\n\n /*\n * Storage\n */\n SignedMessageOracle public signedMessageOracleMasterCopy;\n\n /*\n * Public functions\n */\n constructor(SignedMessageOracle _signedMessageOracleMasterCopy)\n public\n {\n signedMessageOracleMasterCopy = _signedMessageOracleMasterCopy;\n }\n\n /// @dev Creates a new signed message oracle contract\n /// @param descriptionHash Hash identifying off chain event description\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n /// @return Oracle contract\n function createSignedMessageOracle(bytes32 descriptionHash, uint8 v, bytes32 r, bytes32 s)\n public\n returns (SignedMessageOracle signedMessageOracle)\n {\n signedMessageOracle = SignedMessageOracle(new SignedMessageOracleProxy(signedMessageOracleMasterCopy, descriptionHash, v, r, s));\n address oracle = ecrecover(descriptionHash, v, r, s);\n emit SignedMessageOracleCreation(msg.sender, signedMessageOracle, oracle);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracleFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracleFactory.sol","exportedSymbols":{"SignedMessageOracleFactory":[4973]},"id":4974,"nodeType":"SourceUnit","nodes":[{"id":4908,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:24"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","file":"../Oracles/SignedMessageOracle.sol","id":4909,"nodeType":"ImportDirective","scope":4974,"sourceUnit":4907,"src":"25:44:24","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[4786],"contractKind":"contract","documentation":"@title Signed message oracle factory contract - Allows to create signed message oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":4973,"linearizedBaseContracts":[4973],"name":"SignedMessageOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4917,"name":"SignedMessageOracleCreation","nodeType":"EventDefinition","parameters":{"id":4916,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4911,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":4917,"src":"327:23:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4910,"name":"address","nodeType":"ElementaryTypeName","src":"327:7:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4913,"indexed":false,"name":"signedMessageOracle","nodeType":"VariableDeclaration","scope":4917,"src":"352:39:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},"typeName":{"contractScope":null,"id":4912,"name":"SignedMessageOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4906,"src":"352:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4915,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":4917,"src":"393:14:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4914,"name":"address","nodeType":"ElementaryTypeName","src":"393:7:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"326:82:24"},"src":"293:116:24"},{"constant":false,"id":4919,"name":"signedMessageOracleMasterCopy","nodeType":"VariableDeclaration","scope":4973,"src":"446:56:24","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},"typeName":{"contractScope":null,"id":4918,"name":"SignedMessageOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4906,"src":"446:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"value":null,"visibility":"public"},{"body":{"id":4928,"nodeType":"Block","src":"632:79:24","statements":[{"expression":{"argumentTypes":null,"id":4926,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4924,"name":"signedMessageOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4919,"src":"642:29:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4925,"name":"_signedMessageOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4921,"src":"674:30:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"src":"642:62:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"id":4927,"nodeType":"ExpressionStatement","src":"642:62:24"}]},"documentation":null,"id":4929,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4922,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4921,"name":"_signedMessageOracleMasterCopy","nodeType":"VariableDeclaration","scope":4929,"src":"561:50:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},"typeName":{"contractScope":null,"id":4920,"name":"SignedMessageOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4906,"src":"561:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"value":null,"visibility":"internal"}],"src":"560:52:24"},"payable":false,"returnParameters":{"id":4923,"nodeType":"ParameterList","parameters":[],"src":"632:0:24"},"scope":4973,"src":"549:162:24","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4971,"nodeType":"Block","src":"1162:290:24","statements":[{"expression":{"argumentTypes":null,"id":4953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4942,"name":"signedMessageOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4940,"src":"1172:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4946,"name":"signedMessageOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4919,"src":"1243:29:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},{"argumentTypes":null,"id":4947,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4931,"src":"1274:15:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4948,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4933,"src":"1291:1:24","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4949,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4935,"src":"1294:1:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4950,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4937,"src":"1297:1:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4945,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1214:28:24","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_contract$_SignedMessageOracleProxy_$4786_$","typeString":"function (address,bytes32,uint8,bytes32,bytes32) returns (contract SignedMessageOracleProxy)"},"typeName":{"contractScope":null,"id":4944,"name":"SignedMessageOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":4786,"src":"1218:24:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleProxy_$4786","typeString":"contract SignedMessageOracleProxy"}}},"id":4951,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1214:85:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleProxy_$4786","typeString":"contract SignedMessageOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_SignedMessageOracleProxy_$4786","typeString":"contract SignedMessageOracleProxy"}],"id":4943,"name":"SignedMessageOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4906,"src":"1194:19:24","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_SignedMessageOracle_$4906_$","typeString":"type(contract SignedMessageOracle)"}},"id":4952,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1194:106:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"src":"1172:128:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"id":4954,"nodeType":"ExpressionStatement","src":"1172:128:24"},{"assignments":[4956],"declarations":[{"constant":false,"id":4956,"name":"oracle","nodeType":"VariableDeclaration","scope":4972,"src":"1310:14:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4955,"name":"address","nodeType":"ElementaryTypeName","src":"1310:7:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"id":4963,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4958,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4931,"src":"1337:15:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4959,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4933,"src":"1354:1:24","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4960,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4935,"src":"1357:1:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4961,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4937,"src":"1360:1:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4957,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1327:9:24","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4962,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1327:35:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"VariableDeclarationStatement","src":"1310:52:24"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4965,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1405:3:24","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4966,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1405:10:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4967,"name":"signedMessageOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4940,"src":"1417:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},{"argumentTypes":null,"id":4968,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4956,"src":"1438:6:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},{"typeIdentifier":"t_address","typeString":"address"}],"id":4964,"name":"SignedMessageOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4917,"src":"1377:27:24","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_SignedMessageOracle_$4906_$_t_address_$returns$__$","typeString":"function (address,contract SignedMessageOracle,address)"}},"id":4969,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1377:68:24","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4970,"nodeType":"EmitStatement","src":"1372:73:24"}]},"documentation":"@dev Creates a new signed message oracle contract\n @param descriptionHash Hash identifying off chain event description\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter\n @return Oracle contract","id":4972,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createSignedMessageOracle","nodeType":"FunctionDefinition","parameters":{"id":4938,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4931,"name":"descriptionHash","nodeType":"VariableDeclaration","scope":4972,"src":"1029:23:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4930,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1029:7:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4933,"name":"v","nodeType":"VariableDeclaration","scope":4972,"src":"1054:7:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4932,"name":"uint8","nodeType":"ElementaryTypeName","src":"1054:5:24","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4935,"name":"r","nodeType":"VariableDeclaration","scope":4972,"src":"1063:9:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4934,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1063:7:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4937,"name":"s","nodeType":"VariableDeclaration","scope":4972,"src":"1074:9:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4936,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1074:7:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"1028:56:24"},"payable":false,"returnParameters":{"id":4941,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4940,"name":"signedMessageOracle","nodeType":"VariableDeclaration","scope":4972,"src":"1117:39:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},"typeName":{"contractScope":null,"id":4939,"name":"SignedMessageOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4906,"src":"1117:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"value":null,"visibility":"internal"}],"src":"1116:41:24"},"scope":4973,"src":"994:458:24","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4974,"src":"220:1234:24"}],"src":"0:1455:24"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracleFactory.sol","exportedSymbols":{"SignedMessageOracleFactory":[4973]},"id":4974,"nodeType":"SourceUnit","nodes":[{"id":4908,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:24"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","file":"../Oracles/SignedMessageOracle.sol","id":4909,"nodeType":"ImportDirective","scope":4974,"sourceUnit":4907,"src":"25:44:24","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[4786],"contractKind":"contract","documentation":"@title Signed message oracle factory contract - Allows to create signed message oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":4973,"linearizedBaseContracts":[4973],"name":"SignedMessageOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4917,"name":"SignedMessageOracleCreation","nodeType":"EventDefinition","parameters":{"id":4916,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4911,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":4917,"src":"327:23:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4910,"name":"address","nodeType":"ElementaryTypeName","src":"327:7:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4913,"indexed":false,"name":"signedMessageOracle","nodeType":"VariableDeclaration","scope":4917,"src":"352:39:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},"typeName":{"contractScope":null,"id":4912,"name":"SignedMessageOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4906,"src":"352:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":4915,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":4917,"src":"393:14:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4914,"name":"address","nodeType":"ElementaryTypeName","src":"393:7:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"326:82:24"},"src":"293:116:24"},{"constant":false,"id":4919,"name":"signedMessageOracleMasterCopy","nodeType":"VariableDeclaration","scope":4973,"src":"446:56:24","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},"typeName":{"contractScope":null,"id":4918,"name":"SignedMessageOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4906,"src":"446:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"value":null,"visibility":"public"},{"body":{"id":4928,"nodeType":"Block","src":"632:79:24","statements":[{"expression":{"argumentTypes":null,"id":4926,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4924,"name":"signedMessageOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4919,"src":"642:29:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4925,"name":"_signedMessageOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4921,"src":"674:30:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"src":"642:62:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"id":4927,"nodeType":"ExpressionStatement","src":"642:62:24"}]},"documentation":null,"id":4929,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4922,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4921,"name":"_signedMessageOracleMasterCopy","nodeType":"VariableDeclaration","scope":4929,"src":"561:50:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},"typeName":{"contractScope":null,"id":4920,"name":"SignedMessageOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4906,"src":"561:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"value":null,"visibility":"internal"}],"src":"560:52:24"},"payable":false,"returnParameters":{"id":4923,"nodeType":"ParameterList","parameters":[],"src":"632:0:24"},"scope":4973,"src":"549:162:24","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4971,"nodeType":"Block","src":"1162:290:24","statements":[{"expression":{"argumentTypes":null,"id":4953,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4942,"name":"signedMessageOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4940,"src":"1172:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4946,"name":"signedMessageOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4919,"src":"1243:29:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},{"argumentTypes":null,"id":4947,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4931,"src":"1274:15:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4948,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4933,"src":"1291:1:24","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4949,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4935,"src":"1294:1:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4950,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4937,"src":"1297:1:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4945,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1214:28:24","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_contract$_SignedMessageOracleProxy_$4786_$","typeString":"function (address,bytes32,uint8,bytes32,bytes32) returns (contract SignedMessageOracleProxy)"},"typeName":{"contractScope":null,"id":4944,"name":"SignedMessageOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":4786,"src":"1218:24:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleProxy_$4786","typeString":"contract SignedMessageOracleProxy"}}},"id":4951,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1214:85:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleProxy_$4786","typeString":"contract SignedMessageOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_SignedMessageOracleProxy_$4786","typeString":"contract SignedMessageOracleProxy"}],"id":4943,"name":"SignedMessageOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4906,"src":"1194:19:24","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_SignedMessageOracle_$4906_$","typeString":"type(contract SignedMessageOracle)"}},"id":4952,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1194:106:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"src":"1172:128:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"id":4954,"nodeType":"ExpressionStatement","src":"1172:128:24"},{"assignments":[4956],"declarations":[{"constant":false,"id":4956,"name":"oracle","nodeType":"VariableDeclaration","scope":4972,"src":"1310:14:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4955,"name":"address","nodeType":"ElementaryTypeName","src":"1310:7:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"id":4963,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4958,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4931,"src":"1337:15:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4959,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4933,"src":"1354:1:24","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4960,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4935,"src":"1357:1:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4961,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4937,"src":"1360:1:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4957,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1327:9:24","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4962,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1327:35:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"VariableDeclarationStatement","src":"1310:52:24"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4965,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1405:3:24","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4966,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1405:10:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4967,"name":"signedMessageOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4940,"src":"1417:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},{"argumentTypes":null,"id":4968,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4956,"src":"1438:6:24","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},{"typeIdentifier":"t_address","typeString":"address"}],"id":4964,"name":"SignedMessageOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4917,"src":"1377:27:24","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_SignedMessageOracle_$4906_$_t_address_$returns$__$","typeString":"function (address,contract SignedMessageOracle,address)"}},"id":4969,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1377:68:24","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4970,"nodeType":"EmitStatement","src":"1372:73:24"}]},"documentation":"@dev Creates a new signed message oracle contract\n @param descriptionHash Hash identifying off chain event description\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter\n @return Oracle contract","id":4972,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createSignedMessageOracle","nodeType":"FunctionDefinition","parameters":{"id":4938,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4931,"name":"descriptionHash","nodeType":"VariableDeclaration","scope":4972,"src":"1029:23:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4930,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1029:7:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4933,"name":"v","nodeType":"VariableDeclaration","scope":4972,"src":"1054:7:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4932,"name":"uint8","nodeType":"ElementaryTypeName","src":"1054:5:24","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4935,"name":"r","nodeType":"VariableDeclaration","scope":4972,"src":"1063:9:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4934,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1063:7:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4937,"name":"s","nodeType":"VariableDeclaration","scope":4972,"src":"1074:9:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4936,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1074:7:24","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"1028:56:24"},"payable":false,"returnParameters":{"id":4941,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4940,"name":"signedMessageOracle","nodeType":"VariableDeclaration","scope":4972,"src":"1117:39:24","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"},"typeName":{"contractScope":null,"id":4939,"name":"SignedMessageOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4906,"src":"1117:19:24","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracle_$4906","typeString":"contract SignedMessageOracle"}},"value":null,"visibility":"internal"}],"src":"1116:41:24"},"scope":4973,"src":"994:458:24","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4974,"src":"220:1234:24"}],"src":"0:1455:24"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0x3d3368306a12f3477e6cf25fc4e15328fa1329d5","transactionHash":"0xfefa291a1fdcaf788179969360231ee323a66681ff89cf12060fc68bf738332c"},"4":{"address":"0xc95c2e0da7dfdaf851eeeef8beec0ee65ce1d0cf","transactionHash":"0x6700f3a1021f4c8402b3d69d667a1c36ef7c3edcb5f132199091bd1d22adad38"},"42":{"address":"0x6ba2bd0056af25d4b745d9291f24fd6083457ef1","transactionHash":"0x1f9168ce9c1a93b92199b8796941faad6e90877b1fed4d93bda35f0626d5f481"},"437894314312":{"address":"0xdb56f2e9369e0d7bd191099125a3f6c370f8ed15","transactionHash":"0x787a6f8383b404440874d2843ab57316bef81a12d78a4bab78618386d5da76c4"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.799Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracleProxy.json": +/*!********************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/SignedMessageOracleProxy.json ***! + \********************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"SignedMessageOracleProxy","abi":[{"constant":true,"inputs":[],"name":"signer","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"outcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"descriptionHash","outputs":[{"name":"","type":"bytes32"}],"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":"isSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"proxied","type":"address"},{"name":"_descriptionHash","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"newSigner","type":"address"}],"name":"SignerReplacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeAssignment","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160a08061042f83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508460008173ffffffffffffffffffffffffffffffffffffffff161415151561008257600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600184848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561013a573d6000803e3d6000fd5b50505060206040510351600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360028160001916905550505050505061028c806101a36000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063238ac933146100bb57806327793f871461011257806385dcee931461013d578063a619486e14610170578063c65fb380146101c7575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100b6573d6000f35b3d6000fd5b3480156100c757600080fd5b506100d06101f6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011e57600080fd5b5061012761021c565b6040518082815260200191505060405180910390f35b34801561014957600080fd5b50610152610222565b60405180826000191660001916815260200191505060405180910390f35b34801561017c57600080fd5b50610185610228565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d357600080fd5b506101dc61024d565b604051808215151515815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900460ff16815600a165627a7a72305820fd156257552e0d156005efe91d3b6e398765afe507ed3c6c0ca7c9d756e3b5840029","deployedBytecode":"0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063238ac933146100bb57806327793f871461011257806385dcee931461013d578063a619486e14610170578063c65fb380146101c7575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100b6573d6000f35b3d6000fd5b3480156100c757600080fd5b506100d06101f6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011e57600080fd5b5061012761021c565b6040518082815260200191505060405180910390f35b34801561014957600080fd5b50610152610222565b60405180826000191660001916815260200191505060405180910390f35b34801561017c57600080fd5b50610185610228565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d357600080fd5b506101dc61024d565b604051808215151515815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900460ff16815600a165627a7a72305820fd156257552e0d156005efe91d3b6e398765afe507ed3c6c0ca7c9d756e3b5840029","sourceMap":"602:563:23:-;;;929:234;8:9:-1;5:2;;;30:1;27;20:12;5:2;929:234:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1029:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;1076:36:23;1086:16;1104:1;1107;1110;1076:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1076:36:23;;;;;;;;1067:6;;:45;;;;;;;;;;;;;;;;;;1140:16;1122:15;:34;;;;;;;929:234;;;;;602:563;;;;;;","deployedSourceMap":"602:563:23:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;315:21:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;315:21:23;;;;;;;;;;;;;;;;;;;;;;;;;;;417:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;417:18:23;;;;;;;;;;;;;;;;;;;;;;;342:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;342:30:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;394:17:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;394:17:23;;;;;;;;;;;;;;;;;;;;;;;;;;;315:21;;;;;;;;;;;;;:::o;417:18::-;;;;:::o;342:30::-;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;394:17:23:-;;;;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract SignedMessageOracleData {\n\n /*\n * Events\n */\n event SignerReplacement(address indexed newSigner);\n event OutcomeAssignment(int outcome);\n\n /*\n * Storage\n */\n address public signer;\n bytes32 public descriptionHash;\n uint nonce;\n bool public isSet;\n int public outcome;\n\n /*\n * Modifiers\n */\n modifier isSigner () {\n // Only signer is allowed to proceed\n require(msg.sender == signer);\n _;\n }\n}\n\ncontract SignedMessageOracleProxy is Proxy, SignedMessageOracleData {\n\n /// @dev Constructor sets signer address based on signature\n /// @param _descriptionHash Hash identifying off chain event description\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n constructor(address proxied, bytes32 _descriptionHash, uint8 v, bytes32 r, bytes32 s)\n Proxy(proxied)\n public\n {\n signer = ecrecover(_descriptionHash, v, r, s);\n descriptionHash = _descriptionHash;\n }\n}\n\n/// @title Signed message oracle contract - Allows to set an outcome with a signed message\n/// @author Stefan George - \ncontract SignedMessageOracle is Proxied, Oracle, SignedMessageOracleData {\n\n /*\n * Public functions\n */\n /// @dev Replaces signer\n /// @param newSigner New signer\n /// @param _nonce Unique nonce to prevent replay attacks\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n function replaceSigner(address newSigner, uint _nonce, uint8 v, bytes32 r, bytes32 s)\n public\n isSigner\n {\n // Result is not set yet and nonce and signer are valid\n require( !isSet\n && _nonce > nonce\n && signer == ecrecover(keccak256(abi.encodePacked(descriptionHash, newSigner, _nonce)), v, r, s));\n nonce = _nonce;\n signer = newSigner;\n emit SignerReplacement(newSigner);\n }\n\n /// @dev Sets outcome based on signed message\n /// @param _outcome Signed event outcome\n /// @param v Signature parameter\n /// @param r Signature parameter\n /// @param s Signature parameter\n function setOutcome(int _outcome, uint8 v, bytes32 r, bytes32 s)\n public\n {\n // Result is not set yet and signer is valid\n require( !isSet\n && signer == ecrecover(keccak256(abi.encodePacked(descriptionHash, _outcome)), v, r, s));\n isSet = true;\n outcome = _outcome;\n emit OutcomeAssignment(_outcome);\n }\n\n /// @dev Returns if winning outcome\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isSet;\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n return outcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","exportedSymbols":{"SignedMessageOracle":[4906],"SignedMessageOracleData":[4751],"SignedMessageOracleProxy":[4786]},"id":4907,"nodeType":"SourceUnit","nodes":[{"id":4719,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:23"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4720,"nodeType":"ImportDirective","scope":4907,"sourceUnit":4718,"src":"25:31:23","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4721,"nodeType":"ImportDirective","scope":4907,"sourceUnit":6702,"src":"57:55:23","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4751,"linearizedBaseContracts":[4751],"name":"SignedMessageOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4725,"name":"SignerReplacement","nodeType":"EventDefinition","parameters":{"id":4724,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4723,"indexed":true,"name":"newSigner","nodeType":"VariableDeclaration","scope":4725,"src":"209:25:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4722,"name":"address","nodeType":"ElementaryTypeName","src":"209:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"208:27:23"},"src":"185:51:23"},{"anonymous":false,"documentation":null,"id":4729,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4728,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4727,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4729,"src":"265:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4726,"name":"int","nodeType":"ElementaryTypeName","src":"265:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"264:13:23"},"src":"241:37:23"},{"constant":false,"id":4731,"name":"signer","nodeType":"VariableDeclaration","scope":4751,"src":"315:21:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4730,"name":"address","nodeType":"ElementaryTypeName","src":"315:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":4733,"name":"descriptionHash","nodeType":"VariableDeclaration","scope":4751,"src":"342:30:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4732,"name":"bytes32","nodeType":"ElementaryTypeName","src":"342:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"public"},{"constant":false,"id":4735,"name":"nonce","nodeType":"VariableDeclaration","scope":4751,"src":"378:10:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4734,"name":"uint","nodeType":"ElementaryTypeName","src":"378:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4737,"name":"isSet","nodeType":"VariableDeclaration","scope":4751,"src":"394:17:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4736,"name":"bool","nodeType":"ElementaryTypeName","src":"394:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":4739,"name":"outcome","nodeType":"VariableDeclaration","scope":4751,"src":"417:18:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4738,"name":"int","nodeType":"ElementaryTypeName","src":"417:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":4749,"nodeType":"Block","src":"496:102:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4745,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4742,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"559:3:23","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4743,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"559:10:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":4744,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"573:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"559:20:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4741,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"551:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4746,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"551:29:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4747,"nodeType":"ExpressionStatement","src":"551:29:23"},{"id":4748,"nodeType":"PlaceholderStatement","src":"590:1:23"}]},"documentation":null,"id":4750,"name":"isSigner","nodeType":"ModifierDefinition","parameters":{"id":4740,"nodeType":"ParameterList","parameters":[],"src":"493:2:23"},"src":"475:123:23","visibility":"internal"}],"scope":4907,"src":"115:485:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4752,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"639:5:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4753,"nodeType":"InheritanceSpecifier","src":"639:5:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4754,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"646:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4755,"nodeType":"InheritanceSpecifier","src":"646:23:23"}],"contractDependencies":[4751,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4786,"linearizedBaseContracts":[4786,4751,6701,6673],"name":"SignedMessageOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4784,"nodeType":"Block","src":"1057:106:23","statements":[{"expression":{"argumentTypes":null,"id":4778,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4771,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1067:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4773,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1086:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4774,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4761,"src":"1104:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4775,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4763,"src":"1107:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4776,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4765,"src":"1110:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4772,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1076:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4777,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1076:36:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1067:45:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4779,"nodeType":"ExpressionStatement","src":"1067:45:23"},{"expression":{"argumentTypes":null,"id":4782,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4780,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1122:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4781,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1140:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"src":"1122:34:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"id":4783,"nodeType":"ExpressionStatement","src":"1122:34:23"}]},"documentation":"@dev Constructor sets signer address based on signature\n @param _descriptionHash Hash identifying off chain event description\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4785,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4768,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4757,"src":"1029:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4769,"modifierName":{"argumentTypes":null,"id":4767,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1023:5:23","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1023:14:23"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4766,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4757,"name":"proxied","nodeType":"VariableDeclaration","scope":4785,"src":"941:15:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4756,"name":"address","nodeType":"ElementaryTypeName","src":"941:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4759,"name":"_descriptionHash","nodeType":"VariableDeclaration","scope":4785,"src":"958:24:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4758,"name":"bytes32","nodeType":"ElementaryTypeName","src":"958:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4761,"name":"v","nodeType":"VariableDeclaration","scope":4785,"src":"984:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4760,"name":"uint8","nodeType":"ElementaryTypeName","src":"984:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4763,"name":"r","nodeType":"VariableDeclaration","scope":4785,"src":"993:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4762,"name":"bytes32","nodeType":"ElementaryTypeName","src":"993:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4765,"name":"s","nodeType":"VariableDeclaration","scope":4785,"src":"1004:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4764,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1004:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"940:74:23"},"payable":false,"returnParameters":{"id":4770,"nodeType":"ParameterList","parameters":[],"src":"1057:0:23"},"scope":4786,"src":"929:234:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4907,"src":"602:563:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4787,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1337:7:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4788,"nodeType":"InheritanceSpecifier","src":"1337:7:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4789,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1346:6:23","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4790,"nodeType":"InheritanceSpecifier","src":"1346:6:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4791,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"1354:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4792,"nodeType":"InheritanceSpecifier","src":"1354:23:23"}],"contractDependencies":[4717,4751,6673],"contractKind":"contract","documentation":"@title Signed message oracle contract - Allows to set an outcome with a signed message\n @author Stefan George - ","fullyImplemented":true,"id":4906,"linearizedBaseContracts":[4906,4751,4717,6673],"name":"SignedMessageOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4844,"nodeType":"Block","src":"1784:341:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4829,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1869:6:23","subExpression":{"argumentTypes":null,"id":4808,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"1870:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4812,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4810,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"1895:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4811,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"1904:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1895:14:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:40:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4828,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4814,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1929:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4819,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1976:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4820,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"1993:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4821,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2004:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4817,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"1959:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4818,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1959:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4822,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1959:52:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4816,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"1949:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4823,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1949:63:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4824,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4798,"src":"2014:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4825,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4800,"src":"2017:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4826,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4802,"src":"2020:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4815,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1939:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4827,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1939:83:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1929:93:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:153:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1858:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4830,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1858:165:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4831,"nodeType":"ExpressionStatement","src":"1858:165:23"},{"expression":{"argumentTypes":null,"id":4834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4832,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"2033:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4833,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2041:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2033:14:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4835,"nodeType":"ExpressionStatement","src":"2033:14:23"},{"expression":{"argumentTypes":null,"id":4838,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4836,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2057:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4837,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2066:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2057:18:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4839,"nodeType":"ExpressionStatement","src":"2057:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4841,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2108:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":4840,"name":"SignerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4725,"src":"2090:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":4842,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2090:28:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4843,"nodeType":"EmitStatement","src":"2085:33:23"}]},"documentation":"@dev Replaces signer\n @param newSigner New signer\n @param _nonce Unique nonce to prevent replay attacks\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4845,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4805,"modifierName":{"argumentTypes":null,"id":4804,"name":"isSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4750,"src":"1771:8:23","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1771:8:23"}],"name":"replaceSigner","nodeType":"FunctionDefinition","parameters":{"id":4803,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4794,"name":"newSigner","nodeType":"VariableDeclaration","scope":4845,"src":"1685:17:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4793,"name":"address","nodeType":"ElementaryTypeName","src":"1685:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4796,"name":"_nonce","nodeType":"VariableDeclaration","scope":4845,"src":"1704:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4795,"name":"uint","nodeType":"ElementaryTypeName","src":"1704:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4798,"name":"v","nodeType":"VariableDeclaration","scope":4845,"src":"1717:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4797,"name":"uint8","nodeType":"ElementaryTypeName","src":"1717:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4800,"name":"r","nodeType":"VariableDeclaration","scope":4845,"src":"1726:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4799,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1726:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4802,"name":"s","nodeType":"VariableDeclaration","scope":4845,"src":"1737:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4801,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1737:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"1684:63:23"},"payable":false,"returnParameters":{"id":4806,"nodeType":"ParameterList","parameters":[],"src":"1784:0:23"},"scope":4906,"src":"1662:463:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4888,"nodeType":"Block","src":"2421:284:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4873,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:6:23","subExpression":{"argumentTypes":null,"id":4857,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2496:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4859,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2521:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4864,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"2568:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4865,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2585:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":4862,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2551:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4863,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2551:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4866,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2551:43:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4861,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2541:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2541:54:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4868,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4849,"src":"2597:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4869,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4851,"src":"2600:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4870,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4853,"src":"2603:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4860,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"2531:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4871,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2531:74:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2521:84:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:110:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4856,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2484:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4874,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2484:122:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4875,"nodeType":"ExpressionStatement","src":"2484:122:23"},{"expression":{"argumentTypes":null,"id":4878,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4876,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2616:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4877,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2624:4:23","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2616:12:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4879,"nodeType":"ExpressionStatement","src":"2616:12:23"},{"expression":{"argumentTypes":null,"id":4882,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4880,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"2638:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4881,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2648:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2638:18:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4883,"nodeType":"ExpressionStatement","src":"2638:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4885,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2689:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4884,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4729,"src":"2671:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":4886,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2671:27:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4887,"nodeType":"EmitStatement","src":"2666:32:23"}]},"documentation":"@dev Sets outcome based on signed message\n @param _outcome Signed event outcome\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4889,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4854,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4847,"name":"_outcome","nodeType":"VariableDeclaration","scope":4889,"src":"2357:12:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4846,"name":"int","nodeType":"ElementaryTypeName","src":"2357:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4849,"name":"v","nodeType":"VariableDeclaration","scope":4889,"src":"2371:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4848,"name":"uint8","nodeType":"ElementaryTypeName","src":"2371:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4851,"name":"r","nodeType":"VariableDeclaration","scope":4889,"src":"2380:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4850,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2380:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4853,"name":"s","nodeType":"VariableDeclaration","scope":4889,"src":"2391:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4852,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2391:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2356:45:23"},"payable":false,"returnParameters":{"id":4855,"nodeType":"ParameterList","parameters":[],"src":"2421:0:23"},"scope":4906,"src":"2337:368:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4896,"nodeType":"Block","src":"2862:29:23","statements":[{"expression":{"argumentTypes":null,"id":4894,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2879:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4893,"id":4895,"nodeType":"Return","src":"2872:12:23"}]},"documentation":"@dev Returns if winning outcome\n @return Is outcome set?","id":4897,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4890,"nodeType":"ParameterList","parameters":[],"src":"2804:2:23"},"payable":false,"returnParameters":{"id":4893,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4892,"name":"","nodeType":"VariableDeclaration","scope":4897,"src":"2852:4:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4891,"name":"bool","nodeType":"ElementaryTypeName","src":"2852:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2851:6:23"},"scope":4906,"src":"2783:108:23","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4904,"nodeType":"Block","src":"3034:31:23","statements":[{"expression":{"argumentTypes":null,"id":4902,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"3051:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4901,"id":4903,"nodeType":"Return","src":"3044:14:23"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4905,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4898,"nodeType":"ParameterList","parameters":[],"src":"2977:2:23"},"payable":false,"returnParameters":{"id":4901,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4900,"name":"","nodeType":"VariableDeclaration","scope":4905,"src":"3025:3:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4899,"name":"int","nodeType":"ElementaryTypeName","src":"3025:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3024:5:23"},"scope":4906,"src":"2958:107:23","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4907,"src":"1305:1762:23"}],"src":"0:3068:23"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/SignedMessageOracle.sol","exportedSymbols":{"SignedMessageOracle":[4906],"SignedMessageOracleData":[4751],"SignedMessageOracleProxy":[4786]},"id":4907,"nodeType":"SourceUnit","nodes":[{"id":4719,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:23"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4720,"nodeType":"ImportDirective","scope":4907,"sourceUnit":4718,"src":"25:31:23","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4721,"nodeType":"ImportDirective","scope":4907,"sourceUnit":6702,"src":"57:55:23","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4751,"linearizedBaseContracts":[4751],"name":"SignedMessageOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4725,"name":"SignerReplacement","nodeType":"EventDefinition","parameters":{"id":4724,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4723,"indexed":true,"name":"newSigner","nodeType":"VariableDeclaration","scope":4725,"src":"209:25:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4722,"name":"address","nodeType":"ElementaryTypeName","src":"209:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"208:27:23"},"src":"185:51:23"},{"anonymous":false,"documentation":null,"id":4729,"name":"OutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4728,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4727,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4729,"src":"265:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4726,"name":"int","nodeType":"ElementaryTypeName","src":"265:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"264:13:23"},"src":"241:37:23"},{"constant":false,"id":4731,"name":"signer","nodeType":"VariableDeclaration","scope":4751,"src":"315:21:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4730,"name":"address","nodeType":"ElementaryTypeName","src":"315:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":4733,"name":"descriptionHash","nodeType":"VariableDeclaration","scope":4751,"src":"342:30:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4732,"name":"bytes32","nodeType":"ElementaryTypeName","src":"342:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"public"},{"constant":false,"id":4735,"name":"nonce","nodeType":"VariableDeclaration","scope":4751,"src":"378:10:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4734,"name":"uint","nodeType":"ElementaryTypeName","src":"378:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4737,"name":"isSet","nodeType":"VariableDeclaration","scope":4751,"src":"394:17:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4736,"name":"bool","nodeType":"ElementaryTypeName","src":"394:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"public"},{"constant":false,"id":4739,"name":"outcome","nodeType":"VariableDeclaration","scope":4751,"src":"417:18:23","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4738,"name":"int","nodeType":"ElementaryTypeName","src":"417:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"body":{"id":4749,"nodeType":"Block","src":"496:102:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4745,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":4742,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"559:3:23","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":4743,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"559:10:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":4744,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"573:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"559:20:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4741,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"551:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4746,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"551:29:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4747,"nodeType":"ExpressionStatement","src":"551:29:23"},{"id":4748,"nodeType":"PlaceholderStatement","src":"590:1:23"}]},"documentation":null,"id":4750,"name":"isSigner","nodeType":"ModifierDefinition","parameters":{"id":4740,"nodeType":"ParameterList","parameters":[],"src":"493:2:23"},"src":"475:123:23","visibility":"internal"}],"scope":4907,"src":"115:485:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4752,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"639:5:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":4753,"nodeType":"InheritanceSpecifier","src":"639:5:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4754,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"646:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4755,"nodeType":"InheritanceSpecifier","src":"646:23:23"}],"contractDependencies":[4751,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":4786,"linearizedBaseContracts":[4786,4751,6701,6673],"name":"SignedMessageOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":4784,"nodeType":"Block","src":"1057:106:23","statements":[{"expression":{"argumentTypes":null,"id":4778,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4771,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1067:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4773,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1086:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4774,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4761,"src":"1104:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4775,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4763,"src":"1107:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4776,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4765,"src":"1110:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4772,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1076:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4777,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1076:36:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1067:45:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4779,"nodeType":"ExpressionStatement","src":"1067:45:23"},{"expression":{"argumentTypes":null,"id":4782,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4780,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1122:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4781,"name":"_descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4759,"src":"1140:16:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"src":"1122:34:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"id":4783,"nodeType":"ExpressionStatement","src":"1122:34:23"}]},"documentation":"@dev Constructor sets signer address based on signature\n @param _descriptionHash Hash identifying off chain event description\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4785,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":4768,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4757,"src":"1029:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":4769,"modifierName":{"argumentTypes":null,"id":4767,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1023:5:23","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1023:14:23"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":4766,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4757,"name":"proxied","nodeType":"VariableDeclaration","scope":4785,"src":"941:15:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4756,"name":"address","nodeType":"ElementaryTypeName","src":"941:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4759,"name":"_descriptionHash","nodeType":"VariableDeclaration","scope":4785,"src":"958:24:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4758,"name":"bytes32","nodeType":"ElementaryTypeName","src":"958:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4761,"name":"v","nodeType":"VariableDeclaration","scope":4785,"src":"984:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4760,"name":"uint8","nodeType":"ElementaryTypeName","src":"984:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4763,"name":"r","nodeType":"VariableDeclaration","scope":4785,"src":"993:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4762,"name":"bytes32","nodeType":"ElementaryTypeName","src":"993:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4765,"name":"s","nodeType":"VariableDeclaration","scope":4785,"src":"1004:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4764,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1004:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"940:74:23"},"payable":false,"returnParameters":{"id":4770,"nodeType":"ParameterList","parameters":[],"src":"1057:0:23"},"scope":4786,"src":"929:234:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":4907,"src":"602:563:23"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":4787,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1337:7:23","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":4788,"nodeType":"InheritanceSpecifier","src":"1337:7:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4789,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1346:6:23","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":4790,"nodeType":"InheritanceSpecifier","src":"1346:6:23"},{"arguments":null,"baseName":{"contractScope":null,"id":4791,"name":"SignedMessageOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":4751,"src":"1354:23:23","typeDescriptions":{"typeIdentifier":"t_contract$_SignedMessageOracleData_$4751","typeString":"contract SignedMessageOracleData"}},"id":4792,"nodeType":"InheritanceSpecifier","src":"1354:23:23"}],"contractDependencies":[4717,4751,6673],"contractKind":"contract","documentation":"@title Signed message oracle contract - Allows to set an outcome with a signed message\n @author Stefan George - ","fullyImplemented":true,"id":4906,"linearizedBaseContracts":[4906,4751,4717,6673],"name":"SignedMessageOracle","nodeType":"ContractDefinition","nodes":[{"body":{"id":4844,"nodeType":"Block","src":"1784:341:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4829,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4813,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"1869:6:23","subExpression":{"argumentTypes":null,"id":4808,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"1870:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":4812,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4810,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"1895:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":4811,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"1904:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1895:14:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:40:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4828,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4814,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"1929:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4819,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"1976:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4820,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"1993:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":4821,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2004:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":4817,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"1959:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4818,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1959:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4822,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1959:52:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4816,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"1949:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4823,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1949:63:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4824,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4798,"src":"2014:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4825,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4800,"src":"2017:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4826,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4802,"src":"2020:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4815,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"1939:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4827,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1939:83:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1929:93:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1869:153:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4807,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1858:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4830,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1858:165:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4831,"nodeType":"ExpressionStatement","src":"1858:165:23"},{"expression":{"argumentTypes":null,"id":4834,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4832,"name":"nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4735,"src":"2033:5:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4833,"name":"_nonce","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4796,"src":"2041:6:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2033:14:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":4835,"nodeType":"ExpressionStatement","src":"2033:14:23"},{"expression":{"argumentTypes":null,"id":4838,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4836,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2057:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4837,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2066:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2057:18:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":4839,"nodeType":"ExpressionStatement","src":"2057:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4841,"name":"newSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4794,"src":"2108:9:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":4840,"name":"SignerReplacement","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4725,"src":"2090:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":4842,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2090:28:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4843,"nodeType":"EmitStatement","src":"2085:33:23"}]},"documentation":"@dev Replaces signer\n @param newSigner New signer\n @param _nonce Unique nonce to prevent replay attacks\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4845,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":4805,"modifierName":{"argumentTypes":null,"id":4804,"name":"isSigner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4750,"src":"1771:8:23","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1771:8:23"}],"name":"replaceSigner","nodeType":"FunctionDefinition","parameters":{"id":4803,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4794,"name":"newSigner","nodeType":"VariableDeclaration","scope":4845,"src":"1685:17:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4793,"name":"address","nodeType":"ElementaryTypeName","src":"1685:7:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4796,"name":"_nonce","nodeType":"VariableDeclaration","scope":4845,"src":"1704:11:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4795,"name":"uint","nodeType":"ElementaryTypeName","src":"1704:4:23","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4798,"name":"v","nodeType":"VariableDeclaration","scope":4845,"src":"1717:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4797,"name":"uint8","nodeType":"ElementaryTypeName","src":"1717:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4800,"name":"r","nodeType":"VariableDeclaration","scope":4845,"src":"1726:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4799,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1726:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4802,"name":"s","nodeType":"VariableDeclaration","scope":4845,"src":"1737:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4801,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1737:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"1684:63:23"},"payable":false,"returnParameters":{"id":4806,"nodeType":"ParameterList","parameters":[],"src":"1784:0:23"},"scope":4906,"src":"1662:463:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4888,"nodeType":"Block","src":"2421:284:23","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":4873,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4858,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2495:6:23","subExpression":{"argumentTypes":null,"id":4857,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2496:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":4872,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":4859,"name":"signer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4731,"src":"2521:6:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4864,"name":"descriptionHash","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4733,"src":"2568:15:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4865,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2585:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":4862,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7609,"src":"2551:3:23","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":4863,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"encodePacked","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2551:16:23","typeDescriptions":{"typeIdentifier":"t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$","typeString":"function () pure returns (bytes memory)"}},"id":4866,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2551:43:23","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"id":4861,"name":"keccak256","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7616,"src":"2541:9:23","typeDescriptions":{"typeIdentifier":"t_function_sha3_pure$__$returns$_t_bytes32_$","typeString":"function () pure returns (bytes32)"}},"id":4867,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2541:54:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4868,"name":"v","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4849,"src":"2597:1:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":4869,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4851,"src":"2600:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},{"argumentTypes":null,"id":4870,"name":"s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4853,"src":"2603:1:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"},{"typeIdentifier":"t_bytes32","typeString":"bytes32"}],"id":4860,"name":"ecrecover","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7614,"src":"2531:9:23","typeDescriptions":{"typeIdentifier":"t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$","typeString":"function (bytes32,uint8,bytes32,bytes32) pure returns (address)"}},"id":4871,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2531:74:23","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2521:84:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2495:110:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":4856,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2484:7:23","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":4874,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2484:122:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4875,"nodeType":"ExpressionStatement","src":"2484:122:23"},{"expression":{"argumentTypes":null,"id":4878,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4876,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2616:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"74727565","id":4877,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2624:4:23","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"2616:12:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":4879,"nodeType":"ExpressionStatement","src":"2616:12:23"},{"expression":{"argumentTypes":null,"id":4882,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":4880,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"2638:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":4881,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2648:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"2638:18:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":4883,"nodeType":"ExpressionStatement","src":"2638:18:23"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":4885,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4847,"src":"2689:8:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":4884,"name":"OutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4729,"src":"2671:17:23","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":4886,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2671:27:23","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":4887,"nodeType":"EmitStatement","src":"2666:32:23"}]},"documentation":"@dev Sets outcome based on signed message\n @param _outcome Signed event outcome\n @param v Signature parameter\n @param r Signature parameter\n @param s Signature parameter","id":4889,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setOutcome","nodeType":"FunctionDefinition","parameters":{"id":4854,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4847,"name":"_outcome","nodeType":"VariableDeclaration","scope":4889,"src":"2357:12:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4846,"name":"int","nodeType":"ElementaryTypeName","src":"2357:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4849,"name":"v","nodeType":"VariableDeclaration","scope":4889,"src":"2371:7:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":4848,"name":"uint8","nodeType":"ElementaryTypeName","src":"2371:5:23","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":4851,"name":"r","nodeType":"VariableDeclaration","scope":4889,"src":"2380:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4850,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2380:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"},{"constant":false,"id":4853,"name":"s","nodeType":"VariableDeclaration","scope":4889,"src":"2391:9:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":4852,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2391:7:23","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":null,"visibility":"internal"}],"src":"2356:45:23"},"payable":false,"returnParameters":{"id":4855,"nodeType":"ParameterList","parameters":[],"src":"2421:0:23"},"scope":4906,"src":"2337:368:23","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":4896,"nodeType":"Block","src":"2862:29:23","statements":[{"expression":{"argumentTypes":null,"id":4894,"name":"isSet","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4737,"src":"2879:5:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":4893,"id":4895,"nodeType":"Return","src":"2872:12:23"}]},"documentation":"@dev Returns if winning outcome\n @return Is outcome set?","id":4897,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":4890,"nodeType":"ParameterList","parameters":[],"src":"2804:2:23"},"payable":false,"returnParameters":{"id":4893,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4892,"name":"","nodeType":"VariableDeclaration","scope":4897,"src":"2852:4:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":4891,"name":"bool","nodeType":"ElementaryTypeName","src":"2852:4:23","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2851:6:23"},"scope":4906,"src":"2783:108:23","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":4904,"nodeType":"Block","src":"3034:31:23","statements":[{"expression":{"argumentTypes":null,"id":4902,"name":"outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4739,"src":"3051:7:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":4901,"id":4903,"nodeType":"Return","src":"3044:14:23"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":4905,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":4898,"nodeType":"ParameterList","parameters":[],"src":"2977:2:23"},"payable":false,"returnParameters":{"id":4901,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4900,"name":"","nodeType":"VariableDeclaration","scope":4905,"src":"3025:3:23","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4899,"name":"int","nodeType":"ElementaryTypeName","src":"3025:3:23","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3024:5:23"},"scope":4906,"src":"2958:107:23","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":4907,"src":"1305:1762:23"}],"src":"0:3068:23"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.028Z"}; /***/ }), @@ -418,10 +725,21 @@ module.exports = {"contract_name":"SignedMessageOracleFactory","abi":[{"constant /*!**********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarket.json ***! \**********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"StandardMarket","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"shortSell","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"sell","outputs":[{"name":"profit","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdrawFees","outputs":[{"name":"fees","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"outcomeTokenCost","type":"uint256"}],"name":"calcMarketFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_funding","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"maxCost","type":"uint256"}],"name":"buy","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"type":"function"},{"inputs":[{"name":"_creator","type":"address"},{"name":"_eventContract","type":"address"},{"name":"_marketMaker","type":"address"},{"name":"_fee","type":"uint24"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263314}; +module.exports = {"contractName":"StandardMarket","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"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":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"transactor","type":"address"},{"indexed":false,"name":"outcomeTokenAmounts","type":"int256[]"},{"indexed":false,"name":"outcomeTokenNetCost","type":"int256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenTrade","type":"event"},{"constant":false,"inputs":[{"name":"_funding","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFees","outputs":[{"name":"fees","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"maxCost","type":"uint256"}],"name":"buy","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"sell","outputs":[{"name":"profit","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"shortSell","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenAmounts","type":"int256[]"},{"name":"collateralLimit","type":"int256"}],"name":"trade","outputs":[{"name":"netCost","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"outcomeTokenCost","type":"uint256"}],"name":"calcMarketFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50613517806100206000396000f3006080604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461010157806315bd7611146101585780631f21f9af146101dc57806328c05d321461023357806343d726d61461028b57806346280a80146102a2578063476343ee146102fa57806359acb42c14610325578063a157979c14610350578063a619486e14610391578063b0011509146103e8578063c040e6b814610429578063ca1d209d14610462578063cb4c86b71461048f578063ddca3f43146104ba578063e274fd24146104ef578063f6d956df14610546578063fbde47f61461059e575b600080fd5b34801561010d57600080fd5b506101166105d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016457600080fd5b506101c660048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001909291905050506105f9565b6040518082815260200191505060405180910390f35b3480156101e857600080fd5b506101f16107c9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023f57600080fd5b50610275600480360381019080803560ff16906020019092919080359060200190929190803590602001909291905050506107ef565b6040518082815260200191505060405180910390f35b34801561029757600080fd5b506102a0611378565b005b3480156102ae57600080fd5b506102e4600480360381019080803560ff16906020019092919080359060200190929190803590602001909291905050506118c0565b6040518082815260200191505060405180910390f35b34801561030657600080fd5b5061030f611b13565b6040518082815260200191505060405180910390f35b34801561033157600080fd5b5061033a611f0e565b6040518082815260200191505060405180910390f35b34801561035c57600080fd5b5061037b60048036038101908080359060200190929190505050611f14565b6040518082815260200191505060405180910390f35b34801561039d57600080fd5b506103a6611f37565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103f457600080fd5b5061041360048036038101908080359060200190929190505050611f5c565b6040518082815260200191505060405180910390f35b34801561043557600080fd5b5061043e611f91565b6040518082600281111561044e57fe5b60ff16815260200191505060405180910390f35b34801561046e57600080fd5b5061048d60048036038101908080359060200190929190505050611fa4565b005b34801561049b57600080fd5b506104a46124eb565b6040518082815260200191505060405180910390f35b3480156104c657600080fd5b506104cf6124f1565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b3480156104fb57600080fd5b50610504612506565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561055257600080fd5b50610588600480360381019080803560ff169060200190929190803590602001909291908035906020019092919050505061252c565b6040518082815260200191505060405180910390f35b3480156105aa57600080fd5b506105b361276d565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600180600281111561060d57fe5b600760009054906101000a900460ff16600281111561062857fe5b14151561063457600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156106ba57600080fd5b505af11580156106ce573d6000803e3d6000fd5b505050506040513d60208110156106e457600080fd5b810190808051906020019092919050505093508360ff16875114151561070957600080fd5b610714848888612774565b8094508195508297505050503373ffffffffffffffffffffffffffffffffffffffff167fa66fcf59f5b6e4cb46e5745fd40c7dfac01b0a81b2b5e55038d9ec959adf7eaa8885856040518080602001848152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156107aa57808201518184015260208101905061078f565b5050505090500194505050505060405180910390a25050505092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b505050506040513d60208110156108a557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561098c57600080fd5b505af11580156109a0573d6000803e3d6000fd5b505050506040513d60208110156109b657600080fd5b81019080805190602001909291905050508015610b8f5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a5457600080fd5b505af1158015610a68573d6000803e3d6000fd5b505050506040513d6020811015610a7e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610b5357600080fd5b505af1158015610b67573d6000803e3d6000fd5b505050506040513d6020811015610b7d57600080fd5b81019080805190602001909291905050505b1515610b9a57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b876040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015610c2b57600080fd5b505af1158015610c3f573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea886040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b158015610cd757600080fd5b505af1158015610ceb573d6000803e3d6000fd5b505050506040513d6020811015610d0157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b330886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610db457600080fd5b505af1158015610dc8573d6000803e3d6000fd5b505050506040513d6020811015610dde57600080fd5b8101908080519060200190929190505050503073ffffffffffffffffffffffffffffffffffffffff166346280a808888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808460ff1660ff1681526020018381526020018281526020019350505050602060405180830381600087803b158015610e7557600080fd5b505af1158015610e89573d6000803e3d6000fd5b505050506040513d6020811015610e9f57600080fd5b810190808051906020019092919050505092508286039350600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610f3d57600080fd5b505af1158015610f51573d6000803e3d6000fd5b505050506040513d6020811015610f6757600080fd5b81019080805190602001909291905050509150600090505b8160ff168160ff161015611161578660ff168160ff1614151561115457600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561103057600080fd5b505af1158015611044573d6000803e3d6000fd5b505050506040513d602081101561105a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561110d57600080fd5b505af1158015611121573d6000803e3d6000fd5b505050506040513d602081101561113757600080fd5b8101908080519060200190929190505050151561115357600080fd5b5b8080600101915050610f7f565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111e757600080fd5b505af11580156111fb573d6000803e3d6000fd5b505050506040513d602081101561121157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156112c457600080fd5b505af11580156112d8573d6000803e3d6000fd5b505050506040513d60208110156112ee57600080fd5b8101908080519060200190929190505050151561130a57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f1dbdc4ff4d51949738d56e120b2be4edecc55d8d2150f1616ec5802abaae3f88888887604051808460ff1660ff168152602001838152602001828152602001935050505060405180910390a25050509392505050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113d757600080fd5b60018060028111156113e557fe5b600760009054906101000a900460ff16600281111561140057fe5b14151561140c57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561149257600080fd5b505af11580156114a6573d6000803e3d6000fd5b505050506040513d60208110156114bc57600080fd5b81019080805190602001909291905050509250600091505b8260ff168260ff16101561186b57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561157657600080fd5b505af115801561158a573d6000803e3d6000fd5b505050506040513d60208110156115a057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561168357600080fd5b505af1158015611697573d6000803e3d6000fd5b505050506040513d60208110156116ad57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561175857600080fd5b505af115801561176c573d6000803e3d6000fd5b505050506040513d602081101561178257600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561181857600080fd5b505af115801561182c573d6000803e3d6000fd5b505050506040513d602081101561184257600080fd5b8101908080519060200190929190505050151561185e57600080fd5b81806001019250506114d4565b6002600760006101000a81548160ff0219169083600281111561188a57fe5b02179055507fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0760405160405180910390a1505050565b6000806060600080600060018060028111156118d857fe5b600760009054906101000a900460ff1660028111156118f357fe5b1415156118ff57600080fd5b600089600003131580156119165750600088600003125b151561192157600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156119a757600080fd5b505af11580156119bb573d6000803e3d6000fd5b505050506040513d60208110156119d157600080fd5b8101908080519060200190929190505050955060008a60ff16101580156119fd57508560ff168a60ff16105b1515611a0857600080fd5b8560ff16604051908082528060200260200182016040528015611a3a5781602001602082028038833980820191505090505b50945088600003858b60ff16815181101515611a5257fe5b9060200190602002018181525050611a6e86868a600003612774565b93509350935060008413158015611a86575060008313155b1515611a9157600080fd5b8360000396503373ffffffffffffffffffffffffffffffffffffffff167fab24ef3371efb2e0e3b02955e33b8ef03c14523e71f3bda87878a2386cc17b698b8b8660000386604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b7157600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611bf757600080fd5b505af1158015611c0b573d6000803e3d6000fd5b505050506040513d6020811015611c2157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b505050506040513d6020811015611cf657600080fd5b81019080805190602001909291905050509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d8f57600080fd5b505af1158015611da3573d6000803e3d6000fd5b505050506040513d6020811015611db957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611e8e57600080fd5b505af1158015611ea2573d6000803e3d6000fd5b505050506040513d6020811015611eb857600080fd5b81019080805190602001909291905050501515611ed457600080fd5b7f706d7f48c702007c2fb0881cea5759732e64f52faee427d5ab030787cfb7d787816040518082815260200191505060405180910390a190565b60025481565b600681815481101515611f2357fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620f424062ffffff16600460149054906101000a900462ffffff1662ffffff168302811515611f8957fe5b049050919050565b600760009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561200057600080fd5b600080600281111561200e57fe5b600760009054906101000a900460ff16600281111561202957fe5b14151561203557600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156120bb57600080fd5b505af11580156120cf573d6000803e3d6000fd5b505050506040513d60208110156120e557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156121cc57600080fd5b505af11580156121e0573d6000803e3d6000fd5b505050506040513d60208110156121f657600080fd5b810190808051906020019092919050505080156123cf5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561229457600080fd5b505af11580156122a8573d6000803e3d6000fd5b505050506040513d60208110156122be57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561239357600080fd5b505af11580156123a7573d6000803e3d6000fd5b505050506040513d60208110156123bd57600080fd5b81019080805190602001909291905050505b15156123da57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561246b57600080fd5b505af115801561247f573d6000803e3d6000fd5b50505050816005819055506001600760006101000a81548160ff021916908360028111156124a957fe5b02179055507f8a2fe22ce705a4ac9c189969cef327affbdc477afdae4ae274c2f8ad021f91636005546040518082815260200191505060405180910390a15050565b60055481565b600460149054906101000a900462ffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060606000806000600180600281111561254457fe5b600760009054906101000a900460ff16600281111561255f57fe5b14151561256b57600080fd5b6000891215801561257c5750600088135b151561258757600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561260d57600080fd5b505af1158015612621573d6000803e3d6000fd5b505050506040513d602081101561263757600080fd5b8101908080519060200190929190505050955060008a60ff161015801561266357508560ff168a60ff16105b151561266e57600080fd5b8560ff166040519080825280602002602001820160405280156126a05781602001602082028038833980820191505090505b50945088858b60ff168151811015156126b557fe5b90602001906020020181815250506126ce86868a612774565b935093509350600084121580156126e6575060008312155b15156126f157600080fd5b8396503373ffffffffffffffffffffffffffffffffffffffff167f7caea4a19892ce49b4daa2014d5599eed561dcd16ffabfac851a9737217ae4108b8b8686604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b620f424081565b600080600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338bf045230886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561285a57808201518184015260208101905061283f565b505050509050019350505050602060405180830381600087803b15801561288057600080fd5b505af1158015612894573d6000803e3d6000fd5b505050506040513d60208110156128aa57600080fd5b8101908080519060200190929190505050925060008312156128d9576128d283600003611f5c565b91506128e5565b6128e283611f5c565b91505b600082121515156128f557600080fd5b61290882846134af90919063ffffffff16565b93506000851415801561291b5750848413155b806129265750600085145b151561293157600080fd5b6000831315612d8957600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156129c057600080fd5b505af11580156129d4573d6000803e3d6000fd5b505050506040513d60208110156129ea57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612ad157600080fd5b505af1158015612ae5573d6000803e3d6000fd5b505050506040513d6020811015612afb57600080fd5b81019080805190602001909291905050508015612cd45750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612b9957600080fd5b505af1158015612bad573d6000803e3d6000fd5b505050506040513d6020811015612bc357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c9857600080fd5b505af1158015612cac573d6000803e3d6000fd5b505050506040513d6020811015612cc257600080fd5b81019080805190602001909291905050505b1515612cdf57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015612d7057600080fd5b505af1158015612d84573d6000803e3d6000fd5b505050505b600090505b8660ff168160ff161015613239576000868260ff16815181101515612daf57fe5b9060200190602002015114151561322c576000868260ff16815181101515612dd357fe5b906020019060200201511215612ff057600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b158015612e7757600080fd5b505af1158015612e8b573d6000803e3d6000fd5b505050506040513d6020811015612ea157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330898560ff16815181101515612ee057fe5b906020019060200201516000036040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612fa557600080fd5b505af1158015612fb9573d6000803e3d6000fd5b505050506040513d6020811015612fcf57600080fd5b81019080805190602001909291905050501515612feb57600080fd5b6131c2565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561308457600080fd5b505af1158015613098573d6000803e3d6000fd5b505050506040513d60208110156130ae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33888460ff168151811015156130ec57fe5b906020019060200201516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561317b57600080fd5b505af115801561318f573d6000803e3d6000fd5b505050506040513d60208110156131a557600080fd5b810190808051906020019092919050505015156131c157600080fd5b5b61320b868260ff168151811015156131d657fe5b9060200190602002015160068360ff168154811015156131f257fe5b90600052602060002001546134af90919063ffffffff16565b60068260ff1681548110151561321d57fe5b90600052602060002001819055505b8080600101915050612d8e565b60008312156134a557600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636fb1edcd846000036040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156132d657600080fd5b505af11580156132ea573d6000803e3d6000fd5b5050505060008412156134a457600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561337d57600080fd5b505af1158015613391573d6000803e3d6000fd5b505050506040513d60208110156133a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866000036040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561345d57600080fd5b505af1158015613471573d6000803e3d6000fd5b505050506040513d602081101561348757600080fd5b810190808051906020019092919050505015156134a357600080fd5b5b5b5093509350939050565b60008183019050600082121580156134c75750828112155b806134dd57506000821280156134dc57508281125b5b15156134e557fe5b929150505600a165627a7a723058201026a9151ed20855ce4033c70795e8a6f86eb63083dbf7f19b88775295c659c70029","deployedBytecode":"0x6080604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461010157806315bd7611146101585780631f21f9af146101dc57806328c05d321461023357806343d726d61461028b57806346280a80146102a2578063476343ee146102fa57806359acb42c14610325578063a157979c14610350578063a619486e14610391578063b0011509146103e8578063c040e6b814610429578063ca1d209d14610462578063cb4c86b71461048f578063ddca3f43146104ba578063e274fd24146104ef578063f6d956df14610546578063fbde47f61461059e575b600080fd5b34801561010d57600080fd5b506101166105d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016457600080fd5b506101c660048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001909291905050506105f9565b6040518082815260200191505060405180910390f35b3480156101e857600080fd5b506101f16107c9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023f57600080fd5b50610275600480360381019080803560ff16906020019092919080359060200190929190803590602001909291905050506107ef565b6040518082815260200191505060405180910390f35b34801561029757600080fd5b506102a0611378565b005b3480156102ae57600080fd5b506102e4600480360381019080803560ff16906020019092919080359060200190929190803590602001909291905050506118c0565b6040518082815260200191505060405180910390f35b34801561030657600080fd5b5061030f611b13565b6040518082815260200191505060405180910390f35b34801561033157600080fd5b5061033a611f0e565b6040518082815260200191505060405180910390f35b34801561035c57600080fd5b5061037b60048036038101908080359060200190929190505050611f14565b6040518082815260200191505060405180910390f35b34801561039d57600080fd5b506103a6611f37565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103f457600080fd5b5061041360048036038101908080359060200190929190505050611f5c565b6040518082815260200191505060405180910390f35b34801561043557600080fd5b5061043e611f91565b6040518082600281111561044e57fe5b60ff16815260200191505060405180910390f35b34801561046e57600080fd5b5061048d60048036038101908080359060200190929190505050611fa4565b005b34801561049b57600080fd5b506104a46124eb565b6040518082815260200191505060405180910390f35b3480156104c657600080fd5b506104cf6124f1565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b3480156104fb57600080fd5b50610504612506565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561055257600080fd5b50610588600480360381019080803560ff169060200190929190803590602001909291908035906020019092919050505061252c565b6040518082815260200191505060405180910390f35b3480156105aa57600080fd5b506105b361276d565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600180600281111561060d57fe5b600760009054906101000a900460ff16600281111561062857fe5b14151561063457600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156106ba57600080fd5b505af11580156106ce573d6000803e3d6000fd5b505050506040513d60208110156106e457600080fd5b810190808051906020019092919050505093508360ff16875114151561070957600080fd5b610714848888612774565b8094508195508297505050503373ffffffffffffffffffffffffffffffffffffffff167fa66fcf59f5b6e4cb46e5745fd40c7dfac01b0a81b2b5e55038d9ec959adf7eaa8885856040518080602001848152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156107aa57808201518184015260208101905061078f565b5050505090500194505050505060405180910390a25050505092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b505050506040513d60208110156108a557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561098c57600080fd5b505af11580156109a0573d6000803e3d6000fd5b505050506040513d60208110156109b657600080fd5b81019080805190602001909291905050508015610b8f5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a5457600080fd5b505af1158015610a68573d6000803e3d6000fd5b505050506040513d6020811015610a7e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610b5357600080fd5b505af1158015610b67573d6000803e3d6000fd5b505050506040513d6020811015610b7d57600080fd5b81019080805190602001909291905050505b1515610b9a57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b876040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015610c2b57600080fd5b505af1158015610c3f573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea886040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b158015610cd757600080fd5b505af1158015610ceb573d6000803e3d6000fd5b505050506040513d6020811015610d0157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b330886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610db457600080fd5b505af1158015610dc8573d6000803e3d6000fd5b505050506040513d6020811015610dde57600080fd5b8101908080519060200190929190505050503073ffffffffffffffffffffffffffffffffffffffff166346280a808888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808460ff1660ff1681526020018381526020018281526020019350505050602060405180830381600087803b158015610e7557600080fd5b505af1158015610e89573d6000803e3d6000fd5b505050506040513d6020811015610e9f57600080fd5b810190808051906020019092919050505092508286039350600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610f3d57600080fd5b505af1158015610f51573d6000803e3d6000fd5b505050506040513d6020811015610f6757600080fd5b81019080805190602001909291905050509150600090505b8160ff168160ff161015611161578660ff168160ff1614151561115457600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561103057600080fd5b505af1158015611044573d6000803e3d6000fd5b505050506040513d602081101561105a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561110d57600080fd5b505af1158015611121573d6000803e3d6000fd5b505050506040513d602081101561113757600080fd5b8101908080519060200190929190505050151561115357600080fd5b5b8080600101915050610f7f565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111e757600080fd5b505af11580156111fb573d6000803e3d6000fd5b505050506040513d602081101561121157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156112c457600080fd5b505af11580156112d8573d6000803e3d6000fd5b505050506040513d60208110156112ee57600080fd5b8101908080519060200190929190505050151561130a57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f1dbdc4ff4d51949738d56e120b2be4edecc55d8d2150f1616ec5802abaae3f88888887604051808460ff1660ff168152602001838152602001828152602001935050505060405180910390a25050509392505050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113d757600080fd5b60018060028111156113e557fe5b600760009054906101000a900460ff16600281111561140057fe5b14151561140c57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561149257600080fd5b505af11580156114a6573d6000803e3d6000fd5b505050506040513d60208110156114bc57600080fd5b81019080805190602001909291905050509250600091505b8260ff168260ff16101561186b57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561157657600080fd5b505af115801561158a573d6000803e3d6000fd5b505050506040513d60208110156115a057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561168357600080fd5b505af1158015611697573d6000803e3d6000fd5b505050506040513d60208110156116ad57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561175857600080fd5b505af115801561176c573d6000803e3d6000fd5b505050506040513d602081101561178257600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561181857600080fd5b505af115801561182c573d6000803e3d6000fd5b505050506040513d602081101561184257600080fd5b8101908080519060200190929190505050151561185e57600080fd5b81806001019250506114d4565b6002600760006101000a81548160ff0219169083600281111561188a57fe5b02179055507fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0760405160405180910390a1505050565b6000806060600080600060018060028111156118d857fe5b600760009054906101000a900460ff1660028111156118f357fe5b1415156118ff57600080fd5b600089600003131580156119165750600088600003125b151561192157600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156119a757600080fd5b505af11580156119bb573d6000803e3d6000fd5b505050506040513d60208110156119d157600080fd5b8101908080519060200190929190505050955060008a60ff16101580156119fd57508560ff168a60ff16105b1515611a0857600080fd5b8560ff16604051908082528060200260200182016040528015611a3a5781602001602082028038833980820191505090505b50945088600003858b60ff16815181101515611a5257fe5b9060200190602002018181525050611a6e86868a600003612774565b93509350935060008413158015611a86575060008313155b1515611a9157600080fd5b8360000396503373ffffffffffffffffffffffffffffffffffffffff167fab24ef3371efb2e0e3b02955e33b8ef03c14523e71f3bda87878a2386cc17b698b8b8660000386604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b7157600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611bf757600080fd5b505af1158015611c0b573d6000803e3d6000fd5b505050506040513d6020811015611c2157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b505050506040513d6020811015611cf657600080fd5b81019080805190602001909291905050509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d8f57600080fd5b505af1158015611da3573d6000803e3d6000fd5b505050506040513d6020811015611db957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611e8e57600080fd5b505af1158015611ea2573d6000803e3d6000fd5b505050506040513d6020811015611eb857600080fd5b81019080805190602001909291905050501515611ed457600080fd5b7f706d7f48c702007c2fb0881cea5759732e64f52faee427d5ab030787cfb7d787816040518082815260200191505060405180910390a190565b60025481565b600681815481101515611f2357fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620f424062ffffff16600460149054906101000a900462ffffff1662ffffff168302811515611f8957fe5b049050919050565b600760009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561200057600080fd5b600080600281111561200e57fe5b600760009054906101000a900460ff16600281111561202957fe5b14151561203557600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156120bb57600080fd5b505af11580156120cf573d6000803e3d6000fd5b505050506040513d60208110156120e557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156121cc57600080fd5b505af11580156121e0573d6000803e3d6000fd5b505050506040513d60208110156121f657600080fd5b810190808051906020019092919050505080156123cf5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561229457600080fd5b505af11580156122a8573d6000803e3d6000fd5b505050506040513d60208110156122be57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561239357600080fd5b505af11580156123a7573d6000803e3d6000fd5b505050506040513d60208110156123bd57600080fd5b81019080805190602001909291905050505b15156123da57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561246b57600080fd5b505af115801561247f573d6000803e3d6000fd5b50505050816005819055506001600760006101000a81548160ff021916908360028111156124a957fe5b02179055507f8a2fe22ce705a4ac9c189969cef327affbdc477afdae4ae274c2f8ad021f91636005546040518082815260200191505060405180910390a15050565b60055481565b600460149054906101000a900462ffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060606000806000600180600281111561254457fe5b600760009054906101000a900460ff16600281111561255f57fe5b14151561256b57600080fd5b6000891215801561257c5750600088135b151561258757600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561260d57600080fd5b505af1158015612621573d6000803e3d6000fd5b505050506040513d602081101561263757600080fd5b8101908080519060200190929190505050955060008a60ff161015801561266357508560ff168a60ff16105b151561266e57600080fd5b8560ff166040519080825280602002602001820160405280156126a05781602001602082028038833980820191505090505b50945088858b60ff168151811015156126b557fe5b90602001906020020181815250506126ce86868a612774565b935093509350600084121580156126e6575060008312155b15156126f157600080fd5b8396503373ffffffffffffffffffffffffffffffffffffffff167f7caea4a19892ce49b4daa2014d5599eed561dcd16ffabfac851a9737217ae4108b8b8686604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b620f424081565b600080600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338bf045230886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561285a57808201518184015260208101905061283f565b505050509050019350505050602060405180830381600087803b15801561288057600080fd5b505af1158015612894573d6000803e3d6000fd5b505050506040513d60208110156128aa57600080fd5b8101908080519060200190929190505050925060008312156128d9576128d283600003611f5c565b91506128e5565b6128e283611f5c565b91505b600082121515156128f557600080fd5b61290882846134af90919063ffffffff16565b93506000851415801561291b5750848413155b806129265750600085145b151561293157600080fd5b6000831315612d8957600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156129c057600080fd5b505af11580156129d4573d6000803e3d6000fd5b505050506040513d60208110156129ea57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612ad157600080fd5b505af1158015612ae5573d6000803e3d6000fd5b505050506040513d6020811015612afb57600080fd5b81019080805190602001909291905050508015612cd45750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612b9957600080fd5b505af1158015612bad573d6000803e3d6000fd5b505050506040513d6020811015612bc357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c9857600080fd5b505af1158015612cac573d6000803e3d6000fd5b505050506040513d6020811015612cc257600080fd5b81019080805190602001909291905050505b1515612cdf57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015612d7057600080fd5b505af1158015612d84573d6000803e3d6000fd5b505050505b600090505b8660ff168160ff161015613239576000868260ff16815181101515612daf57fe5b9060200190602002015114151561322c576000868260ff16815181101515612dd357fe5b906020019060200201511215612ff057600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b158015612e7757600080fd5b505af1158015612e8b573d6000803e3d6000fd5b505050506040513d6020811015612ea157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330898560ff16815181101515612ee057fe5b906020019060200201516000036040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612fa557600080fd5b505af1158015612fb9573d6000803e3d6000fd5b505050506040513d6020811015612fcf57600080fd5b81019080805190602001909291905050501515612feb57600080fd5b6131c2565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561308457600080fd5b505af1158015613098573d6000803e3d6000fd5b505050506040513d60208110156130ae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33888460ff168151811015156130ec57fe5b906020019060200201516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561317b57600080fd5b505af115801561318f573d6000803e3d6000fd5b505050506040513d60208110156131a557600080fd5b810190808051906020019092919050505015156131c157600080fd5b5b61320b868260ff168151811015156131d657fe5b9060200190602002015160068360ff168154811015156131f257fe5b90600052602060002001546134af90919063ffffffff16565b60068260ff1681548110151561321d57fe5b90600052602060002001819055505b8080600101915050612d8e565b60008312156134a557600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636fb1edcd846000036040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156132d657600080fd5b505af11580156132ea573d6000803e3d6000fd5b5050505060008412156134a457600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561337d57600080fd5b505af1158015613391573d6000803e3d6000fd5b505050506040513d60208110156133a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866000036040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561345d57600080fd5b505af1158015613471573d6000803e3d6000fd5b505050506040513d602081101561348757600080fd5b810190808051906020019092919050505015156134a357600080fd5b5b5b5093509350939050565b60008183019050600082121580156134c75750828112155b806134dd57506000821280156134dc57508281125b5b15156134e557fe5b929150505600a165627a7a723058201026a9151ed20855ce4033c70795e8a6f86eb63083dbf7f19b88775295c659c70029","sourceMap":"1077:9725:9:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1077:9725:9;;;;;;;","deployedSourceMap":"1077:9725:9:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;874:22:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;874:22:8;;;;;;;;;;;;;;;;;;;;;;;;;;;7876:535:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7876:535:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;966:30:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;966:30:8;;;;;;;;;;;;;;;;;;;;;;;;;;;5926:1172:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5926:1172:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2309:395;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2309:395:9;;;;;;4604:853;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4604:853:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2809:293;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2809:293:9;;;;;;;;;;;;;;;;;;;;;;;902:26:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;902:26:8;;;;;;;;;;;;;;;;;;;;;;;1050:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1050:33:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;10641:159:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10641:159:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1089:19:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:19:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1649:538:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1649:538:9;;;;;;;;;;;;;;;;;;;;;;;;;;1025:19:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1025:19:8;;;;;;;;;;;;;;;;;;;;;;;1002:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1002:17:8;;;;;;;;;;;;;;;;;;;;;;;;;;;934:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;934:26:8;;;;;;;;;;;;;;;;;;;;;;;;;;;3429:840:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3429:840:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;262:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:42:9;;;;;;;;;;;;;;;;;;;;;;;;;;;874:22:8;;;;;;;;;;;;;:::o;7876:535:9:-;8008:11;8035:18;8159:23;8192:9;7970:19;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;8056:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8056:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8056:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8056:31:9;;;;;;;;;;;;;;;;8035:52;;8135:12;8105:42;;:19;:26;:42;8097:51;;;;;;;;8250:61;8260:12;8274:19;8295:15;8250:9;:61::i;:::-;8211:100;;;;;;;;;;;;8345:10;8327:77;;;8357:19;8378;8399:4;8327:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;8327:77:9;;;;;;;;;;;;;;;;;;;7876:535;;;;;;;;:::o;966:30:8:-;;;;;;;;;;;;;:::o;5926:1172:9:-;6042:9;6476:11;6645:18;6712:7;6106:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6106:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6106:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6106:31:9;;;;;;;;;;;;;;;;:44;;;6151:10;6163:4;6169:17;6106:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6106:81:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6106:81:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6106:81:9;;;;;;;;;;;;;;;;:174;;;;;6207:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6207:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6207:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6207:31:9;;;;;;;;;;;;;;;;:39;;;6247:13;;;;;;;;;;;6262:17;6207:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6207:73:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6207:73:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6207:73:9;;;;;;;;;;;;;;;;6106:174;6095:186;;;;;;;;6291:13;;;;;;;;;;;:28;;;6320:17;6291:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6291:47:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6291:47:9;;;;6387:13;;;;;;;;;;;:27;;;6415:17;6387:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6387:46:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6387:46:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6387:46:9;;;;;;;;;;;;;;;;:54;;;6442:4;6448:17;6387:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6387:79:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6387:79:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6387:79:9;;;;;;;;;;;;;;;;;6490:4;:9;;;6500:17;6519;6538:9;6490:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6490:58:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6490:58:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6490:58:9;;;;;;;;;;;;;;;;6476:72;;6585:6;6565:17;:26;6558:33;;6666:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6666:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6666:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6666:31:9;;;;;;;;;;;;;;;;6645:52;;6722:1;6712:11;;6707:176;6729:12;6725:16;;:1;:16;;;6707:176;;;6769:17;6764:22;;:1;:22;;;;6760:123;;;6812:13;;;;;;;;;;;:27;;;6840:1;6812:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6812:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6812:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6812:30:9;;;;;;;;;;;;;;;;:39;;;6852:10;6864:17;6812:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6812:70:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6812:70:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6812:70:9;;;;;;;;;;;;;;;;6804:79;;;;;;;;6760:123;6743:3;;;;;;;6707:176;;;6938:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6938:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6938:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6938:31:9;;;;;;;;;;;;;;;;:40;;;6979:10;6991:6;6938:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6938:60:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6938:60:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6938:60:9;;;;;;;;;;;;;;;;6930:69;;;;;;;;7036:10;7014:77;;;7048:17;7067;7086:4;7014:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5926:1172;;;;;;;;:::o;2309:395::-;2410:18;2477:7;1305;;;;;;;;;;;1291:21;;:10;:21;;;1283:30;;;;;;;;2375:19;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;2431:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2431:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2431:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2431:31:9;;;;;;;;;;;;;;;;2410:52;;2487:1;2477:11;;2472:158;2494:12;2490:16;;:1;:16;;;2472:158;;;2533:13;;;;;;;;;;;:27;;;2561:1;2533:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2533:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2533:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2533:30:9;;;;;;;;;;;;;;;;:39;;;2573:7;;;;;;;;;;;2582:13;;;;;;;;;;;:27;;;2610:1;2582:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2582:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2582:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2582:30:9;;;;;;;;;;;;;;;;:40;;;2623:4;2582:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2582:46:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2582:46:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2582:46:9;;;;;;;;;;;;;;;;2533:96;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2533:96:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2533:96:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2533:96:9;;;;;;;;;;;;;;;;2525:105;;;;;;;;2508:3;;;;;;;2472:158;;;2648:19;2640:5;;:27;;;;;;;;;;;;;;;;;;;;;;;;2682:15;;;;;;;;;;1323:1;2309:395;;:::o;4604:853::-;4752:11;4849:18;4988:32;5131:11;5144:23;5169:9;4714:19;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;4814:1;4792:17;4787:23;;:28;;:51;;;;;4837:1;4824:9;4819:15;;:19;4787:51;4779:60;;;;;;;;4870:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4870:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4870:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4870:31:9;;;;;;;;;;;;;;;;4849:52;;4940:1;4919:17;:22;;;;:58;;;;;4965:12;4945:32;;:17;:32;;;4919:58;4911:67;;;;;;;;5033:12;5023:23;;;;;;;;;;;;;;;;;;;;;;;;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;5023:23:9;;;;4988:58;;5102:17;5097:23;;5056:19;5076:17;5056:38;;;;;;;;;;;;;;;;;;;:64;;;;;5182:61;5192:12;5206:19;5232:9;5227:15;;5182:9;:61::i;:::-;5130:113;;;;;;5272:1;5261:7;:12;;:40;;;;;5300:1;5277:19;:24;;5261:40;5253:49;;;;;;;;5327:7;5326:8;;5312:23;;5367:10;5350:100;;;5379:17;5398;5423:19;5422:20;;5445:4;5350:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4604:853;;;;;;;;;;;:::o;2809:293::-;2883:9;1305:7;;;;;;;;;;;1291:21;;:10;:21;;;1283:30;;;;;;;;2915:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2915:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2915:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2915:31:9;;;;;;;;;;;;;;;;:41;;;2957:4;2915:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2915:47:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2915:47:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2915:47:9;;;;;;;;;;;;;;;;2908:54;;3005:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3005:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3005:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3005:31:9;;;;;;;;;;;;;;;;:40;;;3046:7;;;;;;;;;;;3055:4;3005:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3005:55:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3005:55:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3005:55:9;;;;;;;;;;;;;;;;2997:64;;;;;;;;3076:19;3090:4;3076:19;;;;;;;;;;;;;;;;;;2809:293;:::o;902:26:8:-;;;;:::o;1050:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;10641:159:9:-;10732:4;297:7;10759:34;;10778:3;;;;;;;;;;;10759:22;;:16;:22;:34;;;;;;;;10752:41;;10641:159;;;:::o;1089:19:8:-;;;;;;;;;;;;;:::o;1649:538:9:-;1305:7;;;;;;;;;;;1291:21;;:10;:21;;;1283:30;;;;;;;;1727:20;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;1873:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1873:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1873:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1873:31:9;;;;;;;;;;;;;;;;:44;;;1918:10;1930:4;1936:8;1873:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1873:72:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1873:72:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1873:72:9;;;;;;;;;;;;;;;;:156;;;;;1965:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1965:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1965:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1965:31:9;;;;;;;;;;;;;;;;:39;;;2005:13;;;;;;;;;;;2020:8;1965:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1965:64:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1965:64:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1965:64:9;;;;;;;;;;;;;;;;1873:156;1862:168;;;;;;;;2040:13;;;;;;;;;;;:28;;;2069:8;2040:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2040:38:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2040:38:9;;;;2098:8;2088:7;:18;;;;2124:19;2116:5;;:27;;;;;;;;;;;;;;;;;;;;;;;;2158:22;2172:7;;2158:22;;;;;;;;;;;;;;;;;;1323:1;1649:538;:::o;1025:19:8:-;;;;:::o;1002:17::-;;;;;;;;;;;;;:::o;934:26::-;;;;;;;;;;;;;:::o;3429:840:9:-;3574:9;3665:18;3804:32;3946:11;3959:23;3984:9;3536:19;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;3633:1;3611:17;3607:27;;:47;;;;;3653:1;3642:7;3638:16;3607:47;3599:56;;;;;;;;3686:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3686:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3686:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3686:31:9;;;;;;;;;;;;;;;;3665:52;;3756:1;3735:17;:22;;;;:58;;;;;3781:12;3761:32;;:17;:32;;;3735:58;3727:67;;;;;;;;3849:12;3839:23;;;;;;;;;;;;;;;;;;;;;;;;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;3839:23:9;;;;3804:58;;3917:17;3872:19;3892:17;3872:38;;;;;;;;;;;;;;;;;;;:63;;;;;3997:58;4007:12;4021:19;4046:7;3997:9;:58::i;:::-;3945:110;;;;;;4084:1;4073:7;:12;;:40;;;;;4112:1;4089:19;:24;;4073:40;4065:49;;;;;;;;4136:7;4124:20;;4180:10;4159:103;;;4192:17;4211;4235:19;4257:4;4159:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3429:840;;;;;;;;;;;:::o;262:42::-;297:7;262:42;:::o;8417:2070::-;8537:11;8550:23;8575:9;9478:7;8672:11;;;;;;;;;;;:23;;;8696:4;8702:19;8672:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;8672:50:9;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8672:50:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8672:50:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8672:50:9;;;;;;;;;;;;;;;;8650:72;;8757:1;8735:19;:23;8732:162;;;8779:41;8799:19;8798:20;;8779:13;:41::i;:::-;8772:48;;8732:162;;;8854:40;8873:19;8854:13;:40::i;:::-;8847:47;;8732:162;8926:1;8917:4;8913:14;;8905:23;;;;;;;;8948:34;8976:4;8948:19;:23;;:34;;;;:::i;:::-;8938:44;;9034:1;9015:15;:20;;:50;;;;;9050:15;9039:7;:26;;9015:50;9014:88;;;;9101:1;9082:15;:20;9014:88;8993:119;;;;;;;;9148:1;9126:19;:23;9123:340;;;9190:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9190:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9190:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9190:31:9;;;;;;;;;;;;;;;;:44;;;9235:10;9247:4;9258:7;9190:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9190:77:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9190:77:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9190:77:9;;;;;;;;;;;;;;;;:178;;;;;9287:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9287:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9287:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9287:31:9;;;;;;;;;;;;;;;;:39;;;9327:13;;;;;;;;;;;9347:19;9287:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9287:81:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9287:81:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9287:81:9;;;;;;;;;;;;;;;;9190:178;9165:217;;;;;;;;9397:13;;;;;;;;;;;:28;;;9431:19;9397:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9397:55:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9397:55:9;;;;9123:340;9488:1;9478:11;;9473:535;9495:12;9491:16;;:1;:16;;;9473:535;;;9557:1;9531:19;9551:1;9531:22;;;;;;;;;;;;;;;;;;;;:27;;9528:470;;;9606:1;9581:19;9601:1;9581:22;;;;;;;;;;;;;;;;;;;;:26;9578:310;;;9639:13;;;;;;;;;;;:27;;;9667:1;9639:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9639:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9639:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9639:30:9;;;;;;;;;;;;;;;;:43;;;9683:10;9695:4;9707:19;9727:1;9707:22;;;;;;;;;;;;;;;;;;;;9706:23;;9639:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9639:92:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9639:92:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9639:92:9;;;;;;;;;;;;;;;;9631:101;;;;;;;;9578:310;;;9787:13;;;;;;;;;;;:27;;;9815:1;9787:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9787:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9787:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9787:30:9;;;;;;;;;;;;;;;;:39;;;9827:10;9844:19;9864:1;9844:22;;;;;;;;;;;;;;;;;;;;9787:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9787:81:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9787:81:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9787:81:9;;;;;;;;;;;;;;;;9779:90;;;;;;;;9578:310;9932:51;9960:19;9980:1;9960:22;;;;;;;;;;;;;;;;;;;;9932:20;9953:1;9932:23;;;;;;;;;;;;;;;;;;;;:27;;:51;;;;:::i;:::-;9906:20;9927:1;9906:23;;;;;;;;;;;;;;;;;;;:77;;;;9528:470;9509:3;;;;;;;9473:535;;;10043:1;10021:19;:23;10018:463;;;10274:13;;;;;;;;;;;:29;;;10310:19;10309:20;;10274:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10274:57:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10274:57:9;;;;10358:1;10348:7;:11;10345:126;;;10387:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10387:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10387:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10387:31:9;;;;;;;;;;;;;;;;:40;;;10428:10;10446:7;10445:8;;10387:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10387:68:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10387:68:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10387:68:9;;;;;;;;;;;;;;;;10379:77;;;;;;;;10345:126;10018:463;8417:2070;;;;;;;;:::o;2556:138:31:-;2612:8;2636:1;2632;:5;2628:9;;2656:1;2651;:6;;:16;;;;;2666:1;2661;:6;;2651:16;2650:38;;;;2677:1;2673;:5;:14;;;;;2686:1;2682;:5;2673:14;2650:38;2643:46;;;;;;2556:138;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/Market.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"../Events/Event.sol\";\nimport \"../MarketMakers/MarketMaker.sol\";\n\n\ncontract StandardMarketData {\n /*\n * Constants\n */\n uint24 public constant FEE_RANGE = 1000000; // 100%\n}\n\ncontract StandardMarketProxy is Proxy, MarketData, StandardMarketData {\n constructor(address proxy, address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee)\n Proxy(proxy)\n public\n {\n // Validate inputs\n require(address(_eventContract) != 0 && address(_marketMaker) != 0 && _fee < FEE_RANGE);\n creator = _creator;\n createdAtBlock = block.number;\n eventContract = _eventContract;\n netOutcomeTokensSold = new int[](eventContract.getOutcomeCount());\n fee = _fee;\n marketMaker = _marketMaker;\n stage = Stages.MarketCreated;\n }\n}\n\n/// @title Standard market contract - Backed implementation of standard markets\n/// @author Stefan George - \ncontract StandardMarket is Proxied, Market, StandardMarketData {\n using SafeMath for *;\n\n /*\n * Modifiers\n */\n modifier isCreator() {\n // Only creator is allowed to proceed\n require(msg.sender == creator);\n _;\n }\n\n modifier atStage(Stages _stage) {\n // Contract has to be in given stage\n require(stage == _stage);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Allows to fund the market with collateral tokens converting them into outcome tokens\n /// @param _funding Funding amount\n function fund(uint _funding)\n public\n isCreator\n atStage(Stages.MarketCreated)\n {\n // Request collateral tokens and allow event contract to transfer them to buy all outcomes\n require( eventContract.collateralToken().transferFrom(msg.sender, this, _funding)\n && eventContract.collateralToken().approve(eventContract, _funding));\n eventContract.buyAllOutcomes(_funding);\n funding = _funding;\n stage = Stages.MarketFunded;\n emit MarketFunding(funding);\n }\n\n /// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator\n function close()\n public\n isCreator\n atStage(Stages.MarketFunded)\n {\n uint8 outcomeCount = eventContract.getOutcomeCount();\n for (uint8 i = 0; i < outcomeCount; i++)\n require(eventContract.outcomeTokens(i).transfer(creator, eventContract.outcomeTokens(i).balanceOf(this)));\n stage = Stages.MarketClosed;\n emit MarketClosing();\n }\n\n /// @dev Allows market creator to withdraw fees generated by trades\n /// @return Fee amount\n function withdrawFees()\n public\n isCreator\n returns (uint fees)\n {\n fees = eventContract.collateralToken().balanceOf(this);\n // Transfer fees\n require(eventContract.collateralToken().transfer(creator, fees));\n emit FeeWithdrawal(fees);\n }\n\n /// @dev Allows to buy outcome tokens from market maker\n /// @param outcomeTokenIndex Index of the outcome token to buy\n /// @param outcomeTokenCount Amount of outcome tokens to buy\n /// @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n /// @return Cost in collateral tokens\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost)\n public\n atStage(Stages.MarketFunded)\n returns (uint cost)\n {\n require(int(outcomeTokenCount) >= 0 && int(maxCost) > 0);\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenIndex >= 0 && outcomeTokenIndex < outcomeCount);\n int[] memory outcomeTokenAmounts = new int[](outcomeCount);\n outcomeTokenAmounts[outcomeTokenIndex] = int(outcomeTokenCount);\n (int netCost, int outcomeTokenNetCost, uint fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, int(maxCost));\n require(netCost >= 0 && outcomeTokenNetCost >= 0);\n cost = uint(netCost);\n emit OutcomeTokenPurchase(msg.sender, outcomeTokenIndex, outcomeTokenCount, uint(outcomeTokenNetCost), fees);\n }\n\n /// @dev Allows to sell outcome tokens to market maker\n /// @param outcomeTokenIndex Index of the outcome token to sell\n /// @param outcomeTokenCount Amount of outcome tokens to sell\n /// @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n /// @return Profit in collateral tokens\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n atStage(Stages.MarketFunded)\n returns (uint profit)\n {\n require(-int(outcomeTokenCount) <= 0 && -int(minProfit) < 0);\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenIndex >= 0 && outcomeTokenIndex < outcomeCount);\n int[] memory outcomeTokenAmounts = new int[](outcomeCount);\n outcomeTokenAmounts[outcomeTokenIndex] = -int(outcomeTokenCount);\n (int netCost, int outcomeTokenNetCost, uint fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, -int(minProfit));\n require(netCost <= 0 && outcomeTokenNetCost <= 0);\n profit = uint(-netCost);\n emit OutcomeTokenSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, uint(-outcomeTokenNetCost), fees);\n }\n\n /// @dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n /// shares of all other outcome tokens.\n /// @param outcomeTokenIndex Index of the outcome token to short sell\n /// @param outcomeTokenCount Amount of outcome tokens to short sell\n /// @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n /// @return Cost to short sell outcome in collateral tokens\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint cost)\n {\n // Buy all outcomes\n require( eventContract.collateralToken().transferFrom(msg.sender, this, outcomeTokenCount)\n && eventContract.collateralToken().approve(eventContract, outcomeTokenCount));\n eventContract.buyAllOutcomes(outcomeTokenCount);\n // Short sell selected outcome\n eventContract.outcomeTokens(outcomeTokenIndex).approve(this, outcomeTokenCount);\n uint profit = this.sell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n cost = outcomeTokenCount - profit;\n // Transfer outcome tokens to buyer\n uint8 outcomeCount = eventContract.getOutcomeCount();\n for (uint8 i = 0; i < outcomeCount; i++)\n if (i != outcomeTokenIndex)\n require(eventContract.outcomeTokens(i).transfer(msg.sender, outcomeTokenCount));\n // Send change back to buyer\n require(eventContract.collateralToken().transfer(msg.sender, profit));\n emit OutcomeTokenShortSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);\n }\n\n /// @dev Allows to trade outcome tokens and collateral with the market maker\n /// @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n /// @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n /// @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.\n function trade(int[] outcomeTokenAmounts, int collateralLimit)\n public\n atStage(Stages.MarketFunded)\n returns (int netCost)\n {\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenAmounts.length == outcomeCount);\n\n int outcomeTokenNetCost;\n uint fees;\n (netCost, outcomeTokenNetCost, fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, collateralLimit);\n\n emit OutcomeTokenTrade(msg.sender, outcomeTokenAmounts, outcomeTokenNetCost, fees);\n }\n\n function tradeImpl(uint8 outcomeCount, int[] outcomeTokenAmounts, int collateralLimit)\n private\n returns (int netCost, int outcomeTokenNetCost, uint fees)\n {\n // Calculate net cost for executing trade\n outcomeTokenNetCost = marketMaker.calcNetCost(this, outcomeTokenAmounts);\n if(outcomeTokenNetCost < 0)\n fees = calcMarketFee(uint(-outcomeTokenNetCost));\n else\n fees = calcMarketFee(uint(outcomeTokenNetCost));\n\n require(int(fees) >= 0);\n netCost = outcomeTokenNetCost.add(int(fees));\n\n require(\n (collateralLimit != 0 && netCost <= collateralLimit) ||\n collateralLimit == 0\n );\n\n if(outcomeTokenNetCost > 0) {\n require(\n eventContract.collateralToken().transferFrom(msg.sender, this, uint(netCost)) &&\n eventContract.collateralToken().approve(eventContract, uint(outcomeTokenNetCost))\n );\n\n eventContract.buyAllOutcomes(uint(outcomeTokenNetCost));\n }\n\n for (uint8 i = 0; i < outcomeCount; i++) {\n if(outcomeTokenAmounts[i] != 0) {\n if(outcomeTokenAmounts[i] < 0) {\n require(eventContract.outcomeTokens(i).transferFrom(msg.sender, this, uint(-outcomeTokenAmounts[i])));\n } else {\n require(eventContract.outcomeTokens(i).transfer(msg.sender, uint(outcomeTokenAmounts[i])));\n }\n\n netOutcomeTokensSold[i] = netOutcomeTokensSold[i].add(outcomeTokenAmounts[i]);\n }\n }\n\n if(outcomeTokenNetCost < 0) {\n // This is safe since\n // 0x8000000000000000000000000000000000000000000000000000000000000000 ==\n // uint(-int(-0x8000000000000000000000000000000000000000000000000000000000000000))\n eventContract.sellAllOutcomes(uint(-outcomeTokenNetCost));\n if(netCost < 0) {\n require(eventContract.collateralToken().transfer(msg.sender, uint(-netCost)));\n }\n }\n }\n\n /// @dev Calculates fee to be paid to market maker\n /// @param outcomeTokenCost Cost for buying outcome tokens\n /// @return Fee for trade\n function calcMarketFee(uint outcomeTokenCost)\n public\n view\n returns (uint)\n {\n return outcomeTokenCost * fee / FEE_RANGE;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","exportedSymbols":{"StandardMarket":[3112],"StandardMarketData":[2248],"StandardMarketProxy":[2326]},"id":3113,"nodeType":"SourceUnit","nodes":[{"id":2240,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:9"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","file":"../Markets/Market.sol","id":2241,"nodeType":"ImportDirective","scope":3113,"sourceUnit":2239,"src":"25:31:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":2242,"nodeType":"ImportDirective","scope":3113,"sourceUnit":7329,"src":"57:63:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2243,"nodeType":"ImportDirective","scope":3113,"sourceUnit":385,"src":"121:29:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2244,"nodeType":"ImportDirective","scope":3113,"sourceUnit":1572,"src":"151:41:9","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2248,"linearizedBaseContracts":[2248],"name":"StandardMarketData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":2247,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":2248,"src":"262:42:9","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2245,"name":"uint24","nodeType":"ElementaryTypeName","src":"262:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":2246,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"297:7:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"}],"scope":3113,"src":"195:120:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2249,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"349:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":2250,"nodeType":"InheritanceSpecifier","src":"349:5:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2251,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"356:10:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2252,"nodeType":"InheritanceSpecifier","src":"356:10:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2253,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"368:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2254,"nodeType":"InheritanceSpecifier","src":"368:18:9"}],"contractDependencies":[2172,2248,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2326,"linearizedBaseContracts":[2326,2248,2172,6701,6673],"name":"StandardMarketProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":2324,"nodeType":"Block","src":"539:407:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2272,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"592:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":2271,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"584:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2273,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"584:23:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2274,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"611:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"584:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2277,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"624:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":2276,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"616:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2278,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"616:21:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2279,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"641:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"616:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":2284,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2282,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"646:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2283,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"653:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"646:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:78:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2270,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"576:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"576:87:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2287,"nodeType":"ExpressionStatement","src":"576:87:9"},{"expression":{"argumentTypes":null,"id":2290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2288,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"673:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2289,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2258,"src":"683:8:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"673:18:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":2291,"nodeType":"ExpressionStatement","src":"673:18:9"},{"expression":{"argumentTypes":null,"id":2295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2292,"name":"createdAtBlock","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2154,"src":"701:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2293,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"718:5:9","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":2294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"718:12:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2296,"nodeType":"ExpressionStatement","src":"701:29:9"},{"expression":{"argumentTypes":null,"id":2299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2297,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"740:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2298,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"756:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"740:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2300,"nodeType":"ExpressionStatement","src":"740:30:9"},{"expression":{"argumentTypes":null,"id":2309,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2301,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"780:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2305,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"813:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"813:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2307,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"813:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2304,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"803:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2302,"name":"int","nodeType":"ElementaryTypeName","src":"807:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2303,"length":null,"nodeType":"ArrayTypeName","src":"807:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2308,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"803:42:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"src":"780:65:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":2310,"nodeType":"ExpressionStatement","src":"780:65:9"},{"expression":{"argumentTypes":null,"id":2313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2311,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"855:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2312,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"861:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"855:10:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":2314,"nodeType":"ExpressionStatement","src":"855:10:9"},{"expression":{"argumentTypes":null,"id":2317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2315,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"875:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2316,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"889:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"875:26:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2318,"nodeType":"ExpressionStatement","src":"875:26:9"},{"expression":{"argumentTypes":null,"id":2322,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2319,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"911:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2320,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"919:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2321,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"919:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"911:28:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2323,"nodeType":"ExpressionStatement","src":"911:28:9"}]},"documentation":null,"id":2325,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":2267,"name":"proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2256,"src":"513:5:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":2268,"modifierName":{"argumentTypes":null,"id":2266,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"507:5:9","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"507:12:9"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":2265,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2256,"name":"proxy","nodeType":"VariableDeclaration","scope":2325,"src":"405:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2255,"name":"address","nodeType":"ElementaryTypeName","src":"405:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2258,"name":"_creator","nodeType":"VariableDeclaration","scope":2325,"src":"420:16:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2257,"name":"address","nodeType":"ElementaryTypeName","src":"420:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2260,"name":"_eventContract","nodeType":"VariableDeclaration","scope":2325,"src":"438:20:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2259,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"438:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2262,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":2325,"src":"460:24:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2261,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"460:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2264,"name":"_fee","nodeType":"VariableDeclaration","scope":2325,"src":"486:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2263,"name":"uint24","nodeType":"ElementaryTypeName","src":"486:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"404:94:9"},"payable":false,"returnParameters":{"id":2269,"nodeType":"ParameterList","parameters":[],"src":"539:0:9"},"scope":2326,"src":"393:553:9","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3113,"src":"317:631:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2327,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1104:7:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":2328,"nodeType":"InheritanceSpecifier","src":"1104:7:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2329,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"1113:6:9","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":2330,"nodeType":"InheritanceSpecifier","src":"1113:6:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2331,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"1121:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2332,"nodeType":"InheritanceSpecifier","src":"1121:18:9"}],"contractDependencies":[2172,2238,2248,6673],"contractKind":"contract","documentation":"@title Standard market contract - Backed implementation of standard markets\n @author Stefan George - ","fullyImplemented":true,"id":3112,"linearizedBaseContracts":[3112,2248,2238,2172,6673],"name":"StandardMarket","nodeType":"ContractDefinition","nodes":[{"id":2334,"libraryName":{"contractScope":null,"id":2333,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1152:8:9","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1146:21:9","typeName":null},{"body":{"id":2344,"nodeType":"Block","src":"1227:104:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2337,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1291:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2338,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1291:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2339,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"1305:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1291:21:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2336,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1283:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2341,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1283:30:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2342,"nodeType":"ExpressionStatement","src":"1283:30:9"},{"id":2343,"nodeType":"PlaceholderStatement","src":"1323:1:9"}]},"documentation":null,"id":2345,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":2335,"nodeType":"ParameterList","parameters":[],"src":"1224:2:9"},"src":"1206:125:9","visibility":"internal"},{"body":{"id":2356,"nodeType":"Block","src":"1369:97:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"id":2352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2350,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"1432:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2351,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2347,"src":"1441:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"1432:15:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2349,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1424:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2353,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1424:24:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2354,"nodeType":"ExpressionStatement","src":"1424:24:9"},{"id":2355,"nodeType":"PlaceholderStatement","src":"1458:1:9"}]},"documentation":null,"id":2357,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":2348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2347,"name":"_stage","nodeType":"VariableDeclaration","scope":2357,"src":"1354:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2346,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1354:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"internal"}],"src":"1353:15:9"},"src":"1337:129:9","visibility":"internal"},{"body":{"id":2407,"nodeType":"Block","src":"1753:434:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2385,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2373,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1918:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1918:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2375,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"1930:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2376,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"1936:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2369,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1873:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1873:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2371,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1873:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2377,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:72:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2382,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2383,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2020:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2378,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1965:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1965:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2381,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"1965:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2384,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:64:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1873:156:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2368,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1862:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2386,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1862:168:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2387,"nodeType":"ExpressionStatement","src":"1862:168:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2391,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2069:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2388,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2040:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"2040:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2392,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2040:38:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2393,"nodeType":"ExpressionStatement","src":"2040:38:9"},{"expression":{"argumentTypes":null,"id":2396,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2394,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2088:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2395,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2098:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2088:18:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2397,"nodeType":"ExpressionStatement","src":"2088:18:9"},{"expression":{"argumentTypes":null,"id":2401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2398,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2116:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2399,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2124:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2400,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2124:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2116:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2402,"nodeType":"ExpressionStatement","src":"2116:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2404,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2172:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2403,"name":"MarketFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2099,"src":"2158:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2405,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:22:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2406,"nodeType":"EmitStatement","src":"2153:27:9"}]},"documentation":"@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount","id":2408,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2362,"modifierName":{"argumentTypes":null,"id":2361,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"1701:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1701:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2364,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"1727:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2365,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2366,"modifierName":{"argumentTypes":null,"id":2363,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"1719:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"1719:29:9"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2360,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2359,"name":"_funding","nodeType":"VariableDeclaration","scope":2408,"src":"1663:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2358,"name":"uint","nodeType":"ElementaryTypeName","src":"1663:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1662:15:9"},"payable":false,"returnParameters":{"id":2367,"nodeType":"ParameterList","parameters":[],"src":"1753:0:9"},"scope":3112,"src":"1649:538:9","stateMutability":"nonpayable","superFunction":2179,"visibility":"public"},{"body":{"id":2459,"nodeType":"Block","src":"2400:304:9","statements":[{"assignments":[2418],"declarations":[{"constant":false,"id":2418,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2460,"src":"2410:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2417,"name":"uint8","nodeType":"ElementaryTypeName","src":"2410:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2422,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2419,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2431:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2431:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2421,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2431:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"2410:52:9"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2439,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"2573:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2445,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2623:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2442,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2610:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2440,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2582:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2582:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2443,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2444,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2582:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2446,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:46:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2436,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2561:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2434,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2533:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2533:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2437,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"2533:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:96:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2433,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2525:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2448,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2525:105:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2449,"nodeType":"ExpressionStatement","src":"2525:105:9"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2427,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2490:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2428,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2418,"src":"2494:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2490:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2450,"initializationExpression":{"assignments":[2424],"declarations":[{"constant":false,"id":2424,"name":"i","nodeType":"VariableDeclaration","scope":2460,"src":"2477:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2423,"name":"uint8","nodeType":"ElementaryTypeName","src":"2477:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2426,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2425,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2487:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2477:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2508:3:9","subExpression":{"argumentTypes":null,"id":2430,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2508:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2432,"nodeType":"ExpressionStatement","src":"2508:3:9"},"nodeType":"ForStatement","src":"2472:158:9"},{"expression":{"argumentTypes":null,"id":2454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2451,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2640:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2452,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2648:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2453,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2648:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2640:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2455,"nodeType":"ExpressionStatement","src":"2640:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":2456,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2101,"src":"2682:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":2457,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2682:15:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2458,"nodeType":"EmitStatement","src":"2677:20:9"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":2460,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2411,"modifierName":{"argumentTypes":null,"id":2410,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2349:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2349:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2413,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2375:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2414,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2375:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2415,"modifierName":{"argumentTypes":null,"id":2412,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"2367:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"2367:28:9"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2409,"nodeType":"ParameterList","parameters":[],"src":"2323:2:9"},"payable":false,"returnParameters":{"id":2416,"nodeType":"ParameterList","parameters":[],"src":"2400:0:9"},"scope":3112,"src":"2309:395:9","stateMutability":"nonpayable","superFunction":2182,"visibility":"public"},{"body":{"id":2490,"nodeType":"Block","src":"2898:204:9","statements":[{"expression":{"argumentTypes":null,"id":2474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2467,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"2908:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2472,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2957:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2468,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2915:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2469,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"2915:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2470,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2471,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"2915:41:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2908:54:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2475,"nodeType":"ExpressionStatement","src":"2908:54:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2481,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"3046:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2482,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3055:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2477,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2478,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3005:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2479,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2480,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3005:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:55:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2476,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2997:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2997:64:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2485,"nodeType":"ExpressionStatement","src":"2997:64:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2487,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3090:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2486,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2105,"src":"3076:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2488,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3076:19:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2489,"nodeType":"EmitStatement","src":"3071:24:9"}]},"documentation":"@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount","id":2491,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2463,"modifierName":{"argumentTypes":null,"id":2462,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2856:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2856:9:9"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2461,"nodeType":"ParameterList","parameters":[],"src":"2830:2:9"},"payable":false,"returnParameters":{"id":2466,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2465,"name":"fees","nodeType":"VariableDeclaration","scope":2491,"src":"2883:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2464,"name":"uint","nodeType":"ElementaryTypeName","src":"2883:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2882:11:9"},"scope":3112,"src":"2809:293:9","stateMutability":"nonpayable","superFunction":2187,"visibility":"public"},{"body":{"id":2595,"nodeType":"Block","src":"3589:680:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2517,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2508,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3611:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2507,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3607:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2509,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3607:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2510,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3633:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3607:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2516,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2513,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"3642:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2512,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3638:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2514,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3638:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2515,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3653:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3638:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3607:47:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2506,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3599:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2518,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3599:56:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2519,"nodeType":"ExpressionStatement","src":"3599:56:9"},{"assignments":[2521],"declarations":[{"constant":false,"id":2521,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2596,"src":"3665:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2520,"name":"uint8","nodeType":"ElementaryTypeName","src":"3665:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2525,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2522,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3686:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2523,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"3686:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3686:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"3665:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2533,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2527,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3735:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2528,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3756:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3735:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2532,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2530,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3761:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2531,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3781:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"3761:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3735:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2526,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3727:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2534,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3727:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2535,"nodeType":"ExpressionStatement","src":"3727:67:9"},{"assignments":[2539],"declarations":[{"constant":false,"id":2539,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2596,"src":"3804:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2537,"name":"int","nodeType":"ElementaryTypeName","src":"3804:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2538,"length":null,"nodeType":"ArrayTypeName","src":"3804:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2545,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2543,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3849:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2542,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3839:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2540,"name":"int","nodeType":"ElementaryTypeName","src":"3843:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2541,"length":null,"nodeType":"ArrayTypeName","src":"3843:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3839:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"3804:58:9"},{"expression":{"argumentTypes":null,"id":2552,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2546,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"3872:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2548,"indexExpression":{"argumentTypes":null,"id":2547,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3892:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3872:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2550,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3917:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2549,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2551,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3872:63:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2553,"nodeType":"ExpressionStatement","src":"3872:63:9"},{"assignments":[2555,2557,2559],"declarations":[{"constant":false,"id":2555,"name":"netCost","nodeType":"VariableDeclaration","scope":2596,"src":"3946:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2554,"name":"int","nodeType":"ElementaryTypeName","src":"3946:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2557,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2596,"src":"3959:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2556,"name":"int","nodeType":"ElementaryTypeName","src":"3959:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2559,"name":"fees","nodeType":"VariableDeclaration","scope":2596,"src":"3984:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2558,"name":"uint","nodeType":"ElementaryTypeName","src":"3984:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2567,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2561,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"4007:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2562,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"4021:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2564,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"4046:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2563,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4042:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2565,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4042:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2560,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"3997:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2566,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3997:58:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"3945:110:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2575,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2569,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4073:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4084:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4073:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2572,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4089:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2573,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4112:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4089:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4073:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2568,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4065:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2576,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4065:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2577,"nodeType":"ExpressionStatement","src":"4065:49:9"},{"expression":{"argumentTypes":null,"id":2582,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2578,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2504,"src":"4124:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2580,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4136:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4131:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2581,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4131:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4124:20:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2583,"nodeType":"ExpressionStatement","src":"4124:20:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2585,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4180:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4180:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2587,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"4192:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2588,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"4211:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2590,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4235:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2589,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4230:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2591,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4230:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2592,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2559,"src":"4257:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2584,"name":"OutcomeTokenPurchase","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2117,"src":"4159:20:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4159:103:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2594,"nodeType":"EmitStatement","src":"4154:108:9"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":2596,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2500,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"3536:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2501,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3536:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2502,"modifierName":{"argumentTypes":null,"id":2499,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"3528:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"3528:28:9"}],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2498,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2493,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2596,"src":"3442:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2492,"name":"uint8","nodeType":"ElementaryTypeName","src":"3442:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2495,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2596,"src":"3467:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2494,"name":"uint","nodeType":"ElementaryTypeName","src":"3467:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2497,"name":"maxCost","nodeType":"VariableDeclaration","scope":2596,"src":"3491:12:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2496,"name":"uint","nodeType":"ElementaryTypeName","src":"3491:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3441:63:9"},"payable":false,"returnParameters":{"id":2505,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2504,"name":"cost","nodeType":"VariableDeclaration","scope":2596,"src":"3574:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2503,"name":"uint","nodeType":"ElementaryTypeName","src":"3574:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3573:11:9"},"scope":3112,"src":"3429:840:9","stateMutability":"nonpayable","superFunction":2198,"visibility":"public"},{"body":{"id":2706,"nodeType":"Block","src":"4769:688:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2624,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2617,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4787:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2613,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"4792:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2612,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4788:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2614,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4788:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2616,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4814:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4787:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2623,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2621,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4819:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2619,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"4824:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2618,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2620,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2622,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4837:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4819:19:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4787:51:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2611,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2625,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4779:60:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2626,"nodeType":"ExpressionStatement","src":"4779:60:9"},{"assignments":[2628],"declarations":[{"constant":false,"id":2628,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2707,"src":"4849:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2627,"name":"uint8","nodeType":"ElementaryTypeName","src":"4849:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2632,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2629,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"4870:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"4870:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"4849:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2634,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4919:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2635,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4940:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4919:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2637,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4945:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2638,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"4965:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"4945:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4919:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4911:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2641,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4911:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2642,"nodeType":"ExpressionStatement","src":"4911:67:9"},{"assignments":[2646],"declarations":[{"constant":false,"id":2646,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2707,"src":"4988:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2644,"name":"int","nodeType":"ElementaryTypeName","src":"4988:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2645,"length":null,"nodeType":"ArrayTypeName","src":"4988:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2652,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2650,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5033:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2649,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"5023:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2647,"name":"int","nodeType":"ElementaryTypeName","src":"5027:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2648,"length":null,"nodeType":"ArrayTypeName","src":"5027:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2651,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5023:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"4988:58:9"},{"expression":{"argumentTypes":null,"id":2660,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2653,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5056:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2655,"indexExpression":{"argumentTypes":null,"id":2654,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5076:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5056:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2659,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5097:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2657,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5102:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5098:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5098:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5056:64:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2661,"nodeType":"ExpressionStatement","src":"5056:64:9"},{"assignments":[2663,2665,2667],"declarations":[{"constant":false,"id":2663,"name":"netCost","nodeType":"VariableDeclaration","scope":2707,"src":"5131:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2662,"name":"int","nodeType":"ElementaryTypeName","src":"5131:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2665,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2707,"src":"5144:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2664,"name":"int","nodeType":"ElementaryTypeName","src":"5144:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2667,"name":"fees","nodeType":"VariableDeclaration","scope":2707,"src":"5169:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2666,"name":"uint","nodeType":"ElementaryTypeName","src":"5169:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2676,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2669,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5192:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2670,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5206:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2674,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5227:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2672,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"5232:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2671,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5228:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2673,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5228:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2668,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"5182:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2675,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5182:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"5130:113:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2684,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2680,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2678,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5261:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2679,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5272:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5261:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2681,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5277:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5300:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5277:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5261:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2677,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5253:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2685,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5253:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2686,"nodeType":"ExpressionStatement","src":"5253:49:9"},{"expression":{"argumentTypes":null,"id":2692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2687,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2609,"src":"5312:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2690,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5326:8:9","subExpression":{"argumentTypes":null,"id":2689,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5327:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5321:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2691,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5321:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5312:23:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2693,"nodeType":"ExpressionStatement","src":"5312:23:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2695,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5367:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2696,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5367:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2697,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5379:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2698,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5398:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2701,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5422:20:9","subExpression":{"argumentTypes":null,"id":2700,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5423:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5417:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2702,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5417:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2703,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2667,"src":"5445:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2694,"name":"OutcomeTokenSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2129,"src":"5350:16:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2704,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5350:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2705,"nodeType":"EmitStatement","src":"5345:105:9"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":2707,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2605,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"4714:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2606,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4714:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2607,"modifierName":{"argumentTypes":null,"id":2604,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"4706:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"4706:28:9"}],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2603,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2598,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2707,"src":"4618:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2597,"name":"uint8","nodeType":"ElementaryTypeName","src":"4618:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2600,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2707,"src":"4643:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2599,"name":"uint","nodeType":"ElementaryTypeName","src":"4643:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2602,"name":"minProfit","nodeType":"VariableDeclaration","scope":2707,"src":"4667:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2601,"name":"uint","nodeType":"ElementaryTypeName","src":"4667:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4617:65:9"},"payable":false,"returnParameters":{"id":2610,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2609,"name":"profit","nodeType":"VariableDeclaration","scope":2707,"src":"4752:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2608,"name":"uint","nodeType":"ElementaryTypeName","src":"4752:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4751:13:9"},"scope":3112,"src":"4604:853:9","stateMutability":"nonpayable","superFunction":2209,"visibility":"public"},{"body":{"id":2821,"nodeType":"Block","src":"6057:1041:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2735,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2723,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6151:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2724,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6151:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2725,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6163:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2726,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6169:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6106:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2720,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6106:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2721,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"6106:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2727,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2732,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6247:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2733,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6262:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2728,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6207:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6207:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2730,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"6207:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2734,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:73:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6106:174:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2718,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6095:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2736,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6095:186:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2737,"nodeType":"ExpressionStatement","src":"6095:186:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2741,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6320:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2738,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6291:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2740,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"6291:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2742,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6291:47:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2743,"nodeType":"ExpressionStatement","src":"6291:47:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2750,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6442:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2751,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6448:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2747,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6415:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2744,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6387:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2748,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:46:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2749,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7488,"src":"6387:54:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2752,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:79:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2753,"nodeType":"ExpressionStatement","src":"6387:79:9"},{"assignments":[2755],"declarations":[{"constant":false,"id":2755,"name":"profit","nodeType":"VariableDeclaration","scope":2822,"src":"6476:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2754,"name":"uint","nodeType":"ElementaryTypeName","src":"6476:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2762,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2758,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6500:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2759,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6519:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2760,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2713,"src":"6538:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2756,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6490:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":2757,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"6490:9:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) external returns (uint256)"}},"id":2761,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6490:58:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"6476:72:9"},{"expression":{"argumentTypes":null,"id":2767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2763,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"6558:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2766,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2764,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6565:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":2765,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6585:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6565:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6558:33:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2768,"nodeType":"ExpressionStatement","src":"6558:33:9"},{"assignments":[2770],"declarations":[{"constant":false,"id":2770,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2822,"src":"6645:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2769,"name":"uint8","nodeType":"ElementaryTypeName","src":"6645:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2774,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2771,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6666:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2772,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"6666:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2773,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6666:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"6645:52:9"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2785,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6764:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":2786,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6769:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6764:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2800,"nodeType":"IfStatement","src":"6760:123:9","trueBody":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2794,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6852:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2795,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6852:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2796,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6864:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2791,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6840:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2789,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6812:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6812:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2792,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2793,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"6812:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2797,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:70:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2788,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6804:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2798,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6804:79:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2799,"nodeType":"ExpressionStatement","src":"6804:79:9"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2779,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6725:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2780,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2770,"src":"6729:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6725:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2801,"initializationExpression":{"assignments":[2776],"declarations":[{"constant":false,"id":2776,"name":"i","nodeType":"VariableDeclaration","scope":2822,"src":"6712:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2775,"name":"uint8","nodeType":"ElementaryTypeName","src":"6712:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2778,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2777,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6722:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"6712:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"6743:3:9","subExpression":{"argumentTypes":null,"id":2782,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6743:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2784,"nodeType":"ExpressionStatement","src":"6743:3:9"},"nodeType":"ForStatement","src":"6707:176:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2807,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6979:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2808,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6979:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2809,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6991:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2803,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6938:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6938:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"6938:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2810,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:60:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2802,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6930:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2811,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6930:69:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2812,"nodeType":"ExpressionStatement","src":"6930:69:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2814,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"7036:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2815,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7036:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2816,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"7048:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2817,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"7067:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2818,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"7086:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2813,"name":"OutcomeTokenShortSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2139,"src":"7014:21:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256)"}},"id":2819,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7014:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2820,"nodeType":"EmitStatement","src":"7009:82:9"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":2822,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2709,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2822,"src":"5945:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2708,"name":"uint8","nodeType":"ElementaryTypeName","src":"5945:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2711,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2822,"src":"5970:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2710,"name":"uint","nodeType":"ElementaryTypeName","src":"5970:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2713,"name":"minProfit","nodeType":"VariableDeclaration","scope":2822,"src":"5994:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2712,"name":"uint","nodeType":"ElementaryTypeName","src":"5994:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5944:65:9"},"payable":false,"returnParameters":{"id":2717,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2716,"name":"cost","nodeType":"VariableDeclaration","scope":2822,"src":"6042:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2715,"name":"uint","nodeType":"ElementaryTypeName","src":"6042:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6041:11:9"},"scope":3112,"src":"5926:1172:9","stateMutability":"nonpayable","superFunction":2220,"visibility":"public"},{"body":{"id":2874,"nodeType":"Block","src":"8025:386:9","statements":[{"assignments":[2837],"declarations":[{"constant":false,"id":2837,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2875,"src":"8035:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2836,"name":"uint8","nodeType":"ElementaryTypeName","src":"8035:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2841,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2838,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"8056:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2839,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"8056:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2840,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8056:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"8035:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2846,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2843,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8105:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2844,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8105:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2845,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8135:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"8105:42:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2842,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8097:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2847,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8097:51:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2848,"nodeType":"ExpressionStatement","src":"8097:51:9"},{"assignments":[],"declarations":[{"constant":false,"id":2850,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2875,"src":"8159:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2849,"name":"int","nodeType":"ElementaryTypeName","src":"8159:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":2851,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8159:23:9"},{"assignments":[],"declarations":[{"constant":false,"id":2853,"name":"fees","nodeType":"VariableDeclaration","scope":2875,"src":"8192:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2852,"name":"uint","nodeType":"ElementaryTypeName","src":"8192:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2854,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8192:9:9"},{"expression":{"argumentTypes":null,"id":2864,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":2855,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2834,"src":"8212:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2856,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8221:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2857,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8242:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":2858,"isConstant":false,"isInlineArray":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"TupleExpression","src":"8211:36:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2860,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8260:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2861,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8274:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2862,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2827,"src":"8295:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2859,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"8250:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2863,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8250:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"src":"8211:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2865,"nodeType":"ExpressionStatement","src":"8211:100:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2867,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"8345:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2868,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8345:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2869,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8357:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2870,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8378:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2871,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8399:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2866,"name":"OutcomeTokenTrade","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2150,"src":"8327:17:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256[] memory,int256,uint256)"}},"id":2872,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8327:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2873,"nodeType":"EmitStatement","src":"8322:82:9"}]},"documentation":"@dev Allows to trade outcome tokens and collateral with the market maker\n @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.","id":2875,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2830,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"7970:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2831,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7970:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2832,"modifierName":{"argumentTypes":null,"id":2829,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"7962:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"7962:28:9"}],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2828,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2825,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2875,"src":"7891:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2823,"name":"int","nodeType":"ElementaryTypeName","src":"7891:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2824,"length":null,"nodeType":"ArrayTypeName","src":"7891:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2827,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":2875,"src":"7918:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2826,"name":"int","nodeType":"ElementaryTypeName","src":"7918:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7890:48:9"},"payable":false,"returnParameters":{"id":2835,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2834,"name":"netCost","nodeType":"VariableDeclaration","scope":2875,"src":"8008:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2833,"name":"int","nodeType":"ElementaryTypeName","src":"8008:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8007:13:9"},"scope":3112,"src":"7876:535:9","stateMutability":"nonpayable","superFunction":2230,"visibility":"public"},{"body":{"id":3096,"nodeType":"Block","src":"8590:1897:9","statements":[{"expression":{"argumentTypes":null,"id":2897,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2891,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8650:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2894,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"8696:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2895,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"8702:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}],"expression":{"argumentTypes":null,"id":2892,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"8672:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2893,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcNetCost","nodeType":"MemberAccess","referencedDeclaration":1561,"src":"8672:23:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$","typeString":"function (contract Market,int256[] memory) view external returns (int256)"}},"id":2896,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8672:50:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8650:72:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2898,"nodeType":"ExpressionStatement","src":"8650:72:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2901,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2899,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8735:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2900,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8757:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8735:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":2917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2911,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8847:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2914,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8873:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2913,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8868:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2915,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8868:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2912,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8854:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2916,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8854:40:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8847:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2918,"nodeType":"ExpressionStatement","src":"8847:47:9"},"id":2919,"nodeType":"IfStatement","src":"8732:162:9","trueBody":{"expression":{"argumentTypes":null,"id":2909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2902,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8772:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8798:20:9","subExpression":{"argumentTypes":null,"id":2905,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8799:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2904,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8793:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2907,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8793:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2903,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8779:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2908,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8779:41:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8772:48:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2910,"nodeType":"ExpressionStatement","src":"8772:48:9"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2925,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2922,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8917:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2921,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2923,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8913:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2924,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8926:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8913:14:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2920,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8905:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2926,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8905:23:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2927,"nodeType":"ExpressionStatement","src":"8905:23:9"},{"expression":{"argumentTypes":null,"id":2935,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2928,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"8938:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2932,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8976:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2931,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8972:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2933,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8972:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":2929,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8948:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"8948:23:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":2934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8948:34:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8938:44:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2936,"nodeType":"ExpressionStatement","src":"8938:44:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2949,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2944,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2940,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2938,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9015:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2939,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9034:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9015:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2941,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9039:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":2942,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9050:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9039:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9015:50:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":2945,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"9014:52:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2946,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9082:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2947,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9101:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9082:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9014:88:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2937,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8993:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2950,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8993:119:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2951,"nodeType":"ExpressionStatement","src":"8993:119:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2952,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9126:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2953,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9148:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9126:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2988,"nodeType":"IfStatement","src":"9123:340:9","trueBody":{"id":2987,"nodeType":"Block","src":"9151:312:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2960,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9235:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2961,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9235:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2962,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9247:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2964,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9258:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2963,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9253:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2965,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9253:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2956,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9190:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9190:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2958,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2959,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"9190:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2966,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:77:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2971,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9327:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2973,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9347:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2972,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9342:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2974,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9342:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2967,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9287:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9287:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2969,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"9287:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2975,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9190:178:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2955,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9165:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2977,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9165:217:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2978,"nodeType":"ExpressionStatement","src":"9165:217:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2983,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9431:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2982,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9426:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2984,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9426:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2979,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9397:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2981,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"9397:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2985,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9397:55:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2986,"nodeType":"ExpressionStatement","src":"9397:55:9"}]}},{"body":{"id":3061,"nodeType":"Block","src":"9514:494:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2999,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9531:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3001,"indexExpression":{"argumentTypes":null,"id":3000,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9551:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9531:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3002,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9557:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9531:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3060,"nodeType":"IfStatement","src":"9528:470:9","trueBody":{"id":3059,"nodeType":"Block","src":"9560:438:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3008,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3004,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9581:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3006,"indexExpression":{"argumentTypes":null,"id":3005,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9601:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9581:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9606:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9581:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3044,"nodeType":"Block","src":"9757:131:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3034,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9827:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3035,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9827:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3037,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9844:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3039,"indexExpression":{"argumentTypes":null,"id":3038,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9864:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9844:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3036,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9839:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3040,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9839:28:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3031,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9815:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3029,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9787:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3030,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9787:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3032,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3033,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"9787:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3041,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3028,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3042,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9779:90:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3043,"nodeType":"ExpressionStatement","src":"9779:90:9"}]},"id":3045,"nodeType":"IfStatement","src":"9578:310:9","trueBody":{"id":3027,"nodeType":"Block","src":"9609:142:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3015,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9683:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9683:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3017,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9695:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3022,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"9706:23:9","subExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3019,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9707:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3021,"indexExpression":{"argumentTypes":null,"id":3020,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9727:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9707:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3018,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9701:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3023,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3012,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9667:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3010,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9639:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9639:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3013,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3014,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7460,"src":"9639:43:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":3024,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:92:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3009,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9631:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3025,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9631:101:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3026,"nodeType":"ExpressionStatement","src":"9631:101:9"}]}},{"expression":{"argumentTypes":null,"id":3057,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3046,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9906:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3048,"indexExpression":{"argumentTypes":null,"id":3047,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9927:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"9906:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3053,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9960:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3055,"indexExpression":{"argumentTypes":null,"id":3054,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9980:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9960:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3049,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9932:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3051,"indexExpression":{"argumentTypes":null,"id":3050,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9953:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9932:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"9932:27:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":3056,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9932:51:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9906:77:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3058,"nodeType":"ExpressionStatement","src":"9906:77:9"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2993,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9491:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2994,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2877,"src":"9495:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"9491:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3062,"initializationExpression":{"assignments":[2990],"declarations":[{"constant":false,"id":2990,"name":"i","nodeType":"VariableDeclaration","scope":3097,"src":"9478:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2989,"name":"uint8","nodeType":"ElementaryTypeName","src":"9478:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2992,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2991,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9488:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"9478:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2997,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"9509:3:9","subExpression":{"argumentTypes":null,"id":2996,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9509:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2998,"nodeType":"ExpressionStatement","src":"9509:3:9"},"nodeType":"ForStatement","src":"9473:535:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3063,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10021:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10043:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10021:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3095,"nodeType":"IfStatement","src":"10018:463:9","trueBody":{"id":3094,"nodeType":"Block","src":"10046:435:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10309:20:9","subExpression":{"argumentTypes":null,"id":3070,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10310:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3069,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10304:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3072,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10304:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3066,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10274:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sellAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":285,"src":"10274:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":3073,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10274:57:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3074,"nodeType":"ExpressionStatement","src":"10274:57:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3077,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3075,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10348:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3076,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10358:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10348:11:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3093,"nodeType":"IfStatement","src":"10345:126:9","trueBody":{"id":3092,"nodeType":"Block","src":"10361:110:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3083,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"10428:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"10428:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10445:8:9","subExpression":{"argumentTypes":null,"id":3086,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10446:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3085,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10440:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10440:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3079,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3080,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"10387:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":3081,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":3082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"10387:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3089,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:68:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3078,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"10379:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3090,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10379:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3091,"nodeType":"ExpressionStatement","src":"10379:77:9"}]}}]}}]},"documentation":null,"id":3097,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"tradeImpl","nodeType":"FunctionDefinition","parameters":{"id":2883,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2877,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":3097,"src":"8436:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2876,"name":"uint8","nodeType":"ElementaryTypeName","src":"8436:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2880,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3097,"src":"8456:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2878,"name":"int","nodeType":"ElementaryTypeName","src":"8456:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2879,"length":null,"nodeType":"ArrayTypeName","src":"8456:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2882,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3097,"src":"8483:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2881,"name":"int","nodeType":"ElementaryTypeName","src":"8483:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8435:68:9"},"payable":false,"returnParameters":{"id":2890,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2885,"name":"netCost","nodeType":"VariableDeclaration","scope":3097,"src":"8537:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2884,"name":"int","nodeType":"ElementaryTypeName","src":"8537:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2887,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":3097,"src":"8550:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2886,"name":"int","nodeType":"ElementaryTypeName","src":"8550:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2889,"name":"fees","nodeType":"VariableDeclaration","scope":3097,"src":"8575:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2888,"name":"uint","nodeType":"ElementaryTypeName","src":"8575:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8536:49:9"},"scope":3112,"src":"8417:2070:9","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3110,"nodeType":"Block","src":"10742:58:9","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3104,"name":"outcomeTokenCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3099,"src":"10759:16:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":3105,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"10778:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:22:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":3107,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"10784:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:34:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3103,"id":3109,"nodeType":"Return","src":"10752:41:9"}]},"documentation":"@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade","id":3111,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":3100,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3099,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":3111,"src":"10664:21:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3098,"name":"uint","nodeType":"ElementaryTypeName","src":"10664:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10663:23:9"},"payable":false,"returnParameters":{"id":3103,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3102,"name":"","nodeType":"VariableDeclaration","scope":3111,"src":"10732:4:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3101,"name":"uint","nodeType":"ElementaryTypeName","src":"10732:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10731:6:9"},"scope":3112,"src":"10641:159:9","stateMutability":"view","superFunction":2237,"visibility":"public"}],"scope":3113,"src":"1077:9725:9"}],"src":"0:10803:9"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","exportedSymbols":{"StandardMarket":[3112],"StandardMarketData":[2248],"StandardMarketProxy":[2326]},"id":3113,"nodeType":"SourceUnit","nodes":[{"id":2240,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:9"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","file":"../Markets/Market.sol","id":2241,"nodeType":"ImportDirective","scope":3113,"sourceUnit":2239,"src":"25:31:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":2242,"nodeType":"ImportDirective","scope":3113,"sourceUnit":7329,"src":"57:63:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2243,"nodeType":"ImportDirective","scope":3113,"sourceUnit":385,"src":"121:29:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2244,"nodeType":"ImportDirective","scope":3113,"sourceUnit":1572,"src":"151:41:9","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2248,"linearizedBaseContracts":[2248],"name":"StandardMarketData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":2247,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":2248,"src":"262:42:9","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2245,"name":"uint24","nodeType":"ElementaryTypeName","src":"262:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":2246,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"297:7:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"}],"scope":3113,"src":"195:120:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2249,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"349:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":2250,"nodeType":"InheritanceSpecifier","src":"349:5:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2251,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"356:10:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2252,"nodeType":"InheritanceSpecifier","src":"356:10:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2253,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"368:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2254,"nodeType":"InheritanceSpecifier","src":"368:18:9"}],"contractDependencies":[2172,2248,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2326,"linearizedBaseContracts":[2326,2248,2172,6701,6673],"name":"StandardMarketProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":2324,"nodeType":"Block","src":"539:407:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2272,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"592:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":2271,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"584:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2273,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"584:23:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2274,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"611:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"584:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2277,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"624:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":2276,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"616:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2278,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"616:21:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2279,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"641:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"616:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":2284,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2282,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"646:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2283,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"653:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"646:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:78:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2270,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"576:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"576:87:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2287,"nodeType":"ExpressionStatement","src":"576:87:9"},{"expression":{"argumentTypes":null,"id":2290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2288,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"673:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2289,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2258,"src":"683:8:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"673:18:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":2291,"nodeType":"ExpressionStatement","src":"673:18:9"},{"expression":{"argumentTypes":null,"id":2295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2292,"name":"createdAtBlock","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2154,"src":"701:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2293,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"718:5:9","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":2294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"718:12:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2296,"nodeType":"ExpressionStatement","src":"701:29:9"},{"expression":{"argumentTypes":null,"id":2299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2297,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"740:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2298,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"756:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"740:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2300,"nodeType":"ExpressionStatement","src":"740:30:9"},{"expression":{"argumentTypes":null,"id":2309,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2301,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"780:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2305,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"813:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"813:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2307,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"813:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2304,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"803:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2302,"name":"int","nodeType":"ElementaryTypeName","src":"807:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2303,"length":null,"nodeType":"ArrayTypeName","src":"807:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2308,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"803:42:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"src":"780:65:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":2310,"nodeType":"ExpressionStatement","src":"780:65:9"},{"expression":{"argumentTypes":null,"id":2313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2311,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"855:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2312,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"861:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"855:10:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":2314,"nodeType":"ExpressionStatement","src":"855:10:9"},{"expression":{"argumentTypes":null,"id":2317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2315,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"875:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2316,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"889:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"875:26:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2318,"nodeType":"ExpressionStatement","src":"875:26:9"},{"expression":{"argumentTypes":null,"id":2322,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2319,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"911:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2320,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"919:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2321,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"919:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"911:28:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2323,"nodeType":"ExpressionStatement","src":"911:28:9"}]},"documentation":null,"id":2325,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":2267,"name":"proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2256,"src":"513:5:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":2268,"modifierName":{"argumentTypes":null,"id":2266,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"507:5:9","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"507:12:9"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":2265,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2256,"name":"proxy","nodeType":"VariableDeclaration","scope":2325,"src":"405:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2255,"name":"address","nodeType":"ElementaryTypeName","src":"405:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2258,"name":"_creator","nodeType":"VariableDeclaration","scope":2325,"src":"420:16:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2257,"name":"address","nodeType":"ElementaryTypeName","src":"420:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2260,"name":"_eventContract","nodeType":"VariableDeclaration","scope":2325,"src":"438:20:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2259,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"438:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2262,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":2325,"src":"460:24:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2261,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"460:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2264,"name":"_fee","nodeType":"VariableDeclaration","scope":2325,"src":"486:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2263,"name":"uint24","nodeType":"ElementaryTypeName","src":"486:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"404:94:9"},"payable":false,"returnParameters":{"id":2269,"nodeType":"ParameterList","parameters":[],"src":"539:0:9"},"scope":2326,"src":"393:553:9","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3113,"src":"317:631:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2327,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1104:7:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":2328,"nodeType":"InheritanceSpecifier","src":"1104:7:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2329,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"1113:6:9","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":2330,"nodeType":"InheritanceSpecifier","src":"1113:6:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2331,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"1121:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2332,"nodeType":"InheritanceSpecifier","src":"1121:18:9"}],"contractDependencies":[2172,2238,2248,6673],"contractKind":"contract","documentation":"@title Standard market contract - Backed implementation of standard markets\n @author Stefan George - ","fullyImplemented":true,"id":3112,"linearizedBaseContracts":[3112,2248,2238,2172,6673],"name":"StandardMarket","nodeType":"ContractDefinition","nodes":[{"id":2334,"libraryName":{"contractScope":null,"id":2333,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1152:8:9","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1146:21:9","typeName":null},{"body":{"id":2344,"nodeType":"Block","src":"1227:104:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2337,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1291:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2338,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1291:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2339,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"1305:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1291:21:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2336,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1283:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2341,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1283:30:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2342,"nodeType":"ExpressionStatement","src":"1283:30:9"},{"id":2343,"nodeType":"PlaceholderStatement","src":"1323:1:9"}]},"documentation":null,"id":2345,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":2335,"nodeType":"ParameterList","parameters":[],"src":"1224:2:9"},"src":"1206:125:9","visibility":"internal"},{"body":{"id":2356,"nodeType":"Block","src":"1369:97:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"id":2352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2350,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"1432:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2351,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2347,"src":"1441:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"1432:15:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2349,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1424:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2353,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1424:24:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2354,"nodeType":"ExpressionStatement","src":"1424:24:9"},{"id":2355,"nodeType":"PlaceholderStatement","src":"1458:1:9"}]},"documentation":null,"id":2357,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":2348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2347,"name":"_stage","nodeType":"VariableDeclaration","scope":2357,"src":"1354:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2346,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1354:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"internal"}],"src":"1353:15:9"},"src":"1337:129:9","visibility":"internal"},{"body":{"id":2407,"nodeType":"Block","src":"1753:434:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2385,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2373,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1918:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1918:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2375,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"1930:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2376,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"1936:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2369,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1873:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1873:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2371,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1873:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2377,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:72:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2382,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2383,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2020:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2378,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1965:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1965:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2381,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"1965:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2384,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:64:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1873:156:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2368,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1862:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2386,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1862:168:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2387,"nodeType":"ExpressionStatement","src":"1862:168:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2391,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2069:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2388,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2040:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"2040:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2392,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2040:38:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2393,"nodeType":"ExpressionStatement","src":"2040:38:9"},{"expression":{"argumentTypes":null,"id":2396,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2394,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2088:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2395,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2098:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2088:18:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2397,"nodeType":"ExpressionStatement","src":"2088:18:9"},{"expression":{"argumentTypes":null,"id":2401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2398,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2116:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2399,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2124:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2400,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2124:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2116:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2402,"nodeType":"ExpressionStatement","src":"2116:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2404,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2172:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2403,"name":"MarketFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2099,"src":"2158:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2405,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:22:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2406,"nodeType":"EmitStatement","src":"2153:27:9"}]},"documentation":"@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount","id":2408,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2362,"modifierName":{"argumentTypes":null,"id":2361,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"1701:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1701:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2364,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"1727:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2365,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2366,"modifierName":{"argumentTypes":null,"id":2363,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"1719:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"1719:29:9"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2360,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2359,"name":"_funding","nodeType":"VariableDeclaration","scope":2408,"src":"1663:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2358,"name":"uint","nodeType":"ElementaryTypeName","src":"1663:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1662:15:9"},"payable":false,"returnParameters":{"id":2367,"nodeType":"ParameterList","parameters":[],"src":"1753:0:9"},"scope":3112,"src":"1649:538:9","stateMutability":"nonpayable","superFunction":2179,"visibility":"public"},{"body":{"id":2459,"nodeType":"Block","src":"2400:304:9","statements":[{"assignments":[2418],"declarations":[{"constant":false,"id":2418,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2460,"src":"2410:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2417,"name":"uint8","nodeType":"ElementaryTypeName","src":"2410:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2422,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2419,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2431:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2431:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2421,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2431:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"2410:52:9"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2439,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"2573:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2445,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2623:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2442,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2610:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2440,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2582:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2582:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2443,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2444,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2582:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2446,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:46:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2436,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2561:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2434,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2533:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2533:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2437,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"2533:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:96:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2433,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2525:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2448,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2525:105:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2449,"nodeType":"ExpressionStatement","src":"2525:105:9"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2427,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2490:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2428,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2418,"src":"2494:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2490:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2450,"initializationExpression":{"assignments":[2424],"declarations":[{"constant":false,"id":2424,"name":"i","nodeType":"VariableDeclaration","scope":2460,"src":"2477:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2423,"name":"uint8","nodeType":"ElementaryTypeName","src":"2477:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2426,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2425,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2487:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2477:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2508:3:9","subExpression":{"argumentTypes":null,"id":2430,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2508:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2432,"nodeType":"ExpressionStatement","src":"2508:3:9"},"nodeType":"ForStatement","src":"2472:158:9"},{"expression":{"argumentTypes":null,"id":2454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2451,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2640:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2452,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2648:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2453,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2648:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2640:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2455,"nodeType":"ExpressionStatement","src":"2640:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":2456,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2101,"src":"2682:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":2457,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2682:15:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2458,"nodeType":"EmitStatement","src":"2677:20:9"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":2460,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2411,"modifierName":{"argumentTypes":null,"id":2410,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2349:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2349:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2413,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2375:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2414,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2375:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2415,"modifierName":{"argumentTypes":null,"id":2412,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"2367:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"2367:28:9"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2409,"nodeType":"ParameterList","parameters":[],"src":"2323:2:9"},"payable":false,"returnParameters":{"id":2416,"nodeType":"ParameterList","parameters":[],"src":"2400:0:9"},"scope":3112,"src":"2309:395:9","stateMutability":"nonpayable","superFunction":2182,"visibility":"public"},{"body":{"id":2490,"nodeType":"Block","src":"2898:204:9","statements":[{"expression":{"argumentTypes":null,"id":2474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2467,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"2908:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2472,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2957:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2468,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2915:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2469,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"2915:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2470,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2471,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"2915:41:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2908:54:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2475,"nodeType":"ExpressionStatement","src":"2908:54:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2481,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"3046:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2482,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3055:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2477,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2478,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3005:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2479,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2480,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3005:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:55:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2476,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2997:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2997:64:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2485,"nodeType":"ExpressionStatement","src":"2997:64:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2487,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3090:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2486,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2105,"src":"3076:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2488,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3076:19:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2489,"nodeType":"EmitStatement","src":"3071:24:9"}]},"documentation":"@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount","id":2491,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2463,"modifierName":{"argumentTypes":null,"id":2462,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2856:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2856:9:9"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2461,"nodeType":"ParameterList","parameters":[],"src":"2830:2:9"},"payable":false,"returnParameters":{"id":2466,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2465,"name":"fees","nodeType":"VariableDeclaration","scope":2491,"src":"2883:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2464,"name":"uint","nodeType":"ElementaryTypeName","src":"2883:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2882:11:9"},"scope":3112,"src":"2809:293:9","stateMutability":"nonpayable","superFunction":2187,"visibility":"public"},{"body":{"id":2595,"nodeType":"Block","src":"3589:680:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2517,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2508,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3611:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2507,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3607:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2509,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3607:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2510,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3633:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3607:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2516,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2513,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"3642:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2512,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3638:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2514,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3638:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2515,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3653:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3638:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3607:47:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2506,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3599:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2518,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3599:56:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2519,"nodeType":"ExpressionStatement","src":"3599:56:9"},{"assignments":[2521],"declarations":[{"constant":false,"id":2521,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2596,"src":"3665:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2520,"name":"uint8","nodeType":"ElementaryTypeName","src":"3665:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2525,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2522,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3686:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2523,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"3686:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3686:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"3665:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2533,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2527,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3735:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2528,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3756:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3735:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2532,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2530,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3761:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2531,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3781:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"3761:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3735:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2526,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3727:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2534,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3727:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2535,"nodeType":"ExpressionStatement","src":"3727:67:9"},{"assignments":[2539],"declarations":[{"constant":false,"id":2539,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2596,"src":"3804:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2537,"name":"int","nodeType":"ElementaryTypeName","src":"3804:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2538,"length":null,"nodeType":"ArrayTypeName","src":"3804:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2545,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2543,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3849:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2542,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3839:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2540,"name":"int","nodeType":"ElementaryTypeName","src":"3843:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2541,"length":null,"nodeType":"ArrayTypeName","src":"3843:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3839:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"3804:58:9"},{"expression":{"argumentTypes":null,"id":2552,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2546,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"3872:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2548,"indexExpression":{"argumentTypes":null,"id":2547,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3892:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3872:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2550,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3917:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2549,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2551,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3872:63:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2553,"nodeType":"ExpressionStatement","src":"3872:63:9"},{"assignments":[2555,2557,2559],"declarations":[{"constant":false,"id":2555,"name":"netCost","nodeType":"VariableDeclaration","scope":2596,"src":"3946:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2554,"name":"int","nodeType":"ElementaryTypeName","src":"3946:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2557,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2596,"src":"3959:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2556,"name":"int","nodeType":"ElementaryTypeName","src":"3959:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2559,"name":"fees","nodeType":"VariableDeclaration","scope":2596,"src":"3984:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2558,"name":"uint","nodeType":"ElementaryTypeName","src":"3984:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2567,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2561,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"4007:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2562,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"4021:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2564,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"4046:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2563,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4042:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2565,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4042:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2560,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"3997:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2566,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3997:58:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"3945:110:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2575,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2569,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4073:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4084:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4073:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2572,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4089:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2573,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4112:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4089:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4073:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2568,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4065:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2576,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4065:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2577,"nodeType":"ExpressionStatement","src":"4065:49:9"},{"expression":{"argumentTypes":null,"id":2582,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2578,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2504,"src":"4124:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2580,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4136:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4131:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2581,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4131:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4124:20:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2583,"nodeType":"ExpressionStatement","src":"4124:20:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2585,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4180:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4180:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2587,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"4192:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2588,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"4211:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2590,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4235:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2589,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4230:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2591,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4230:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2592,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2559,"src":"4257:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2584,"name":"OutcomeTokenPurchase","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2117,"src":"4159:20:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4159:103:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2594,"nodeType":"EmitStatement","src":"4154:108:9"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":2596,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2500,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"3536:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2501,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3536:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2502,"modifierName":{"argumentTypes":null,"id":2499,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"3528:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"3528:28:9"}],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2498,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2493,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2596,"src":"3442:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2492,"name":"uint8","nodeType":"ElementaryTypeName","src":"3442:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2495,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2596,"src":"3467:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2494,"name":"uint","nodeType":"ElementaryTypeName","src":"3467:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2497,"name":"maxCost","nodeType":"VariableDeclaration","scope":2596,"src":"3491:12:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2496,"name":"uint","nodeType":"ElementaryTypeName","src":"3491:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3441:63:9"},"payable":false,"returnParameters":{"id":2505,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2504,"name":"cost","nodeType":"VariableDeclaration","scope":2596,"src":"3574:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2503,"name":"uint","nodeType":"ElementaryTypeName","src":"3574:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3573:11:9"},"scope":3112,"src":"3429:840:9","stateMutability":"nonpayable","superFunction":2198,"visibility":"public"},{"body":{"id":2706,"nodeType":"Block","src":"4769:688:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2624,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2617,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4787:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2613,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"4792:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2612,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4788:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2614,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4788:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2616,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4814:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4787:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2623,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2621,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4819:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2619,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"4824:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2618,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2620,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2622,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4837:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4819:19:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4787:51:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2611,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2625,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4779:60:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2626,"nodeType":"ExpressionStatement","src":"4779:60:9"},{"assignments":[2628],"declarations":[{"constant":false,"id":2628,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2707,"src":"4849:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2627,"name":"uint8","nodeType":"ElementaryTypeName","src":"4849:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2632,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2629,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"4870:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"4870:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"4849:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2634,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4919:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2635,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4940:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4919:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2637,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4945:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2638,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"4965:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"4945:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4919:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4911:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2641,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4911:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2642,"nodeType":"ExpressionStatement","src":"4911:67:9"},{"assignments":[2646],"declarations":[{"constant":false,"id":2646,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2707,"src":"4988:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2644,"name":"int","nodeType":"ElementaryTypeName","src":"4988:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2645,"length":null,"nodeType":"ArrayTypeName","src":"4988:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2652,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2650,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5033:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2649,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"5023:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2647,"name":"int","nodeType":"ElementaryTypeName","src":"5027:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2648,"length":null,"nodeType":"ArrayTypeName","src":"5027:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2651,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5023:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"4988:58:9"},{"expression":{"argumentTypes":null,"id":2660,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2653,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5056:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2655,"indexExpression":{"argumentTypes":null,"id":2654,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5076:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5056:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2659,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5097:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2657,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5102:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5098:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5098:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5056:64:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2661,"nodeType":"ExpressionStatement","src":"5056:64:9"},{"assignments":[2663,2665,2667],"declarations":[{"constant":false,"id":2663,"name":"netCost","nodeType":"VariableDeclaration","scope":2707,"src":"5131:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2662,"name":"int","nodeType":"ElementaryTypeName","src":"5131:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2665,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2707,"src":"5144:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2664,"name":"int","nodeType":"ElementaryTypeName","src":"5144:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2667,"name":"fees","nodeType":"VariableDeclaration","scope":2707,"src":"5169:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2666,"name":"uint","nodeType":"ElementaryTypeName","src":"5169:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2676,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2669,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5192:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2670,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5206:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2674,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5227:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2672,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"5232:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2671,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5228:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2673,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5228:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2668,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"5182:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2675,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5182:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"5130:113:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2684,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2680,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2678,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5261:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2679,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5272:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5261:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2681,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5277:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5300:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5277:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5261:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2677,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5253:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2685,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5253:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2686,"nodeType":"ExpressionStatement","src":"5253:49:9"},{"expression":{"argumentTypes":null,"id":2692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2687,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2609,"src":"5312:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2690,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5326:8:9","subExpression":{"argumentTypes":null,"id":2689,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5327:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5321:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2691,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5321:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5312:23:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2693,"nodeType":"ExpressionStatement","src":"5312:23:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2695,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5367:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2696,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5367:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2697,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5379:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2698,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5398:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2701,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5422:20:9","subExpression":{"argumentTypes":null,"id":2700,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5423:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5417:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2702,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5417:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2703,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2667,"src":"5445:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2694,"name":"OutcomeTokenSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2129,"src":"5350:16:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2704,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5350:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2705,"nodeType":"EmitStatement","src":"5345:105:9"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":2707,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2605,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"4714:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2606,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4714:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2607,"modifierName":{"argumentTypes":null,"id":2604,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"4706:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"4706:28:9"}],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2603,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2598,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2707,"src":"4618:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2597,"name":"uint8","nodeType":"ElementaryTypeName","src":"4618:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2600,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2707,"src":"4643:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2599,"name":"uint","nodeType":"ElementaryTypeName","src":"4643:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2602,"name":"minProfit","nodeType":"VariableDeclaration","scope":2707,"src":"4667:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2601,"name":"uint","nodeType":"ElementaryTypeName","src":"4667:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4617:65:9"},"payable":false,"returnParameters":{"id":2610,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2609,"name":"profit","nodeType":"VariableDeclaration","scope":2707,"src":"4752:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2608,"name":"uint","nodeType":"ElementaryTypeName","src":"4752:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4751:13:9"},"scope":3112,"src":"4604:853:9","stateMutability":"nonpayable","superFunction":2209,"visibility":"public"},{"body":{"id":2821,"nodeType":"Block","src":"6057:1041:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2735,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2723,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6151:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2724,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6151:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2725,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6163:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2726,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6169:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6106:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2720,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6106:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2721,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"6106:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2727,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2732,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6247:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2733,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6262:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2728,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6207:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6207:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2730,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"6207:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2734,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:73:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6106:174:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2718,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6095:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2736,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6095:186:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2737,"nodeType":"ExpressionStatement","src":"6095:186:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2741,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6320:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2738,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6291:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2740,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"6291:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2742,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6291:47:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2743,"nodeType":"ExpressionStatement","src":"6291:47:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2750,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6442:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2751,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6448:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2747,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6415:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2744,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6387:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2748,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:46:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2749,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7488,"src":"6387:54:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2752,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:79:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2753,"nodeType":"ExpressionStatement","src":"6387:79:9"},{"assignments":[2755],"declarations":[{"constant":false,"id":2755,"name":"profit","nodeType":"VariableDeclaration","scope":2822,"src":"6476:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2754,"name":"uint","nodeType":"ElementaryTypeName","src":"6476:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2762,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2758,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6500:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2759,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6519:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2760,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2713,"src":"6538:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2756,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6490:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":2757,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"6490:9:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) external returns (uint256)"}},"id":2761,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6490:58:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"6476:72:9"},{"expression":{"argumentTypes":null,"id":2767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2763,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"6558:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2766,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2764,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6565:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":2765,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6585:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6565:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6558:33:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2768,"nodeType":"ExpressionStatement","src":"6558:33:9"},{"assignments":[2770],"declarations":[{"constant":false,"id":2770,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2822,"src":"6645:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2769,"name":"uint8","nodeType":"ElementaryTypeName","src":"6645:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2774,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2771,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6666:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2772,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"6666:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2773,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6666:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"6645:52:9"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2785,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6764:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":2786,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6769:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6764:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2800,"nodeType":"IfStatement","src":"6760:123:9","trueBody":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2794,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6852:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2795,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6852:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2796,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6864:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2791,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6840:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2789,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6812:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6812:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2792,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2793,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"6812:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2797,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:70:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2788,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6804:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2798,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6804:79:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2799,"nodeType":"ExpressionStatement","src":"6804:79:9"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2779,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6725:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2780,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2770,"src":"6729:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6725:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2801,"initializationExpression":{"assignments":[2776],"declarations":[{"constant":false,"id":2776,"name":"i","nodeType":"VariableDeclaration","scope":2822,"src":"6712:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2775,"name":"uint8","nodeType":"ElementaryTypeName","src":"6712:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2778,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2777,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6722:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"6712:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"6743:3:9","subExpression":{"argumentTypes":null,"id":2782,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6743:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2784,"nodeType":"ExpressionStatement","src":"6743:3:9"},"nodeType":"ForStatement","src":"6707:176:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2807,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6979:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2808,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6979:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2809,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6991:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2803,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6938:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6938:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"6938:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2810,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:60:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2802,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6930:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2811,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6930:69:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2812,"nodeType":"ExpressionStatement","src":"6930:69:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2814,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"7036:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2815,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7036:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2816,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"7048:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2817,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"7067:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2818,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"7086:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2813,"name":"OutcomeTokenShortSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2139,"src":"7014:21:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256)"}},"id":2819,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7014:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2820,"nodeType":"EmitStatement","src":"7009:82:9"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":2822,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2709,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2822,"src":"5945:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2708,"name":"uint8","nodeType":"ElementaryTypeName","src":"5945:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2711,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2822,"src":"5970:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2710,"name":"uint","nodeType":"ElementaryTypeName","src":"5970:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2713,"name":"minProfit","nodeType":"VariableDeclaration","scope":2822,"src":"5994:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2712,"name":"uint","nodeType":"ElementaryTypeName","src":"5994:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5944:65:9"},"payable":false,"returnParameters":{"id":2717,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2716,"name":"cost","nodeType":"VariableDeclaration","scope":2822,"src":"6042:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2715,"name":"uint","nodeType":"ElementaryTypeName","src":"6042:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6041:11:9"},"scope":3112,"src":"5926:1172:9","stateMutability":"nonpayable","superFunction":2220,"visibility":"public"},{"body":{"id":2874,"nodeType":"Block","src":"8025:386:9","statements":[{"assignments":[2837],"declarations":[{"constant":false,"id":2837,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2875,"src":"8035:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2836,"name":"uint8","nodeType":"ElementaryTypeName","src":"8035:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2841,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2838,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"8056:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2839,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"8056:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2840,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8056:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"8035:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2846,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2843,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8105:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2844,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8105:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2845,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8135:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"8105:42:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2842,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8097:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2847,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8097:51:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2848,"nodeType":"ExpressionStatement","src":"8097:51:9"},{"assignments":[],"declarations":[{"constant":false,"id":2850,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2875,"src":"8159:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2849,"name":"int","nodeType":"ElementaryTypeName","src":"8159:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":2851,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8159:23:9"},{"assignments":[],"declarations":[{"constant":false,"id":2853,"name":"fees","nodeType":"VariableDeclaration","scope":2875,"src":"8192:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2852,"name":"uint","nodeType":"ElementaryTypeName","src":"8192:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2854,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8192:9:9"},{"expression":{"argumentTypes":null,"id":2864,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":2855,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2834,"src":"8212:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2856,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8221:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2857,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8242:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":2858,"isConstant":false,"isInlineArray":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"TupleExpression","src":"8211:36:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2860,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8260:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2861,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8274:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2862,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2827,"src":"8295:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2859,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"8250:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2863,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8250:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"src":"8211:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2865,"nodeType":"ExpressionStatement","src":"8211:100:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2867,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"8345:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2868,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8345:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2869,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8357:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2870,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8378:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2871,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8399:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2866,"name":"OutcomeTokenTrade","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2150,"src":"8327:17:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256[] memory,int256,uint256)"}},"id":2872,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8327:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2873,"nodeType":"EmitStatement","src":"8322:82:9"}]},"documentation":"@dev Allows to trade outcome tokens and collateral with the market maker\n @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.","id":2875,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2830,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"7970:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2831,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7970:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2832,"modifierName":{"argumentTypes":null,"id":2829,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"7962:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"7962:28:9"}],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2828,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2825,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2875,"src":"7891:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2823,"name":"int","nodeType":"ElementaryTypeName","src":"7891:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2824,"length":null,"nodeType":"ArrayTypeName","src":"7891:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2827,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":2875,"src":"7918:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2826,"name":"int","nodeType":"ElementaryTypeName","src":"7918:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7890:48:9"},"payable":false,"returnParameters":{"id":2835,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2834,"name":"netCost","nodeType":"VariableDeclaration","scope":2875,"src":"8008:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2833,"name":"int","nodeType":"ElementaryTypeName","src":"8008:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8007:13:9"},"scope":3112,"src":"7876:535:9","stateMutability":"nonpayable","superFunction":2230,"visibility":"public"},{"body":{"id":3096,"nodeType":"Block","src":"8590:1897:9","statements":[{"expression":{"argumentTypes":null,"id":2897,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2891,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8650:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2894,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"8696:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2895,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"8702:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}],"expression":{"argumentTypes":null,"id":2892,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"8672:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2893,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcNetCost","nodeType":"MemberAccess","referencedDeclaration":1561,"src":"8672:23:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$","typeString":"function (contract Market,int256[] memory) view external returns (int256)"}},"id":2896,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8672:50:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8650:72:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2898,"nodeType":"ExpressionStatement","src":"8650:72:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2901,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2899,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8735:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2900,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8757:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8735:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":2917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2911,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8847:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2914,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8873:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2913,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8868:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2915,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8868:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2912,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8854:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2916,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8854:40:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8847:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2918,"nodeType":"ExpressionStatement","src":"8847:47:9"},"id":2919,"nodeType":"IfStatement","src":"8732:162:9","trueBody":{"expression":{"argumentTypes":null,"id":2909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2902,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8772:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8798:20:9","subExpression":{"argumentTypes":null,"id":2905,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8799:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2904,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8793:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2907,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8793:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2903,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8779:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2908,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8779:41:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8772:48:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2910,"nodeType":"ExpressionStatement","src":"8772:48:9"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2925,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2922,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8917:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2921,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2923,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8913:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2924,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8926:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8913:14:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2920,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8905:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2926,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8905:23:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2927,"nodeType":"ExpressionStatement","src":"8905:23:9"},{"expression":{"argumentTypes":null,"id":2935,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2928,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"8938:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2932,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8976:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2931,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8972:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2933,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8972:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":2929,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8948:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"8948:23:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":2934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8948:34:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8938:44:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2936,"nodeType":"ExpressionStatement","src":"8938:44:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2949,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2944,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2940,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2938,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9015:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2939,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9034:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9015:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2941,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9039:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":2942,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9050:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9039:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9015:50:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":2945,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"9014:52:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2946,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9082:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2947,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9101:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9082:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9014:88:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2937,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8993:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2950,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8993:119:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2951,"nodeType":"ExpressionStatement","src":"8993:119:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2952,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9126:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2953,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9148:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9126:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2988,"nodeType":"IfStatement","src":"9123:340:9","trueBody":{"id":2987,"nodeType":"Block","src":"9151:312:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2960,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9235:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2961,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9235:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2962,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9247:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2964,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9258:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2963,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9253:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2965,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9253:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2956,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9190:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9190:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2958,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2959,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"9190:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2966,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:77:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2971,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9327:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2973,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9347:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2972,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9342:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2974,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9342:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2967,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9287:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9287:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2969,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"9287:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2975,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9190:178:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2955,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9165:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2977,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9165:217:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2978,"nodeType":"ExpressionStatement","src":"9165:217:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2983,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9431:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2982,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9426:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2984,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9426:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2979,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9397:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2981,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"9397:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2985,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9397:55:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2986,"nodeType":"ExpressionStatement","src":"9397:55:9"}]}},{"body":{"id":3061,"nodeType":"Block","src":"9514:494:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2999,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9531:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3001,"indexExpression":{"argumentTypes":null,"id":3000,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9551:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9531:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3002,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9557:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9531:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3060,"nodeType":"IfStatement","src":"9528:470:9","trueBody":{"id":3059,"nodeType":"Block","src":"9560:438:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3008,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3004,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9581:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3006,"indexExpression":{"argumentTypes":null,"id":3005,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9601:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9581:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9606:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9581:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3044,"nodeType":"Block","src":"9757:131:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3034,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9827:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3035,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9827:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3037,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9844:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3039,"indexExpression":{"argumentTypes":null,"id":3038,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9864:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9844:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3036,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9839:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3040,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9839:28:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3031,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9815:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3029,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9787:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3030,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9787:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3032,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3033,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"9787:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3041,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3028,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3042,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9779:90:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3043,"nodeType":"ExpressionStatement","src":"9779:90:9"}]},"id":3045,"nodeType":"IfStatement","src":"9578:310:9","trueBody":{"id":3027,"nodeType":"Block","src":"9609:142:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3015,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9683:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9683:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3017,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9695:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3022,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"9706:23:9","subExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3019,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9707:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3021,"indexExpression":{"argumentTypes":null,"id":3020,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9727:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9707:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3018,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9701:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3023,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3012,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9667:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3010,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9639:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9639:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3013,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3014,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7460,"src":"9639:43:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":3024,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:92:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3009,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9631:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3025,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9631:101:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3026,"nodeType":"ExpressionStatement","src":"9631:101:9"}]}},{"expression":{"argumentTypes":null,"id":3057,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3046,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9906:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3048,"indexExpression":{"argumentTypes":null,"id":3047,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9927:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"9906:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3053,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9960:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3055,"indexExpression":{"argumentTypes":null,"id":3054,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9980:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9960:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3049,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9932:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3051,"indexExpression":{"argumentTypes":null,"id":3050,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9953:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9932:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"9932:27:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":3056,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9932:51:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9906:77:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3058,"nodeType":"ExpressionStatement","src":"9906:77:9"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2993,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9491:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2994,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2877,"src":"9495:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"9491:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3062,"initializationExpression":{"assignments":[2990],"declarations":[{"constant":false,"id":2990,"name":"i","nodeType":"VariableDeclaration","scope":3097,"src":"9478:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2989,"name":"uint8","nodeType":"ElementaryTypeName","src":"9478:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2992,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2991,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9488:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"9478:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2997,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"9509:3:9","subExpression":{"argumentTypes":null,"id":2996,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9509:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2998,"nodeType":"ExpressionStatement","src":"9509:3:9"},"nodeType":"ForStatement","src":"9473:535:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3063,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10021:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10043:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10021:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3095,"nodeType":"IfStatement","src":"10018:463:9","trueBody":{"id":3094,"nodeType":"Block","src":"10046:435:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10309:20:9","subExpression":{"argumentTypes":null,"id":3070,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10310:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3069,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10304:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3072,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10304:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3066,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10274:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sellAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":285,"src":"10274:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":3073,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10274:57:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3074,"nodeType":"ExpressionStatement","src":"10274:57:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3077,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3075,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10348:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3076,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10358:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10348:11:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3093,"nodeType":"IfStatement","src":"10345:126:9","trueBody":{"id":3092,"nodeType":"Block","src":"10361:110:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3083,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"10428:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"10428:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10445:8:9","subExpression":{"argumentTypes":null,"id":3086,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10446:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3085,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10440:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10440:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3079,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3080,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"10387:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":3081,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":3082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"10387:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3089,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:68:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3078,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"10379:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3090,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10379:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3091,"nodeType":"ExpressionStatement","src":"10379:77:9"}]}}]}}]},"documentation":null,"id":3097,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"tradeImpl","nodeType":"FunctionDefinition","parameters":{"id":2883,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2877,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":3097,"src":"8436:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2876,"name":"uint8","nodeType":"ElementaryTypeName","src":"8436:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2880,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3097,"src":"8456:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2878,"name":"int","nodeType":"ElementaryTypeName","src":"8456:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2879,"length":null,"nodeType":"ArrayTypeName","src":"8456:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2882,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3097,"src":"8483:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2881,"name":"int","nodeType":"ElementaryTypeName","src":"8483:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8435:68:9"},"payable":false,"returnParameters":{"id":2890,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2885,"name":"netCost","nodeType":"VariableDeclaration","scope":3097,"src":"8537:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2884,"name":"int","nodeType":"ElementaryTypeName","src":"8537:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2887,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":3097,"src":"8550:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2886,"name":"int","nodeType":"ElementaryTypeName","src":"8550:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2889,"name":"fees","nodeType":"VariableDeclaration","scope":3097,"src":"8575:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2888,"name":"uint","nodeType":"ElementaryTypeName","src":"8575:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8536:49:9"},"scope":3112,"src":"8417:2070:9","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3110,"nodeType":"Block","src":"10742:58:9","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3104,"name":"outcomeTokenCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3099,"src":"10759:16:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":3105,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"10778:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:22:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":3107,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"10784:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:34:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3103,"id":3109,"nodeType":"Return","src":"10752:41:9"}]},"documentation":"@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade","id":3111,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":3100,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3099,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":3111,"src":"10664:21:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3098,"name":"uint","nodeType":"ElementaryTypeName","src":"10664:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10663:23:9"},"payable":false,"returnParameters":{"id":3103,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3102,"name":"","nodeType":"VariableDeclaration","scope":3111,"src":"10732:4:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3101,"name":"uint","nodeType":"ElementaryTypeName","src":"10732:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10731:6:9"},"scope":3112,"src":"10641:159:9","stateMutability":"view","superFunction":2237,"visibility":"public"}],"scope":3113,"src":"1077:9725:9"}],"src":"0:10803:9"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0xa3681c65b5043a8799966a5b3ce87d0968191f73","transactionHash":"0x4c00f17b52f12566cabda223211b7a81a877cf5106dcf53b0dca2719174a2b67"},"3":{"address":"0x53a41810936a2a65e38b20050d747ce72404d16d","transactionHash":"0x9428516b2ae8501e0d89ec41597ea6ccd6844bba88653e51ff7ace2266907890"},"4":{"address":"0xcc578b4ebedd2cf0b6d057dfd921e0c7d9452b18","transactionHash":"0x2f9a66f2e69e08b5e68f3eae9e04bda84de9dc735c239175261f4d8bbc8be6d4"},"42":{"address":"0xb14af7a6e9159cdbdcdb836fdde7df9ad5a480ff","transactionHash":"0x6a37b80b121a69f0a5be488940f91bb5bd88b82f14346fcfcb8fc92a3b3c2a8a"},"437894314312":{"address":"0x2612af3a521c2df9eaf28422ca335b04adf3ac66","transactionHash":"0x89fe250ccc456b319b2b02c46214847071afa691fddc84fdc737233b3d95e3b3"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:48.289Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketData.json": +/*!**************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketData.json ***! + \**************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"StandardMarketData","abi":[{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5060a98061001f6000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063fbde47f6146044575b600080fd5b348015604f57600080fd5b5060566076565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b620f4240815600a165627a7a72305820c00e7743691a5d1e129cc5972002e8db6564acce54f7367e8cd53efefedc78b50029","deployedBytecode":"0x608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063fbde47f6146044575b600080fd5b348015604f57600080fd5b5060566076565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b620f4240815600a165627a7a72305820c00e7743691a5d1e129cc5972002e8db6564acce54f7367e8cd53efefedc78b50029","sourceMap":"195:120:9:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;195:120:9;;;;;;;","deployedSourceMap":"195:120:9:-;;;;;;;;;;;;;;;;;;;;;;;;262:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:42:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;297:7;262:42;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/Market.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"../Events/Event.sol\";\nimport \"../MarketMakers/MarketMaker.sol\";\n\n\ncontract StandardMarketData {\n /*\n * Constants\n */\n uint24 public constant FEE_RANGE = 1000000; // 100%\n}\n\ncontract StandardMarketProxy is Proxy, MarketData, StandardMarketData {\n constructor(address proxy, address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee)\n Proxy(proxy)\n public\n {\n // Validate inputs\n require(address(_eventContract) != 0 && address(_marketMaker) != 0 && _fee < FEE_RANGE);\n creator = _creator;\n createdAtBlock = block.number;\n eventContract = _eventContract;\n netOutcomeTokensSold = new int[](eventContract.getOutcomeCount());\n fee = _fee;\n marketMaker = _marketMaker;\n stage = Stages.MarketCreated;\n }\n}\n\n/// @title Standard market contract - Backed implementation of standard markets\n/// @author Stefan George - \ncontract StandardMarket is Proxied, Market, StandardMarketData {\n using SafeMath for *;\n\n /*\n * Modifiers\n */\n modifier isCreator() {\n // Only creator is allowed to proceed\n require(msg.sender == creator);\n _;\n }\n\n modifier atStage(Stages _stage) {\n // Contract has to be in given stage\n require(stage == _stage);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Allows to fund the market with collateral tokens converting them into outcome tokens\n /// @param _funding Funding amount\n function fund(uint _funding)\n public\n isCreator\n atStage(Stages.MarketCreated)\n {\n // Request collateral tokens and allow event contract to transfer them to buy all outcomes\n require( eventContract.collateralToken().transferFrom(msg.sender, this, _funding)\n && eventContract.collateralToken().approve(eventContract, _funding));\n eventContract.buyAllOutcomes(_funding);\n funding = _funding;\n stage = Stages.MarketFunded;\n emit MarketFunding(funding);\n }\n\n /// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator\n function close()\n public\n isCreator\n atStage(Stages.MarketFunded)\n {\n uint8 outcomeCount = eventContract.getOutcomeCount();\n for (uint8 i = 0; i < outcomeCount; i++)\n require(eventContract.outcomeTokens(i).transfer(creator, eventContract.outcomeTokens(i).balanceOf(this)));\n stage = Stages.MarketClosed;\n emit MarketClosing();\n }\n\n /// @dev Allows market creator to withdraw fees generated by trades\n /// @return Fee amount\n function withdrawFees()\n public\n isCreator\n returns (uint fees)\n {\n fees = eventContract.collateralToken().balanceOf(this);\n // Transfer fees\n require(eventContract.collateralToken().transfer(creator, fees));\n emit FeeWithdrawal(fees);\n }\n\n /// @dev Allows to buy outcome tokens from market maker\n /// @param outcomeTokenIndex Index of the outcome token to buy\n /// @param outcomeTokenCount Amount of outcome tokens to buy\n /// @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n /// @return Cost in collateral tokens\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost)\n public\n atStage(Stages.MarketFunded)\n returns (uint cost)\n {\n require(int(outcomeTokenCount) >= 0 && int(maxCost) > 0);\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenIndex >= 0 && outcomeTokenIndex < outcomeCount);\n int[] memory outcomeTokenAmounts = new int[](outcomeCount);\n outcomeTokenAmounts[outcomeTokenIndex] = int(outcomeTokenCount);\n (int netCost, int outcomeTokenNetCost, uint fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, int(maxCost));\n require(netCost >= 0 && outcomeTokenNetCost >= 0);\n cost = uint(netCost);\n emit OutcomeTokenPurchase(msg.sender, outcomeTokenIndex, outcomeTokenCount, uint(outcomeTokenNetCost), fees);\n }\n\n /// @dev Allows to sell outcome tokens to market maker\n /// @param outcomeTokenIndex Index of the outcome token to sell\n /// @param outcomeTokenCount Amount of outcome tokens to sell\n /// @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n /// @return Profit in collateral tokens\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n atStage(Stages.MarketFunded)\n returns (uint profit)\n {\n require(-int(outcomeTokenCount) <= 0 && -int(minProfit) < 0);\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenIndex >= 0 && outcomeTokenIndex < outcomeCount);\n int[] memory outcomeTokenAmounts = new int[](outcomeCount);\n outcomeTokenAmounts[outcomeTokenIndex] = -int(outcomeTokenCount);\n (int netCost, int outcomeTokenNetCost, uint fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, -int(minProfit));\n require(netCost <= 0 && outcomeTokenNetCost <= 0);\n profit = uint(-netCost);\n emit OutcomeTokenSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, uint(-outcomeTokenNetCost), fees);\n }\n\n /// @dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n /// shares of all other outcome tokens.\n /// @param outcomeTokenIndex Index of the outcome token to short sell\n /// @param outcomeTokenCount Amount of outcome tokens to short sell\n /// @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n /// @return Cost to short sell outcome in collateral tokens\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint cost)\n {\n // Buy all outcomes\n require( eventContract.collateralToken().transferFrom(msg.sender, this, outcomeTokenCount)\n && eventContract.collateralToken().approve(eventContract, outcomeTokenCount));\n eventContract.buyAllOutcomes(outcomeTokenCount);\n // Short sell selected outcome\n eventContract.outcomeTokens(outcomeTokenIndex).approve(this, outcomeTokenCount);\n uint profit = this.sell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n cost = outcomeTokenCount - profit;\n // Transfer outcome tokens to buyer\n uint8 outcomeCount = eventContract.getOutcomeCount();\n for (uint8 i = 0; i < outcomeCount; i++)\n if (i != outcomeTokenIndex)\n require(eventContract.outcomeTokens(i).transfer(msg.sender, outcomeTokenCount));\n // Send change back to buyer\n require(eventContract.collateralToken().transfer(msg.sender, profit));\n emit OutcomeTokenShortSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);\n }\n\n /// @dev Allows to trade outcome tokens and collateral with the market maker\n /// @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n /// @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n /// @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.\n function trade(int[] outcomeTokenAmounts, int collateralLimit)\n public\n atStage(Stages.MarketFunded)\n returns (int netCost)\n {\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenAmounts.length == outcomeCount);\n\n int outcomeTokenNetCost;\n uint fees;\n (netCost, outcomeTokenNetCost, fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, collateralLimit);\n\n emit OutcomeTokenTrade(msg.sender, outcomeTokenAmounts, outcomeTokenNetCost, fees);\n }\n\n function tradeImpl(uint8 outcomeCount, int[] outcomeTokenAmounts, int collateralLimit)\n private\n returns (int netCost, int outcomeTokenNetCost, uint fees)\n {\n // Calculate net cost for executing trade\n outcomeTokenNetCost = marketMaker.calcNetCost(this, outcomeTokenAmounts);\n if(outcomeTokenNetCost < 0)\n fees = calcMarketFee(uint(-outcomeTokenNetCost));\n else\n fees = calcMarketFee(uint(outcomeTokenNetCost));\n\n require(int(fees) >= 0);\n netCost = outcomeTokenNetCost.add(int(fees));\n\n require(\n (collateralLimit != 0 && netCost <= collateralLimit) ||\n collateralLimit == 0\n );\n\n if(outcomeTokenNetCost > 0) {\n require(\n eventContract.collateralToken().transferFrom(msg.sender, this, uint(netCost)) &&\n eventContract.collateralToken().approve(eventContract, uint(outcomeTokenNetCost))\n );\n\n eventContract.buyAllOutcomes(uint(outcomeTokenNetCost));\n }\n\n for (uint8 i = 0; i < outcomeCount; i++) {\n if(outcomeTokenAmounts[i] != 0) {\n if(outcomeTokenAmounts[i] < 0) {\n require(eventContract.outcomeTokens(i).transferFrom(msg.sender, this, uint(-outcomeTokenAmounts[i])));\n } else {\n require(eventContract.outcomeTokens(i).transfer(msg.sender, uint(outcomeTokenAmounts[i])));\n }\n\n netOutcomeTokensSold[i] = netOutcomeTokensSold[i].add(outcomeTokenAmounts[i]);\n }\n }\n\n if(outcomeTokenNetCost < 0) {\n // This is safe since\n // 0x8000000000000000000000000000000000000000000000000000000000000000 ==\n // uint(-int(-0x8000000000000000000000000000000000000000000000000000000000000000))\n eventContract.sellAllOutcomes(uint(-outcomeTokenNetCost));\n if(netCost < 0) {\n require(eventContract.collateralToken().transfer(msg.sender, uint(-netCost)));\n }\n }\n }\n\n /// @dev Calculates fee to be paid to market maker\n /// @param outcomeTokenCost Cost for buying outcome tokens\n /// @return Fee for trade\n function calcMarketFee(uint outcomeTokenCost)\n public\n view\n returns (uint)\n {\n return outcomeTokenCost * fee / FEE_RANGE;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","exportedSymbols":{"StandardMarket":[3112],"StandardMarketData":[2248],"StandardMarketProxy":[2326]},"id":3113,"nodeType":"SourceUnit","nodes":[{"id":2240,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:9"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","file":"../Markets/Market.sol","id":2241,"nodeType":"ImportDirective","scope":3113,"sourceUnit":2239,"src":"25:31:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":2242,"nodeType":"ImportDirective","scope":3113,"sourceUnit":7329,"src":"57:63:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2243,"nodeType":"ImportDirective","scope":3113,"sourceUnit":385,"src":"121:29:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2244,"nodeType":"ImportDirective","scope":3113,"sourceUnit":1572,"src":"151:41:9","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2248,"linearizedBaseContracts":[2248],"name":"StandardMarketData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":2247,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":2248,"src":"262:42:9","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2245,"name":"uint24","nodeType":"ElementaryTypeName","src":"262:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":2246,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"297:7:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"}],"scope":3113,"src":"195:120:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2249,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"349:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":2250,"nodeType":"InheritanceSpecifier","src":"349:5:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2251,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"356:10:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2252,"nodeType":"InheritanceSpecifier","src":"356:10:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2253,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"368:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2254,"nodeType":"InheritanceSpecifier","src":"368:18:9"}],"contractDependencies":[2172,2248,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2326,"linearizedBaseContracts":[2326,2248,2172,6701,6673],"name":"StandardMarketProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":2324,"nodeType":"Block","src":"539:407:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2272,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"592:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":2271,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"584:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2273,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"584:23:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2274,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"611:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"584:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2277,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"624:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":2276,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"616:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2278,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"616:21:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2279,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"641:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"616:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":2284,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2282,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"646:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2283,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"653:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"646:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:78:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2270,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"576:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"576:87:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2287,"nodeType":"ExpressionStatement","src":"576:87:9"},{"expression":{"argumentTypes":null,"id":2290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2288,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"673:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2289,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2258,"src":"683:8:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"673:18:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":2291,"nodeType":"ExpressionStatement","src":"673:18:9"},{"expression":{"argumentTypes":null,"id":2295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2292,"name":"createdAtBlock","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2154,"src":"701:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2293,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"718:5:9","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":2294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"718:12:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2296,"nodeType":"ExpressionStatement","src":"701:29:9"},{"expression":{"argumentTypes":null,"id":2299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2297,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"740:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2298,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"756:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"740:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2300,"nodeType":"ExpressionStatement","src":"740:30:9"},{"expression":{"argumentTypes":null,"id":2309,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2301,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"780:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2305,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"813:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"813:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2307,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"813:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2304,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"803:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2302,"name":"int","nodeType":"ElementaryTypeName","src":"807:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2303,"length":null,"nodeType":"ArrayTypeName","src":"807:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2308,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"803:42:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"src":"780:65:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":2310,"nodeType":"ExpressionStatement","src":"780:65:9"},{"expression":{"argumentTypes":null,"id":2313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2311,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"855:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2312,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"861:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"855:10:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":2314,"nodeType":"ExpressionStatement","src":"855:10:9"},{"expression":{"argumentTypes":null,"id":2317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2315,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"875:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2316,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"889:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"875:26:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2318,"nodeType":"ExpressionStatement","src":"875:26:9"},{"expression":{"argumentTypes":null,"id":2322,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2319,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"911:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2320,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"919:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2321,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"919:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"911:28:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2323,"nodeType":"ExpressionStatement","src":"911:28:9"}]},"documentation":null,"id":2325,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":2267,"name":"proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2256,"src":"513:5:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":2268,"modifierName":{"argumentTypes":null,"id":2266,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"507:5:9","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"507:12:9"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":2265,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2256,"name":"proxy","nodeType":"VariableDeclaration","scope":2325,"src":"405:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2255,"name":"address","nodeType":"ElementaryTypeName","src":"405:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2258,"name":"_creator","nodeType":"VariableDeclaration","scope":2325,"src":"420:16:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2257,"name":"address","nodeType":"ElementaryTypeName","src":"420:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2260,"name":"_eventContract","nodeType":"VariableDeclaration","scope":2325,"src":"438:20:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2259,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"438:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2262,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":2325,"src":"460:24:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2261,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"460:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2264,"name":"_fee","nodeType":"VariableDeclaration","scope":2325,"src":"486:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2263,"name":"uint24","nodeType":"ElementaryTypeName","src":"486:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"404:94:9"},"payable":false,"returnParameters":{"id":2269,"nodeType":"ParameterList","parameters":[],"src":"539:0:9"},"scope":2326,"src":"393:553:9","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3113,"src":"317:631:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2327,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1104:7:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":2328,"nodeType":"InheritanceSpecifier","src":"1104:7:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2329,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"1113:6:9","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":2330,"nodeType":"InheritanceSpecifier","src":"1113:6:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2331,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"1121:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2332,"nodeType":"InheritanceSpecifier","src":"1121:18:9"}],"contractDependencies":[2172,2238,2248,6673],"contractKind":"contract","documentation":"@title Standard market contract - Backed implementation of standard markets\n @author Stefan George - ","fullyImplemented":true,"id":3112,"linearizedBaseContracts":[3112,2248,2238,2172,6673],"name":"StandardMarket","nodeType":"ContractDefinition","nodes":[{"id":2334,"libraryName":{"contractScope":null,"id":2333,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1152:8:9","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1146:21:9","typeName":null},{"body":{"id":2344,"nodeType":"Block","src":"1227:104:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2337,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1291:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2338,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1291:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2339,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"1305:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1291:21:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2336,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1283:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2341,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1283:30:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2342,"nodeType":"ExpressionStatement","src":"1283:30:9"},{"id":2343,"nodeType":"PlaceholderStatement","src":"1323:1:9"}]},"documentation":null,"id":2345,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":2335,"nodeType":"ParameterList","parameters":[],"src":"1224:2:9"},"src":"1206:125:9","visibility":"internal"},{"body":{"id":2356,"nodeType":"Block","src":"1369:97:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"id":2352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2350,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"1432:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2351,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2347,"src":"1441:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"1432:15:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2349,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1424:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2353,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1424:24:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2354,"nodeType":"ExpressionStatement","src":"1424:24:9"},{"id":2355,"nodeType":"PlaceholderStatement","src":"1458:1:9"}]},"documentation":null,"id":2357,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":2348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2347,"name":"_stage","nodeType":"VariableDeclaration","scope":2357,"src":"1354:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2346,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1354:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"internal"}],"src":"1353:15:9"},"src":"1337:129:9","visibility":"internal"},{"body":{"id":2407,"nodeType":"Block","src":"1753:434:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2385,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2373,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1918:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1918:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2375,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"1930:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2376,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"1936:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2369,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1873:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1873:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2371,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1873:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2377,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:72:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2382,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2383,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2020:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2378,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1965:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1965:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2381,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"1965:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2384,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:64:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1873:156:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2368,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1862:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2386,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1862:168:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2387,"nodeType":"ExpressionStatement","src":"1862:168:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2391,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2069:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2388,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2040:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"2040:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2392,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2040:38:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2393,"nodeType":"ExpressionStatement","src":"2040:38:9"},{"expression":{"argumentTypes":null,"id":2396,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2394,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2088:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2395,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2098:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2088:18:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2397,"nodeType":"ExpressionStatement","src":"2088:18:9"},{"expression":{"argumentTypes":null,"id":2401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2398,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2116:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2399,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2124:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2400,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2124:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2116:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2402,"nodeType":"ExpressionStatement","src":"2116:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2404,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2172:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2403,"name":"MarketFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2099,"src":"2158:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2405,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:22:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2406,"nodeType":"EmitStatement","src":"2153:27:9"}]},"documentation":"@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount","id":2408,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2362,"modifierName":{"argumentTypes":null,"id":2361,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"1701:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1701:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2364,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"1727:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2365,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2366,"modifierName":{"argumentTypes":null,"id":2363,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"1719:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"1719:29:9"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2360,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2359,"name":"_funding","nodeType":"VariableDeclaration","scope":2408,"src":"1663:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2358,"name":"uint","nodeType":"ElementaryTypeName","src":"1663:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1662:15:9"},"payable":false,"returnParameters":{"id":2367,"nodeType":"ParameterList","parameters":[],"src":"1753:0:9"},"scope":3112,"src":"1649:538:9","stateMutability":"nonpayable","superFunction":2179,"visibility":"public"},{"body":{"id":2459,"nodeType":"Block","src":"2400:304:9","statements":[{"assignments":[2418],"declarations":[{"constant":false,"id":2418,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2460,"src":"2410:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2417,"name":"uint8","nodeType":"ElementaryTypeName","src":"2410:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2422,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2419,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2431:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2431:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2421,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2431:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"2410:52:9"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2439,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"2573:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2445,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2623:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2442,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2610:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2440,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2582:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2582:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2443,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2444,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2582:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2446,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:46:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2436,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2561:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2434,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2533:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2533:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2437,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"2533:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:96:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2433,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2525:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2448,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2525:105:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2449,"nodeType":"ExpressionStatement","src":"2525:105:9"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2427,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2490:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2428,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2418,"src":"2494:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2490:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2450,"initializationExpression":{"assignments":[2424],"declarations":[{"constant":false,"id":2424,"name":"i","nodeType":"VariableDeclaration","scope":2460,"src":"2477:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2423,"name":"uint8","nodeType":"ElementaryTypeName","src":"2477:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2426,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2425,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2487:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2477:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2508:3:9","subExpression":{"argumentTypes":null,"id":2430,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2508:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2432,"nodeType":"ExpressionStatement","src":"2508:3:9"},"nodeType":"ForStatement","src":"2472:158:9"},{"expression":{"argumentTypes":null,"id":2454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2451,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2640:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2452,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2648:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2453,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2648:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2640:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2455,"nodeType":"ExpressionStatement","src":"2640:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":2456,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2101,"src":"2682:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":2457,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2682:15:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2458,"nodeType":"EmitStatement","src":"2677:20:9"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":2460,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2411,"modifierName":{"argumentTypes":null,"id":2410,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2349:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2349:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2413,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2375:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2414,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2375:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2415,"modifierName":{"argumentTypes":null,"id":2412,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"2367:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"2367:28:9"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2409,"nodeType":"ParameterList","parameters":[],"src":"2323:2:9"},"payable":false,"returnParameters":{"id":2416,"nodeType":"ParameterList","parameters":[],"src":"2400:0:9"},"scope":3112,"src":"2309:395:9","stateMutability":"nonpayable","superFunction":2182,"visibility":"public"},{"body":{"id":2490,"nodeType":"Block","src":"2898:204:9","statements":[{"expression":{"argumentTypes":null,"id":2474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2467,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"2908:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2472,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2957:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2468,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2915:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2469,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"2915:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2470,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2471,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"2915:41:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2908:54:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2475,"nodeType":"ExpressionStatement","src":"2908:54:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2481,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"3046:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2482,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3055:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2477,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2478,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3005:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2479,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2480,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3005:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:55:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2476,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2997:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2997:64:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2485,"nodeType":"ExpressionStatement","src":"2997:64:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2487,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3090:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2486,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2105,"src":"3076:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2488,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3076:19:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2489,"nodeType":"EmitStatement","src":"3071:24:9"}]},"documentation":"@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount","id":2491,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2463,"modifierName":{"argumentTypes":null,"id":2462,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2856:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2856:9:9"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2461,"nodeType":"ParameterList","parameters":[],"src":"2830:2:9"},"payable":false,"returnParameters":{"id":2466,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2465,"name":"fees","nodeType":"VariableDeclaration","scope":2491,"src":"2883:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2464,"name":"uint","nodeType":"ElementaryTypeName","src":"2883:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2882:11:9"},"scope":3112,"src":"2809:293:9","stateMutability":"nonpayable","superFunction":2187,"visibility":"public"},{"body":{"id":2595,"nodeType":"Block","src":"3589:680:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2517,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2508,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3611:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2507,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3607:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2509,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3607:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2510,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3633:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3607:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2516,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2513,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"3642:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2512,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3638:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2514,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3638:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2515,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3653:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3638:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3607:47:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2506,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3599:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2518,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3599:56:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2519,"nodeType":"ExpressionStatement","src":"3599:56:9"},{"assignments":[2521],"declarations":[{"constant":false,"id":2521,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2596,"src":"3665:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2520,"name":"uint8","nodeType":"ElementaryTypeName","src":"3665:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2525,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2522,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3686:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2523,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"3686:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3686:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"3665:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2533,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2527,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3735:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2528,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3756:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3735:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2532,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2530,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3761:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2531,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3781:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"3761:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3735:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2526,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3727:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2534,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3727:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2535,"nodeType":"ExpressionStatement","src":"3727:67:9"},{"assignments":[2539],"declarations":[{"constant":false,"id":2539,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2596,"src":"3804:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2537,"name":"int","nodeType":"ElementaryTypeName","src":"3804:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2538,"length":null,"nodeType":"ArrayTypeName","src":"3804:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2545,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2543,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3849:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2542,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3839:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2540,"name":"int","nodeType":"ElementaryTypeName","src":"3843:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2541,"length":null,"nodeType":"ArrayTypeName","src":"3843:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3839:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"3804:58:9"},{"expression":{"argumentTypes":null,"id":2552,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2546,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"3872:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2548,"indexExpression":{"argumentTypes":null,"id":2547,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3892:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3872:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2550,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3917:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2549,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2551,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3872:63:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2553,"nodeType":"ExpressionStatement","src":"3872:63:9"},{"assignments":[2555,2557,2559],"declarations":[{"constant":false,"id":2555,"name":"netCost","nodeType":"VariableDeclaration","scope":2596,"src":"3946:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2554,"name":"int","nodeType":"ElementaryTypeName","src":"3946:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2557,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2596,"src":"3959:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2556,"name":"int","nodeType":"ElementaryTypeName","src":"3959:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2559,"name":"fees","nodeType":"VariableDeclaration","scope":2596,"src":"3984:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2558,"name":"uint","nodeType":"ElementaryTypeName","src":"3984:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2567,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2561,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"4007:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2562,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"4021:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2564,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"4046:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2563,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4042:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2565,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4042:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2560,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"3997:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2566,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3997:58:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"3945:110:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2575,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2569,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4073:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4084:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4073:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2572,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4089:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2573,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4112:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4089:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4073:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2568,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4065:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2576,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4065:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2577,"nodeType":"ExpressionStatement","src":"4065:49:9"},{"expression":{"argumentTypes":null,"id":2582,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2578,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2504,"src":"4124:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2580,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4136:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4131:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2581,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4131:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4124:20:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2583,"nodeType":"ExpressionStatement","src":"4124:20:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2585,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4180:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4180:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2587,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"4192:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2588,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"4211:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2590,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4235:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2589,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4230:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2591,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4230:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2592,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2559,"src":"4257:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2584,"name":"OutcomeTokenPurchase","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2117,"src":"4159:20:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4159:103:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2594,"nodeType":"EmitStatement","src":"4154:108:9"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":2596,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2500,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"3536:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2501,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3536:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2502,"modifierName":{"argumentTypes":null,"id":2499,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"3528:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"3528:28:9"}],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2498,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2493,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2596,"src":"3442:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2492,"name":"uint8","nodeType":"ElementaryTypeName","src":"3442:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2495,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2596,"src":"3467:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2494,"name":"uint","nodeType":"ElementaryTypeName","src":"3467:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2497,"name":"maxCost","nodeType":"VariableDeclaration","scope":2596,"src":"3491:12:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2496,"name":"uint","nodeType":"ElementaryTypeName","src":"3491:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3441:63:9"},"payable":false,"returnParameters":{"id":2505,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2504,"name":"cost","nodeType":"VariableDeclaration","scope":2596,"src":"3574:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2503,"name":"uint","nodeType":"ElementaryTypeName","src":"3574:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3573:11:9"},"scope":3112,"src":"3429:840:9","stateMutability":"nonpayable","superFunction":2198,"visibility":"public"},{"body":{"id":2706,"nodeType":"Block","src":"4769:688:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2624,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2617,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4787:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2613,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"4792:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2612,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4788:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2614,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4788:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2616,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4814:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4787:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2623,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2621,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4819:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2619,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"4824:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2618,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2620,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2622,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4837:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4819:19:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4787:51:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2611,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2625,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4779:60:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2626,"nodeType":"ExpressionStatement","src":"4779:60:9"},{"assignments":[2628],"declarations":[{"constant":false,"id":2628,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2707,"src":"4849:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2627,"name":"uint8","nodeType":"ElementaryTypeName","src":"4849:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2632,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2629,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"4870:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"4870:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"4849:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2634,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4919:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2635,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4940:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4919:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2637,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4945:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2638,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"4965:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"4945:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4919:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4911:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2641,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4911:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2642,"nodeType":"ExpressionStatement","src":"4911:67:9"},{"assignments":[2646],"declarations":[{"constant":false,"id":2646,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2707,"src":"4988:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2644,"name":"int","nodeType":"ElementaryTypeName","src":"4988:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2645,"length":null,"nodeType":"ArrayTypeName","src":"4988:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2652,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2650,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5033:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2649,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"5023:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2647,"name":"int","nodeType":"ElementaryTypeName","src":"5027:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2648,"length":null,"nodeType":"ArrayTypeName","src":"5027:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2651,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5023:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"4988:58:9"},{"expression":{"argumentTypes":null,"id":2660,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2653,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5056:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2655,"indexExpression":{"argumentTypes":null,"id":2654,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5076:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5056:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2659,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5097:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2657,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5102:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5098:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5098:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5056:64:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2661,"nodeType":"ExpressionStatement","src":"5056:64:9"},{"assignments":[2663,2665,2667],"declarations":[{"constant":false,"id":2663,"name":"netCost","nodeType":"VariableDeclaration","scope":2707,"src":"5131:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2662,"name":"int","nodeType":"ElementaryTypeName","src":"5131:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2665,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2707,"src":"5144:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2664,"name":"int","nodeType":"ElementaryTypeName","src":"5144:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2667,"name":"fees","nodeType":"VariableDeclaration","scope":2707,"src":"5169:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2666,"name":"uint","nodeType":"ElementaryTypeName","src":"5169:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2676,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2669,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5192:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2670,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5206:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2674,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5227:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2672,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"5232:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2671,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5228:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2673,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5228:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2668,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"5182:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2675,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5182:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"5130:113:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2684,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2680,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2678,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5261:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2679,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5272:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5261:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2681,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5277:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5300:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5277:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5261:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2677,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5253:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2685,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5253:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2686,"nodeType":"ExpressionStatement","src":"5253:49:9"},{"expression":{"argumentTypes":null,"id":2692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2687,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2609,"src":"5312:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2690,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5326:8:9","subExpression":{"argumentTypes":null,"id":2689,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5327:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5321:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2691,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5321:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5312:23:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2693,"nodeType":"ExpressionStatement","src":"5312:23:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2695,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5367:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2696,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5367:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2697,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5379:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2698,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5398:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2701,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5422:20:9","subExpression":{"argumentTypes":null,"id":2700,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5423:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5417:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2702,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5417:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2703,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2667,"src":"5445:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2694,"name":"OutcomeTokenSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2129,"src":"5350:16:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2704,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5350:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2705,"nodeType":"EmitStatement","src":"5345:105:9"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":2707,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2605,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"4714:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2606,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4714:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2607,"modifierName":{"argumentTypes":null,"id":2604,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"4706:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"4706:28:9"}],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2603,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2598,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2707,"src":"4618:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2597,"name":"uint8","nodeType":"ElementaryTypeName","src":"4618:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2600,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2707,"src":"4643:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2599,"name":"uint","nodeType":"ElementaryTypeName","src":"4643:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2602,"name":"minProfit","nodeType":"VariableDeclaration","scope":2707,"src":"4667:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2601,"name":"uint","nodeType":"ElementaryTypeName","src":"4667:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4617:65:9"},"payable":false,"returnParameters":{"id":2610,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2609,"name":"profit","nodeType":"VariableDeclaration","scope":2707,"src":"4752:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2608,"name":"uint","nodeType":"ElementaryTypeName","src":"4752:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4751:13:9"},"scope":3112,"src":"4604:853:9","stateMutability":"nonpayable","superFunction":2209,"visibility":"public"},{"body":{"id":2821,"nodeType":"Block","src":"6057:1041:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2735,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2723,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6151:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2724,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6151:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2725,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6163:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2726,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6169:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6106:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2720,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6106:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2721,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"6106:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2727,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2732,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6247:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2733,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6262:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2728,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6207:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6207:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2730,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"6207:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2734,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:73:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6106:174:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2718,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6095:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2736,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6095:186:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2737,"nodeType":"ExpressionStatement","src":"6095:186:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2741,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6320:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2738,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6291:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2740,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"6291:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2742,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6291:47:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2743,"nodeType":"ExpressionStatement","src":"6291:47:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2750,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6442:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2751,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6448:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2747,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6415:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2744,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6387:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2748,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:46:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2749,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7488,"src":"6387:54:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2752,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:79:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2753,"nodeType":"ExpressionStatement","src":"6387:79:9"},{"assignments":[2755],"declarations":[{"constant":false,"id":2755,"name":"profit","nodeType":"VariableDeclaration","scope":2822,"src":"6476:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2754,"name":"uint","nodeType":"ElementaryTypeName","src":"6476:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2762,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2758,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6500:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2759,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6519:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2760,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2713,"src":"6538:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2756,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6490:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":2757,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"6490:9:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) external returns (uint256)"}},"id":2761,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6490:58:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"6476:72:9"},{"expression":{"argumentTypes":null,"id":2767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2763,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"6558:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2766,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2764,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6565:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":2765,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6585:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6565:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6558:33:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2768,"nodeType":"ExpressionStatement","src":"6558:33:9"},{"assignments":[2770],"declarations":[{"constant":false,"id":2770,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2822,"src":"6645:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2769,"name":"uint8","nodeType":"ElementaryTypeName","src":"6645:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2774,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2771,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6666:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2772,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"6666:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2773,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6666:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"6645:52:9"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2785,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6764:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":2786,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6769:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6764:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2800,"nodeType":"IfStatement","src":"6760:123:9","trueBody":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2794,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6852:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2795,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6852:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2796,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6864:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2791,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6840:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2789,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6812:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6812:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2792,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2793,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"6812:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2797,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:70:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2788,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6804:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2798,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6804:79:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2799,"nodeType":"ExpressionStatement","src":"6804:79:9"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2779,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6725:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2780,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2770,"src":"6729:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6725:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2801,"initializationExpression":{"assignments":[2776],"declarations":[{"constant":false,"id":2776,"name":"i","nodeType":"VariableDeclaration","scope":2822,"src":"6712:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2775,"name":"uint8","nodeType":"ElementaryTypeName","src":"6712:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2778,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2777,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6722:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"6712:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"6743:3:9","subExpression":{"argumentTypes":null,"id":2782,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6743:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2784,"nodeType":"ExpressionStatement","src":"6743:3:9"},"nodeType":"ForStatement","src":"6707:176:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2807,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6979:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2808,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6979:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2809,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6991:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2803,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6938:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6938:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"6938:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2810,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:60:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2802,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6930:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2811,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6930:69:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2812,"nodeType":"ExpressionStatement","src":"6930:69:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2814,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"7036:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2815,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7036:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2816,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"7048:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2817,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"7067:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2818,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"7086:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2813,"name":"OutcomeTokenShortSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2139,"src":"7014:21:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256)"}},"id":2819,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7014:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2820,"nodeType":"EmitStatement","src":"7009:82:9"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":2822,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2709,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2822,"src":"5945:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2708,"name":"uint8","nodeType":"ElementaryTypeName","src":"5945:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2711,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2822,"src":"5970:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2710,"name":"uint","nodeType":"ElementaryTypeName","src":"5970:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2713,"name":"minProfit","nodeType":"VariableDeclaration","scope":2822,"src":"5994:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2712,"name":"uint","nodeType":"ElementaryTypeName","src":"5994:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5944:65:9"},"payable":false,"returnParameters":{"id":2717,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2716,"name":"cost","nodeType":"VariableDeclaration","scope":2822,"src":"6042:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2715,"name":"uint","nodeType":"ElementaryTypeName","src":"6042:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6041:11:9"},"scope":3112,"src":"5926:1172:9","stateMutability":"nonpayable","superFunction":2220,"visibility":"public"},{"body":{"id":2874,"nodeType":"Block","src":"8025:386:9","statements":[{"assignments":[2837],"declarations":[{"constant":false,"id":2837,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2875,"src":"8035:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2836,"name":"uint8","nodeType":"ElementaryTypeName","src":"8035:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2841,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2838,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"8056:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2839,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"8056:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2840,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8056:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"8035:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2846,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2843,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8105:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2844,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8105:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2845,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8135:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"8105:42:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2842,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8097:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2847,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8097:51:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2848,"nodeType":"ExpressionStatement","src":"8097:51:9"},{"assignments":[],"declarations":[{"constant":false,"id":2850,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2875,"src":"8159:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2849,"name":"int","nodeType":"ElementaryTypeName","src":"8159:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":2851,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8159:23:9"},{"assignments":[],"declarations":[{"constant":false,"id":2853,"name":"fees","nodeType":"VariableDeclaration","scope":2875,"src":"8192:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2852,"name":"uint","nodeType":"ElementaryTypeName","src":"8192:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2854,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8192:9:9"},{"expression":{"argumentTypes":null,"id":2864,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":2855,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2834,"src":"8212:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2856,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8221:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2857,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8242:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":2858,"isConstant":false,"isInlineArray":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"TupleExpression","src":"8211:36:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2860,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8260:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2861,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8274:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2862,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2827,"src":"8295:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2859,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"8250:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2863,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8250:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"src":"8211:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2865,"nodeType":"ExpressionStatement","src":"8211:100:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2867,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"8345:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2868,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8345:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2869,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8357:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2870,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8378:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2871,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8399:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2866,"name":"OutcomeTokenTrade","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2150,"src":"8327:17:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256[] memory,int256,uint256)"}},"id":2872,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8327:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2873,"nodeType":"EmitStatement","src":"8322:82:9"}]},"documentation":"@dev Allows to trade outcome tokens and collateral with the market maker\n @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.","id":2875,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2830,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"7970:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2831,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7970:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2832,"modifierName":{"argumentTypes":null,"id":2829,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"7962:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"7962:28:9"}],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2828,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2825,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2875,"src":"7891:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2823,"name":"int","nodeType":"ElementaryTypeName","src":"7891:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2824,"length":null,"nodeType":"ArrayTypeName","src":"7891:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2827,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":2875,"src":"7918:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2826,"name":"int","nodeType":"ElementaryTypeName","src":"7918:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7890:48:9"},"payable":false,"returnParameters":{"id":2835,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2834,"name":"netCost","nodeType":"VariableDeclaration","scope":2875,"src":"8008:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2833,"name":"int","nodeType":"ElementaryTypeName","src":"8008:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8007:13:9"},"scope":3112,"src":"7876:535:9","stateMutability":"nonpayable","superFunction":2230,"visibility":"public"},{"body":{"id":3096,"nodeType":"Block","src":"8590:1897:9","statements":[{"expression":{"argumentTypes":null,"id":2897,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2891,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8650:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2894,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"8696:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2895,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"8702:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}],"expression":{"argumentTypes":null,"id":2892,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"8672:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2893,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcNetCost","nodeType":"MemberAccess","referencedDeclaration":1561,"src":"8672:23:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$","typeString":"function (contract Market,int256[] memory) view external returns (int256)"}},"id":2896,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8672:50:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8650:72:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2898,"nodeType":"ExpressionStatement","src":"8650:72:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2901,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2899,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8735:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2900,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8757:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8735:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":2917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2911,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8847:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2914,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8873:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2913,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8868:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2915,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8868:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2912,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8854:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2916,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8854:40:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8847:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2918,"nodeType":"ExpressionStatement","src":"8847:47:9"},"id":2919,"nodeType":"IfStatement","src":"8732:162:9","trueBody":{"expression":{"argumentTypes":null,"id":2909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2902,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8772:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8798:20:9","subExpression":{"argumentTypes":null,"id":2905,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8799:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2904,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8793:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2907,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8793:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2903,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8779:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2908,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8779:41:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8772:48:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2910,"nodeType":"ExpressionStatement","src":"8772:48:9"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2925,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2922,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8917:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2921,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2923,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8913:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2924,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8926:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8913:14:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2920,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8905:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2926,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8905:23:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2927,"nodeType":"ExpressionStatement","src":"8905:23:9"},{"expression":{"argumentTypes":null,"id":2935,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2928,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"8938:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2932,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8976:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2931,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8972:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2933,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8972:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":2929,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8948:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"8948:23:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":2934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8948:34:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8938:44:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2936,"nodeType":"ExpressionStatement","src":"8938:44:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2949,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2944,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2940,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2938,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9015:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2939,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9034:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9015:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2941,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9039:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":2942,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9050:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9039:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9015:50:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":2945,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"9014:52:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2946,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9082:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2947,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9101:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9082:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9014:88:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2937,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8993:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2950,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8993:119:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2951,"nodeType":"ExpressionStatement","src":"8993:119:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2952,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9126:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2953,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9148:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9126:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2988,"nodeType":"IfStatement","src":"9123:340:9","trueBody":{"id":2987,"nodeType":"Block","src":"9151:312:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2960,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9235:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2961,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9235:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2962,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9247:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2964,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9258:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2963,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9253:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2965,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9253:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2956,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9190:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9190:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2958,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2959,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"9190:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2966,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:77:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2971,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9327:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2973,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9347:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2972,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9342:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2974,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9342:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2967,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9287:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9287:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2969,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"9287:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2975,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9190:178:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2955,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9165:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2977,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9165:217:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2978,"nodeType":"ExpressionStatement","src":"9165:217:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2983,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9431:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2982,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9426:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2984,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9426:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2979,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9397:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2981,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"9397:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2985,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9397:55:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2986,"nodeType":"ExpressionStatement","src":"9397:55:9"}]}},{"body":{"id":3061,"nodeType":"Block","src":"9514:494:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2999,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9531:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3001,"indexExpression":{"argumentTypes":null,"id":3000,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9551:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9531:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3002,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9557:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9531:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3060,"nodeType":"IfStatement","src":"9528:470:9","trueBody":{"id":3059,"nodeType":"Block","src":"9560:438:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3008,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3004,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9581:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3006,"indexExpression":{"argumentTypes":null,"id":3005,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9601:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9581:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9606:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9581:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3044,"nodeType":"Block","src":"9757:131:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3034,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9827:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3035,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9827:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3037,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9844:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3039,"indexExpression":{"argumentTypes":null,"id":3038,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9864:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9844:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3036,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9839:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3040,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9839:28:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3031,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9815:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3029,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9787:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3030,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9787:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3032,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3033,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"9787:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3041,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3028,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3042,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9779:90:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3043,"nodeType":"ExpressionStatement","src":"9779:90:9"}]},"id":3045,"nodeType":"IfStatement","src":"9578:310:9","trueBody":{"id":3027,"nodeType":"Block","src":"9609:142:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3015,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9683:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9683:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3017,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9695:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3022,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"9706:23:9","subExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3019,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9707:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3021,"indexExpression":{"argumentTypes":null,"id":3020,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9727:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9707:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3018,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9701:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3023,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3012,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9667:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3010,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9639:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9639:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3013,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3014,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7460,"src":"9639:43:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":3024,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:92:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3009,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9631:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3025,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9631:101:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3026,"nodeType":"ExpressionStatement","src":"9631:101:9"}]}},{"expression":{"argumentTypes":null,"id":3057,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3046,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9906:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3048,"indexExpression":{"argumentTypes":null,"id":3047,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9927:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"9906:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3053,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9960:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3055,"indexExpression":{"argumentTypes":null,"id":3054,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9980:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9960:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3049,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9932:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3051,"indexExpression":{"argumentTypes":null,"id":3050,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9953:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9932:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"9932:27:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":3056,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9932:51:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9906:77:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3058,"nodeType":"ExpressionStatement","src":"9906:77:9"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2993,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9491:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2994,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2877,"src":"9495:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"9491:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3062,"initializationExpression":{"assignments":[2990],"declarations":[{"constant":false,"id":2990,"name":"i","nodeType":"VariableDeclaration","scope":3097,"src":"9478:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2989,"name":"uint8","nodeType":"ElementaryTypeName","src":"9478:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2992,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2991,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9488:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"9478:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2997,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"9509:3:9","subExpression":{"argumentTypes":null,"id":2996,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9509:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2998,"nodeType":"ExpressionStatement","src":"9509:3:9"},"nodeType":"ForStatement","src":"9473:535:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3063,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10021:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10043:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10021:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3095,"nodeType":"IfStatement","src":"10018:463:9","trueBody":{"id":3094,"nodeType":"Block","src":"10046:435:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10309:20:9","subExpression":{"argumentTypes":null,"id":3070,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10310:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3069,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10304:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3072,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10304:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3066,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10274:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sellAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":285,"src":"10274:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":3073,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10274:57:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3074,"nodeType":"ExpressionStatement","src":"10274:57:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3077,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3075,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10348:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3076,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10358:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10348:11:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3093,"nodeType":"IfStatement","src":"10345:126:9","trueBody":{"id":3092,"nodeType":"Block","src":"10361:110:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3083,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"10428:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"10428:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10445:8:9","subExpression":{"argumentTypes":null,"id":3086,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10446:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3085,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10440:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10440:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3079,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3080,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"10387:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":3081,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":3082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"10387:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3089,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:68:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3078,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"10379:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3090,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10379:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3091,"nodeType":"ExpressionStatement","src":"10379:77:9"}]}}]}}]},"documentation":null,"id":3097,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"tradeImpl","nodeType":"FunctionDefinition","parameters":{"id":2883,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2877,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":3097,"src":"8436:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2876,"name":"uint8","nodeType":"ElementaryTypeName","src":"8436:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2880,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3097,"src":"8456:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2878,"name":"int","nodeType":"ElementaryTypeName","src":"8456:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2879,"length":null,"nodeType":"ArrayTypeName","src":"8456:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2882,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3097,"src":"8483:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2881,"name":"int","nodeType":"ElementaryTypeName","src":"8483:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8435:68:9"},"payable":false,"returnParameters":{"id":2890,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2885,"name":"netCost","nodeType":"VariableDeclaration","scope":3097,"src":"8537:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2884,"name":"int","nodeType":"ElementaryTypeName","src":"8537:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2887,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":3097,"src":"8550:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2886,"name":"int","nodeType":"ElementaryTypeName","src":"8550:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2889,"name":"fees","nodeType":"VariableDeclaration","scope":3097,"src":"8575:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2888,"name":"uint","nodeType":"ElementaryTypeName","src":"8575:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8536:49:9"},"scope":3112,"src":"8417:2070:9","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3110,"nodeType":"Block","src":"10742:58:9","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3104,"name":"outcomeTokenCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3099,"src":"10759:16:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":3105,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"10778:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:22:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":3107,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"10784:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:34:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3103,"id":3109,"nodeType":"Return","src":"10752:41:9"}]},"documentation":"@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade","id":3111,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":3100,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3099,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":3111,"src":"10664:21:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3098,"name":"uint","nodeType":"ElementaryTypeName","src":"10664:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10663:23:9"},"payable":false,"returnParameters":{"id":3103,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3102,"name":"","nodeType":"VariableDeclaration","scope":3111,"src":"10732:4:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3101,"name":"uint","nodeType":"ElementaryTypeName","src":"10732:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10731:6:9"},"scope":3112,"src":"10641:159:9","stateMutability":"view","superFunction":2237,"visibility":"public"}],"scope":3113,"src":"1077:9725:9"}],"src":"0:10803:9"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","exportedSymbols":{"StandardMarket":[3112],"StandardMarketData":[2248],"StandardMarketProxy":[2326]},"id":3113,"nodeType":"SourceUnit","nodes":[{"id":2240,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:9"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","file":"../Markets/Market.sol","id":2241,"nodeType":"ImportDirective","scope":3113,"sourceUnit":2239,"src":"25:31:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":2242,"nodeType":"ImportDirective","scope":3113,"sourceUnit":7329,"src":"57:63:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2243,"nodeType":"ImportDirective","scope":3113,"sourceUnit":385,"src":"121:29:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2244,"nodeType":"ImportDirective","scope":3113,"sourceUnit":1572,"src":"151:41:9","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2248,"linearizedBaseContracts":[2248],"name":"StandardMarketData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":2247,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":2248,"src":"262:42:9","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2245,"name":"uint24","nodeType":"ElementaryTypeName","src":"262:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":2246,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"297:7:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"}],"scope":3113,"src":"195:120:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2249,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"349:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":2250,"nodeType":"InheritanceSpecifier","src":"349:5:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2251,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"356:10:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2252,"nodeType":"InheritanceSpecifier","src":"356:10:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2253,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"368:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2254,"nodeType":"InheritanceSpecifier","src":"368:18:9"}],"contractDependencies":[2172,2248,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2326,"linearizedBaseContracts":[2326,2248,2172,6701,6673],"name":"StandardMarketProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":2324,"nodeType":"Block","src":"539:407:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2272,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"592:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":2271,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"584:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2273,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"584:23:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2274,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"611:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"584:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2277,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"624:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":2276,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"616:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2278,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"616:21:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2279,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"641:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"616:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":2284,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2282,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"646:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2283,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"653:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"646:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:78:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2270,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"576:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"576:87:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2287,"nodeType":"ExpressionStatement","src":"576:87:9"},{"expression":{"argumentTypes":null,"id":2290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2288,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"673:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2289,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2258,"src":"683:8:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"673:18:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":2291,"nodeType":"ExpressionStatement","src":"673:18:9"},{"expression":{"argumentTypes":null,"id":2295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2292,"name":"createdAtBlock","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2154,"src":"701:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2293,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"718:5:9","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":2294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"718:12:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2296,"nodeType":"ExpressionStatement","src":"701:29:9"},{"expression":{"argumentTypes":null,"id":2299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2297,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"740:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2298,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"756:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"740:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2300,"nodeType":"ExpressionStatement","src":"740:30:9"},{"expression":{"argumentTypes":null,"id":2309,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2301,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"780:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2305,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"813:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"813:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2307,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"813:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2304,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"803:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2302,"name":"int","nodeType":"ElementaryTypeName","src":"807:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2303,"length":null,"nodeType":"ArrayTypeName","src":"807:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2308,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"803:42:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"src":"780:65:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":2310,"nodeType":"ExpressionStatement","src":"780:65:9"},{"expression":{"argumentTypes":null,"id":2313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2311,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"855:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2312,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"861:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"855:10:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":2314,"nodeType":"ExpressionStatement","src":"855:10:9"},{"expression":{"argumentTypes":null,"id":2317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2315,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"875:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2316,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"889:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"875:26:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2318,"nodeType":"ExpressionStatement","src":"875:26:9"},{"expression":{"argumentTypes":null,"id":2322,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2319,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"911:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2320,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"919:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2321,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"919:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"911:28:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2323,"nodeType":"ExpressionStatement","src":"911:28:9"}]},"documentation":null,"id":2325,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":2267,"name":"proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2256,"src":"513:5:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":2268,"modifierName":{"argumentTypes":null,"id":2266,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"507:5:9","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"507:12:9"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":2265,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2256,"name":"proxy","nodeType":"VariableDeclaration","scope":2325,"src":"405:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2255,"name":"address","nodeType":"ElementaryTypeName","src":"405:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2258,"name":"_creator","nodeType":"VariableDeclaration","scope":2325,"src":"420:16:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2257,"name":"address","nodeType":"ElementaryTypeName","src":"420:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2260,"name":"_eventContract","nodeType":"VariableDeclaration","scope":2325,"src":"438:20:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2259,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"438:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2262,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":2325,"src":"460:24:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2261,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"460:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2264,"name":"_fee","nodeType":"VariableDeclaration","scope":2325,"src":"486:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2263,"name":"uint24","nodeType":"ElementaryTypeName","src":"486:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"404:94:9"},"payable":false,"returnParameters":{"id":2269,"nodeType":"ParameterList","parameters":[],"src":"539:0:9"},"scope":2326,"src":"393:553:9","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3113,"src":"317:631:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2327,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1104:7:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":2328,"nodeType":"InheritanceSpecifier","src":"1104:7:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2329,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"1113:6:9","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":2330,"nodeType":"InheritanceSpecifier","src":"1113:6:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2331,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"1121:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2332,"nodeType":"InheritanceSpecifier","src":"1121:18:9"}],"contractDependencies":[2172,2238,2248,6673],"contractKind":"contract","documentation":"@title Standard market contract - Backed implementation of standard markets\n @author Stefan George - ","fullyImplemented":true,"id":3112,"linearizedBaseContracts":[3112,2248,2238,2172,6673],"name":"StandardMarket","nodeType":"ContractDefinition","nodes":[{"id":2334,"libraryName":{"contractScope":null,"id":2333,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1152:8:9","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1146:21:9","typeName":null},{"body":{"id":2344,"nodeType":"Block","src":"1227:104:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2337,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1291:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2338,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1291:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2339,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"1305:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1291:21:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2336,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1283:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2341,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1283:30:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2342,"nodeType":"ExpressionStatement","src":"1283:30:9"},{"id":2343,"nodeType":"PlaceholderStatement","src":"1323:1:9"}]},"documentation":null,"id":2345,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":2335,"nodeType":"ParameterList","parameters":[],"src":"1224:2:9"},"src":"1206:125:9","visibility":"internal"},{"body":{"id":2356,"nodeType":"Block","src":"1369:97:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"id":2352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2350,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"1432:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2351,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2347,"src":"1441:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"1432:15:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2349,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1424:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2353,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1424:24:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2354,"nodeType":"ExpressionStatement","src":"1424:24:9"},{"id":2355,"nodeType":"PlaceholderStatement","src":"1458:1:9"}]},"documentation":null,"id":2357,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":2348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2347,"name":"_stage","nodeType":"VariableDeclaration","scope":2357,"src":"1354:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2346,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1354:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"internal"}],"src":"1353:15:9"},"src":"1337:129:9","visibility":"internal"},{"body":{"id":2407,"nodeType":"Block","src":"1753:434:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2385,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2373,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1918:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1918:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2375,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"1930:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2376,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"1936:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2369,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1873:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1873:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2371,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1873:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2377,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:72:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2382,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2383,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2020:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2378,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1965:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1965:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2381,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"1965:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2384,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:64:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1873:156:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2368,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1862:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2386,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1862:168:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2387,"nodeType":"ExpressionStatement","src":"1862:168:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2391,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2069:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2388,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2040:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"2040:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2392,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2040:38:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2393,"nodeType":"ExpressionStatement","src":"2040:38:9"},{"expression":{"argumentTypes":null,"id":2396,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2394,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2088:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2395,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2098:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2088:18:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2397,"nodeType":"ExpressionStatement","src":"2088:18:9"},{"expression":{"argumentTypes":null,"id":2401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2398,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2116:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2399,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2124:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2400,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2124:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2116:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2402,"nodeType":"ExpressionStatement","src":"2116:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2404,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2172:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2403,"name":"MarketFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2099,"src":"2158:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2405,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:22:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2406,"nodeType":"EmitStatement","src":"2153:27:9"}]},"documentation":"@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount","id":2408,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2362,"modifierName":{"argumentTypes":null,"id":2361,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"1701:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1701:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2364,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"1727:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2365,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2366,"modifierName":{"argumentTypes":null,"id":2363,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"1719:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"1719:29:9"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2360,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2359,"name":"_funding","nodeType":"VariableDeclaration","scope":2408,"src":"1663:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2358,"name":"uint","nodeType":"ElementaryTypeName","src":"1663:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1662:15:9"},"payable":false,"returnParameters":{"id":2367,"nodeType":"ParameterList","parameters":[],"src":"1753:0:9"},"scope":3112,"src":"1649:538:9","stateMutability":"nonpayable","superFunction":2179,"visibility":"public"},{"body":{"id":2459,"nodeType":"Block","src":"2400:304:9","statements":[{"assignments":[2418],"declarations":[{"constant":false,"id":2418,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2460,"src":"2410:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2417,"name":"uint8","nodeType":"ElementaryTypeName","src":"2410:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2422,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2419,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2431:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2431:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2421,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2431:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"2410:52:9"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2439,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"2573:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2445,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2623:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2442,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2610:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2440,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2582:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2582:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2443,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2444,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2582:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2446,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:46:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2436,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2561:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2434,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2533:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2533:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2437,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"2533:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:96:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2433,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2525:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2448,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2525:105:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2449,"nodeType":"ExpressionStatement","src":"2525:105:9"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2427,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2490:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2428,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2418,"src":"2494:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2490:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2450,"initializationExpression":{"assignments":[2424],"declarations":[{"constant":false,"id":2424,"name":"i","nodeType":"VariableDeclaration","scope":2460,"src":"2477:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2423,"name":"uint8","nodeType":"ElementaryTypeName","src":"2477:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2426,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2425,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2487:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2477:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2508:3:9","subExpression":{"argumentTypes":null,"id":2430,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2508:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2432,"nodeType":"ExpressionStatement","src":"2508:3:9"},"nodeType":"ForStatement","src":"2472:158:9"},{"expression":{"argumentTypes":null,"id":2454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2451,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2640:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2452,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2648:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2453,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2648:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2640:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2455,"nodeType":"ExpressionStatement","src":"2640:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":2456,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2101,"src":"2682:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":2457,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2682:15:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2458,"nodeType":"EmitStatement","src":"2677:20:9"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":2460,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2411,"modifierName":{"argumentTypes":null,"id":2410,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2349:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2349:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2413,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2375:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2414,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2375:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2415,"modifierName":{"argumentTypes":null,"id":2412,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"2367:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"2367:28:9"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2409,"nodeType":"ParameterList","parameters":[],"src":"2323:2:9"},"payable":false,"returnParameters":{"id":2416,"nodeType":"ParameterList","parameters":[],"src":"2400:0:9"},"scope":3112,"src":"2309:395:9","stateMutability":"nonpayable","superFunction":2182,"visibility":"public"},{"body":{"id":2490,"nodeType":"Block","src":"2898:204:9","statements":[{"expression":{"argumentTypes":null,"id":2474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2467,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"2908:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2472,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2957:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2468,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2915:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2469,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"2915:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2470,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2471,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"2915:41:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2908:54:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2475,"nodeType":"ExpressionStatement","src":"2908:54:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2481,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"3046:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2482,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3055:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2477,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2478,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3005:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2479,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2480,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3005:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:55:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2476,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2997:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2997:64:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2485,"nodeType":"ExpressionStatement","src":"2997:64:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2487,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3090:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2486,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2105,"src":"3076:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2488,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3076:19:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2489,"nodeType":"EmitStatement","src":"3071:24:9"}]},"documentation":"@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount","id":2491,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2463,"modifierName":{"argumentTypes":null,"id":2462,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2856:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2856:9:9"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2461,"nodeType":"ParameterList","parameters":[],"src":"2830:2:9"},"payable":false,"returnParameters":{"id":2466,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2465,"name":"fees","nodeType":"VariableDeclaration","scope":2491,"src":"2883:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2464,"name":"uint","nodeType":"ElementaryTypeName","src":"2883:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2882:11:9"},"scope":3112,"src":"2809:293:9","stateMutability":"nonpayable","superFunction":2187,"visibility":"public"},{"body":{"id":2595,"nodeType":"Block","src":"3589:680:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2517,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2508,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3611:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2507,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3607:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2509,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3607:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2510,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3633:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3607:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2516,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2513,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"3642:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2512,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3638:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2514,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3638:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2515,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3653:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3638:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3607:47:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2506,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3599:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2518,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3599:56:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2519,"nodeType":"ExpressionStatement","src":"3599:56:9"},{"assignments":[2521],"declarations":[{"constant":false,"id":2521,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2596,"src":"3665:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2520,"name":"uint8","nodeType":"ElementaryTypeName","src":"3665:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2525,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2522,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3686:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2523,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"3686:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3686:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"3665:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2533,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2527,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3735:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2528,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3756:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3735:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2532,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2530,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3761:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2531,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3781:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"3761:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3735:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2526,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3727:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2534,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3727:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2535,"nodeType":"ExpressionStatement","src":"3727:67:9"},{"assignments":[2539],"declarations":[{"constant":false,"id":2539,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2596,"src":"3804:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2537,"name":"int","nodeType":"ElementaryTypeName","src":"3804:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2538,"length":null,"nodeType":"ArrayTypeName","src":"3804:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2545,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2543,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3849:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2542,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3839:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2540,"name":"int","nodeType":"ElementaryTypeName","src":"3843:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2541,"length":null,"nodeType":"ArrayTypeName","src":"3843:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3839:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"3804:58:9"},{"expression":{"argumentTypes":null,"id":2552,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2546,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"3872:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2548,"indexExpression":{"argumentTypes":null,"id":2547,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3892:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3872:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2550,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3917:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2549,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2551,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3872:63:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2553,"nodeType":"ExpressionStatement","src":"3872:63:9"},{"assignments":[2555,2557,2559],"declarations":[{"constant":false,"id":2555,"name":"netCost","nodeType":"VariableDeclaration","scope":2596,"src":"3946:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2554,"name":"int","nodeType":"ElementaryTypeName","src":"3946:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2557,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2596,"src":"3959:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2556,"name":"int","nodeType":"ElementaryTypeName","src":"3959:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2559,"name":"fees","nodeType":"VariableDeclaration","scope":2596,"src":"3984:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2558,"name":"uint","nodeType":"ElementaryTypeName","src":"3984:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2567,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2561,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"4007:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2562,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"4021:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2564,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"4046:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2563,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4042:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2565,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4042:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2560,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"3997:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2566,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3997:58:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"3945:110:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2575,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2569,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4073:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4084:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4073:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2572,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4089:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2573,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4112:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4089:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4073:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2568,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4065:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2576,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4065:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2577,"nodeType":"ExpressionStatement","src":"4065:49:9"},{"expression":{"argumentTypes":null,"id":2582,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2578,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2504,"src":"4124:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2580,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4136:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4131:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2581,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4131:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4124:20:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2583,"nodeType":"ExpressionStatement","src":"4124:20:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2585,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4180:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4180:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2587,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"4192:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2588,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"4211:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2590,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4235:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2589,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4230:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2591,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4230:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2592,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2559,"src":"4257:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2584,"name":"OutcomeTokenPurchase","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2117,"src":"4159:20:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4159:103:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2594,"nodeType":"EmitStatement","src":"4154:108:9"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":2596,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2500,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"3536:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2501,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3536:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2502,"modifierName":{"argumentTypes":null,"id":2499,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"3528:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"3528:28:9"}],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2498,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2493,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2596,"src":"3442:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2492,"name":"uint8","nodeType":"ElementaryTypeName","src":"3442:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2495,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2596,"src":"3467:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2494,"name":"uint","nodeType":"ElementaryTypeName","src":"3467:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2497,"name":"maxCost","nodeType":"VariableDeclaration","scope":2596,"src":"3491:12:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2496,"name":"uint","nodeType":"ElementaryTypeName","src":"3491:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3441:63:9"},"payable":false,"returnParameters":{"id":2505,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2504,"name":"cost","nodeType":"VariableDeclaration","scope":2596,"src":"3574:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2503,"name":"uint","nodeType":"ElementaryTypeName","src":"3574:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3573:11:9"},"scope":3112,"src":"3429:840:9","stateMutability":"nonpayable","superFunction":2198,"visibility":"public"},{"body":{"id":2706,"nodeType":"Block","src":"4769:688:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2624,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2617,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4787:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2613,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"4792:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2612,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4788:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2614,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4788:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2616,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4814:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4787:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2623,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2621,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4819:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2619,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"4824:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2618,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2620,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2622,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4837:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4819:19:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4787:51:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2611,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2625,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4779:60:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2626,"nodeType":"ExpressionStatement","src":"4779:60:9"},{"assignments":[2628],"declarations":[{"constant":false,"id":2628,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2707,"src":"4849:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2627,"name":"uint8","nodeType":"ElementaryTypeName","src":"4849:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2632,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2629,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"4870:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"4870:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"4849:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2634,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4919:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2635,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4940:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4919:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2637,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4945:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2638,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"4965:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"4945:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4919:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4911:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2641,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4911:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2642,"nodeType":"ExpressionStatement","src":"4911:67:9"},{"assignments":[2646],"declarations":[{"constant":false,"id":2646,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2707,"src":"4988:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2644,"name":"int","nodeType":"ElementaryTypeName","src":"4988:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2645,"length":null,"nodeType":"ArrayTypeName","src":"4988:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2652,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2650,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5033:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2649,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"5023:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2647,"name":"int","nodeType":"ElementaryTypeName","src":"5027:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2648,"length":null,"nodeType":"ArrayTypeName","src":"5027:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2651,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5023:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"4988:58:9"},{"expression":{"argumentTypes":null,"id":2660,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2653,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5056:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2655,"indexExpression":{"argumentTypes":null,"id":2654,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5076:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5056:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2659,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5097:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2657,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5102:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5098:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5098:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5056:64:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2661,"nodeType":"ExpressionStatement","src":"5056:64:9"},{"assignments":[2663,2665,2667],"declarations":[{"constant":false,"id":2663,"name":"netCost","nodeType":"VariableDeclaration","scope":2707,"src":"5131:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2662,"name":"int","nodeType":"ElementaryTypeName","src":"5131:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2665,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2707,"src":"5144:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2664,"name":"int","nodeType":"ElementaryTypeName","src":"5144:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2667,"name":"fees","nodeType":"VariableDeclaration","scope":2707,"src":"5169:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2666,"name":"uint","nodeType":"ElementaryTypeName","src":"5169:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2676,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2669,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5192:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2670,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5206:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2674,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5227:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2672,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"5232:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2671,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5228:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2673,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5228:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2668,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"5182:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2675,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5182:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"5130:113:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2684,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2680,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2678,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5261:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2679,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5272:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5261:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2681,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5277:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5300:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5277:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5261:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2677,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5253:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2685,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5253:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2686,"nodeType":"ExpressionStatement","src":"5253:49:9"},{"expression":{"argumentTypes":null,"id":2692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2687,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2609,"src":"5312:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2690,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5326:8:9","subExpression":{"argumentTypes":null,"id":2689,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5327:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5321:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2691,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5321:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5312:23:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2693,"nodeType":"ExpressionStatement","src":"5312:23:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2695,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5367:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2696,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5367:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2697,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5379:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2698,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5398:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2701,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5422:20:9","subExpression":{"argumentTypes":null,"id":2700,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5423:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5417:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2702,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5417:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2703,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2667,"src":"5445:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2694,"name":"OutcomeTokenSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2129,"src":"5350:16:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2704,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5350:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2705,"nodeType":"EmitStatement","src":"5345:105:9"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":2707,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2605,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"4714:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2606,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4714:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2607,"modifierName":{"argumentTypes":null,"id":2604,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"4706:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"4706:28:9"}],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2603,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2598,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2707,"src":"4618:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2597,"name":"uint8","nodeType":"ElementaryTypeName","src":"4618:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2600,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2707,"src":"4643:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2599,"name":"uint","nodeType":"ElementaryTypeName","src":"4643:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2602,"name":"minProfit","nodeType":"VariableDeclaration","scope":2707,"src":"4667:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2601,"name":"uint","nodeType":"ElementaryTypeName","src":"4667:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4617:65:9"},"payable":false,"returnParameters":{"id":2610,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2609,"name":"profit","nodeType":"VariableDeclaration","scope":2707,"src":"4752:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2608,"name":"uint","nodeType":"ElementaryTypeName","src":"4752:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4751:13:9"},"scope":3112,"src":"4604:853:9","stateMutability":"nonpayable","superFunction":2209,"visibility":"public"},{"body":{"id":2821,"nodeType":"Block","src":"6057:1041:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2735,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2723,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6151:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2724,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6151:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2725,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6163:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2726,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6169:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6106:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2720,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6106:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2721,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"6106:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2727,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2732,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6247:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2733,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6262:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2728,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6207:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6207:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2730,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"6207:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2734,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:73:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6106:174:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2718,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6095:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2736,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6095:186:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2737,"nodeType":"ExpressionStatement","src":"6095:186:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2741,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6320:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2738,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6291:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2740,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"6291:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2742,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6291:47:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2743,"nodeType":"ExpressionStatement","src":"6291:47:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2750,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6442:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2751,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6448:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2747,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6415:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2744,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6387:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2748,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:46:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2749,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7488,"src":"6387:54:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2752,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:79:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2753,"nodeType":"ExpressionStatement","src":"6387:79:9"},{"assignments":[2755],"declarations":[{"constant":false,"id":2755,"name":"profit","nodeType":"VariableDeclaration","scope":2822,"src":"6476:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2754,"name":"uint","nodeType":"ElementaryTypeName","src":"6476:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2762,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2758,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6500:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2759,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6519:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2760,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2713,"src":"6538:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2756,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6490:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":2757,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"6490:9:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) external returns (uint256)"}},"id":2761,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6490:58:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"6476:72:9"},{"expression":{"argumentTypes":null,"id":2767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2763,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"6558:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2766,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2764,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6565:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":2765,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6585:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6565:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6558:33:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2768,"nodeType":"ExpressionStatement","src":"6558:33:9"},{"assignments":[2770],"declarations":[{"constant":false,"id":2770,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2822,"src":"6645:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2769,"name":"uint8","nodeType":"ElementaryTypeName","src":"6645:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2774,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2771,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6666:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2772,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"6666:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2773,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6666:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"6645:52:9"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2785,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6764:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":2786,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6769:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6764:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2800,"nodeType":"IfStatement","src":"6760:123:9","trueBody":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2794,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6852:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2795,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6852:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2796,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6864:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2791,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6840:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2789,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6812:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6812:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2792,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2793,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"6812:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2797,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:70:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2788,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6804:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2798,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6804:79:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2799,"nodeType":"ExpressionStatement","src":"6804:79:9"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2779,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6725:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2780,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2770,"src":"6729:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6725:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2801,"initializationExpression":{"assignments":[2776],"declarations":[{"constant":false,"id":2776,"name":"i","nodeType":"VariableDeclaration","scope":2822,"src":"6712:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2775,"name":"uint8","nodeType":"ElementaryTypeName","src":"6712:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2778,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2777,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6722:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"6712:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"6743:3:9","subExpression":{"argumentTypes":null,"id":2782,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6743:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2784,"nodeType":"ExpressionStatement","src":"6743:3:9"},"nodeType":"ForStatement","src":"6707:176:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2807,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6979:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2808,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6979:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2809,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6991:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2803,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6938:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6938:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"6938:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2810,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:60:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2802,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6930:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2811,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6930:69:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2812,"nodeType":"ExpressionStatement","src":"6930:69:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2814,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"7036:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2815,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7036:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2816,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"7048:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2817,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"7067:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2818,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"7086:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2813,"name":"OutcomeTokenShortSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2139,"src":"7014:21:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256)"}},"id":2819,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7014:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2820,"nodeType":"EmitStatement","src":"7009:82:9"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":2822,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2709,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2822,"src":"5945:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2708,"name":"uint8","nodeType":"ElementaryTypeName","src":"5945:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2711,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2822,"src":"5970:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2710,"name":"uint","nodeType":"ElementaryTypeName","src":"5970:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2713,"name":"minProfit","nodeType":"VariableDeclaration","scope":2822,"src":"5994:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2712,"name":"uint","nodeType":"ElementaryTypeName","src":"5994:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5944:65:9"},"payable":false,"returnParameters":{"id":2717,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2716,"name":"cost","nodeType":"VariableDeclaration","scope":2822,"src":"6042:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2715,"name":"uint","nodeType":"ElementaryTypeName","src":"6042:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6041:11:9"},"scope":3112,"src":"5926:1172:9","stateMutability":"nonpayable","superFunction":2220,"visibility":"public"},{"body":{"id":2874,"nodeType":"Block","src":"8025:386:9","statements":[{"assignments":[2837],"declarations":[{"constant":false,"id":2837,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2875,"src":"8035:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2836,"name":"uint8","nodeType":"ElementaryTypeName","src":"8035:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2841,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2838,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"8056:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2839,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"8056:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2840,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8056:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"8035:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2846,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2843,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8105:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2844,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8105:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2845,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8135:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"8105:42:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2842,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8097:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2847,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8097:51:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2848,"nodeType":"ExpressionStatement","src":"8097:51:9"},{"assignments":[],"declarations":[{"constant":false,"id":2850,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2875,"src":"8159:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2849,"name":"int","nodeType":"ElementaryTypeName","src":"8159:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":2851,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8159:23:9"},{"assignments":[],"declarations":[{"constant":false,"id":2853,"name":"fees","nodeType":"VariableDeclaration","scope":2875,"src":"8192:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2852,"name":"uint","nodeType":"ElementaryTypeName","src":"8192:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2854,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8192:9:9"},{"expression":{"argumentTypes":null,"id":2864,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":2855,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2834,"src":"8212:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2856,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8221:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2857,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8242:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":2858,"isConstant":false,"isInlineArray":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"TupleExpression","src":"8211:36:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2860,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8260:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2861,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8274:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2862,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2827,"src":"8295:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2859,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"8250:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2863,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8250:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"src":"8211:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2865,"nodeType":"ExpressionStatement","src":"8211:100:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2867,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"8345:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2868,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8345:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2869,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8357:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2870,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8378:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2871,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8399:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2866,"name":"OutcomeTokenTrade","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2150,"src":"8327:17:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256[] memory,int256,uint256)"}},"id":2872,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8327:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2873,"nodeType":"EmitStatement","src":"8322:82:9"}]},"documentation":"@dev Allows to trade outcome tokens and collateral with the market maker\n @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.","id":2875,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2830,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"7970:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2831,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7970:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2832,"modifierName":{"argumentTypes":null,"id":2829,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"7962:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"7962:28:9"}],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2828,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2825,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2875,"src":"7891:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2823,"name":"int","nodeType":"ElementaryTypeName","src":"7891:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2824,"length":null,"nodeType":"ArrayTypeName","src":"7891:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2827,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":2875,"src":"7918:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2826,"name":"int","nodeType":"ElementaryTypeName","src":"7918:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7890:48:9"},"payable":false,"returnParameters":{"id":2835,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2834,"name":"netCost","nodeType":"VariableDeclaration","scope":2875,"src":"8008:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2833,"name":"int","nodeType":"ElementaryTypeName","src":"8008:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8007:13:9"},"scope":3112,"src":"7876:535:9","stateMutability":"nonpayable","superFunction":2230,"visibility":"public"},{"body":{"id":3096,"nodeType":"Block","src":"8590:1897:9","statements":[{"expression":{"argumentTypes":null,"id":2897,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2891,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8650:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2894,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"8696:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2895,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"8702:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}],"expression":{"argumentTypes":null,"id":2892,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"8672:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2893,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcNetCost","nodeType":"MemberAccess","referencedDeclaration":1561,"src":"8672:23:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$","typeString":"function (contract Market,int256[] memory) view external returns (int256)"}},"id":2896,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8672:50:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8650:72:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2898,"nodeType":"ExpressionStatement","src":"8650:72:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2901,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2899,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8735:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2900,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8757:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8735:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":2917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2911,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8847:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2914,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8873:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2913,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8868:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2915,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8868:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2912,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8854:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2916,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8854:40:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8847:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2918,"nodeType":"ExpressionStatement","src":"8847:47:9"},"id":2919,"nodeType":"IfStatement","src":"8732:162:9","trueBody":{"expression":{"argumentTypes":null,"id":2909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2902,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8772:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8798:20:9","subExpression":{"argumentTypes":null,"id":2905,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8799:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2904,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8793:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2907,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8793:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2903,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8779:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2908,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8779:41:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8772:48:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2910,"nodeType":"ExpressionStatement","src":"8772:48:9"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2925,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2922,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8917:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2921,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2923,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8913:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2924,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8926:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8913:14:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2920,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8905:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2926,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8905:23:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2927,"nodeType":"ExpressionStatement","src":"8905:23:9"},{"expression":{"argumentTypes":null,"id":2935,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2928,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"8938:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2932,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8976:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2931,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8972:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2933,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8972:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":2929,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8948:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"8948:23:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":2934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8948:34:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8938:44:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2936,"nodeType":"ExpressionStatement","src":"8938:44:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2949,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2944,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2940,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2938,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9015:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2939,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9034:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9015:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2941,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9039:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":2942,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9050:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9039:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9015:50:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":2945,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"9014:52:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2946,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9082:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2947,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9101:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9082:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9014:88:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2937,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8993:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2950,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8993:119:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2951,"nodeType":"ExpressionStatement","src":"8993:119:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2952,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9126:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2953,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9148:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9126:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2988,"nodeType":"IfStatement","src":"9123:340:9","trueBody":{"id":2987,"nodeType":"Block","src":"9151:312:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2960,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9235:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2961,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9235:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2962,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9247:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2964,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9258:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2963,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9253:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2965,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9253:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2956,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9190:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9190:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2958,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2959,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"9190:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2966,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:77:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2971,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9327:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2973,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9347:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2972,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9342:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2974,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9342:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2967,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9287:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9287:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2969,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"9287:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2975,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9190:178:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2955,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9165:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2977,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9165:217:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2978,"nodeType":"ExpressionStatement","src":"9165:217:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2983,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9431:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2982,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9426:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2984,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9426:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2979,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9397:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2981,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"9397:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2985,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9397:55:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2986,"nodeType":"ExpressionStatement","src":"9397:55:9"}]}},{"body":{"id":3061,"nodeType":"Block","src":"9514:494:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2999,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9531:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3001,"indexExpression":{"argumentTypes":null,"id":3000,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9551:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9531:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3002,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9557:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9531:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3060,"nodeType":"IfStatement","src":"9528:470:9","trueBody":{"id":3059,"nodeType":"Block","src":"9560:438:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3008,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3004,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9581:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3006,"indexExpression":{"argumentTypes":null,"id":3005,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9601:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9581:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9606:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9581:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3044,"nodeType":"Block","src":"9757:131:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3034,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9827:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3035,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9827:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3037,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9844:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3039,"indexExpression":{"argumentTypes":null,"id":3038,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9864:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9844:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3036,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9839:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3040,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9839:28:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3031,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9815:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3029,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9787:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3030,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9787:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3032,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3033,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"9787:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3041,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3028,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3042,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9779:90:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3043,"nodeType":"ExpressionStatement","src":"9779:90:9"}]},"id":3045,"nodeType":"IfStatement","src":"9578:310:9","trueBody":{"id":3027,"nodeType":"Block","src":"9609:142:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3015,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9683:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9683:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3017,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9695:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3022,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"9706:23:9","subExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3019,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9707:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3021,"indexExpression":{"argumentTypes":null,"id":3020,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9727:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9707:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3018,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9701:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3023,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3012,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9667:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3010,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9639:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9639:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3013,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3014,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7460,"src":"9639:43:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":3024,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:92:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3009,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9631:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3025,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9631:101:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3026,"nodeType":"ExpressionStatement","src":"9631:101:9"}]}},{"expression":{"argumentTypes":null,"id":3057,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3046,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9906:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3048,"indexExpression":{"argumentTypes":null,"id":3047,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9927:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"9906:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3053,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9960:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3055,"indexExpression":{"argumentTypes":null,"id":3054,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9980:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9960:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3049,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9932:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3051,"indexExpression":{"argumentTypes":null,"id":3050,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9953:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9932:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"9932:27:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":3056,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9932:51:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9906:77:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3058,"nodeType":"ExpressionStatement","src":"9906:77:9"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2993,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9491:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2994,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2877,"src":"9495:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"9491:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3062,"initializationExpression":{"assignments":[2990],"declarations":[{"constant":false,"id":2990,"name":"i","nodeType":"VariableDeclaration","scope":3097,"src":"9478:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2989,"name":"uint8","nodeType":"ElementaryTypeName","src":"9478:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2992,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2991,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9488:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"9478:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2997,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"9509:3:9","subExpression":{"argumentTypes":null,"id":2996,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9509:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2998,"nodeType":"ExpressionStatement","src":"9509:3:9"},"nodeType":"ForStatement","src":"9473:535:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3063,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10021:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10043:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10021:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3095,"nodeType":"IfStatement","src":"10018:463:9","trueBody":{"id":3094,"nodeType":"Block","src":"10046:435:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10309:20:9","subExpression":{"argumentTypes":null,"id":3070,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10310:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3069,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10304:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3072,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10304:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3066,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10274:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sellAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":285,"src":"10274:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":3073,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10274:57:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3074,"nodeType":"ExpressionStatement","src":"10274:57:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3077,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3075,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10348:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3076,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10358:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10348:11:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3093,"nodeType":"IfStatement","src":"10345:126:9","trueBody":{"id":3092,"nodeType":"Block","src":"10361:110:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3083,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"10428:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"10428:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10445:8:9","subExpression":{"argumentTypes":null,"id":3086,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10446:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3085,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10440:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10440:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3079,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3080,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"10387:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":3081,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":3082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"10387:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3089,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:68:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3078,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"10379:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3090,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10379:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3091,"nodeType":"ExpressionStatement","src":"10379:77:9"}]}}]}}]},"documentation":null,"id":3097,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"tradeImpl","nodeType":"FunctionDefinition","parameters":{"id":2883,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2877,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":3097,"src":"8436:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2876,"name":"uint8","nodeType":"ElementaryTypeName","src":"8436:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2880,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3097,"src":"8456:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2878,"name":"int","nodeType":"ElementaryTypeName","src":"8456:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2879,"length":null,"nodeType":"ArrayTypeName","src":"8456:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2882,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3097,"src":"8483:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2881,"name":"int","nodeType":"ElementaryTypeName","src":"8483:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8435:68:9"},"payable":false,"returnParameters":{"id":2890,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2885,"name":"netCost","nodeType":"VariableDeclaration","scope":3097,"src":"8537:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2884,"name":"int","nodeType":"ElementaryTypeName","src":"8537:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2887,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":3097,"src":"8550:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2886,"name":"int","nodeType":"ElementaryTypeName","src":"8550:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2889,"name":"fees","nodeType":"VariableDeclaration","scope":3097,"src":"8575:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2888,"name":"uint","nodeType":"ElementaryTypeName","src":"8575:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8536:49:9"},"scope":3112,"src":"8417:2070:9","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3110,"nodeType":"Block","src":"10742:58:9","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3104,"name":"outcomeTokenCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3099,"src":"10759:16:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":3105,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"10778:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:22:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":3107,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"10784:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:34:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3103,"id":3109,"nodeType":"Return","src":"10752:41:9"}]},"documentation":"@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade","id":3111,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":3100,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3099,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":3111,"src":"10664:21:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3098,"name":"uint","nodeType":"ElementaryTypeName","src":"10664:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10663:23:9"},"payable":false,"returnParameters":{"id":3103,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3102,"name":"","nodeType":"VariableDeclaration","scope":3111,"src":"10732:4:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3101,"name":"uint","nodeType":"ElementaryTypeName","src":"10732:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10731:6:9"},"scope":3112,"src":"10641:159:9","stateMutability":"view","superFunction":2237,"visibility":"public"}],"scope":3113,"src":"1077:9725:9"}],"src":"0:10803:9"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.005Z"}; /***/ }), @@ -429,10 +747,21 @@ module.exports = {"contract_name":"StandardMarket","abi":[{"constant":true,"inpu /*!*****************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketFactory.json ***! \*****************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"StandardMarketFactory","abi":[{"constant":false,"inputs":[{"name":"eventContract","type":"address"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"}],"name":"createMarket","outputs":[{"name":"market","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"market","type":"address"},{"indexed":false,"name":"eventContract","type":"address"},{"indexed":false,"name":"marketMaker","type":"address"},{"indexed":false,"name":"fee","type":"uint24"}],"name":"StandardMarketCreation","type":"event"}],"networks":{"1":{"address":"0xdde21f8be9e50b9b1165ee302e6b468cf30e4c4c","updated_at":1513984936000},"3":{"address":"0x11b5257396f156027b9232da7220bd7447282db6","updated_at":1503605014192},"4":{"address":"0xeaa325bacae405fd5b45e9cf695d391f1c624a2f","updated_at":1503603856238},"42":{"address":"0x5acfa40d828f2d3a88b49ff4da31b868380ce414","updated_at":1503602339891},"437894314312":{"address":"0xe982e462b094850f12af94d21d470e21be9d0e9c","updated_at":1507361155411}},"schema_version":"0.0.5","updated_at":1543915159055}; +module.exports = {"contractName":"StandardMarketFactory","abi":[{"constant":true,"inputs":[],"name":"standardMarketMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_standardMarketMasterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"market","type":"address"},{"indexed":false,"name":"eventContract","type":"address"},{"indexed":false,"name":"marketMaker","type":"address"},{"indexed":false,"name":"fee","type":"uint24"}],"name":"StandardMarketCreation","type":"event"},{"constant":false,"inputs":[{"name":"eventContract","type":"address"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"}],"name":"createMarket","outputs":[{"name":"market","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50604051602080610cd683398101806040528101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610c53806100836000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635f78e700146100515780637abeb6a0146100a8575b600080fd5b34801561005d57600080fd5b5061006661015a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b50610118600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919050505061017f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16338585856101af6103a9565b808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff1662ffffff16815260200195505050505050604051809103906000f0801580156102ab573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167fa88e14227921dd3cab0fe30e6e4e4f8d646d8968abd25634fe49781588a8cf9482868686604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff1662ffffff16815260200194505050505060405180910390a29392505050565b60405161086e806103ba833901905600608060405234801561001057600080fd5b5060405160a08061086e83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508460008173ffffffffffffffffffffffffffffffffffffffff161415151561008257600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008373ffffffffffffffffffffffffffffffffffffffff1614158015610101575060008273ffffffffffffffffffffffffffffffffffffffff1614155b80156101195750620f424062ffffff168162ffffff16105b151561012457600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561023357600080fd5b505af1158015610247573d6000803e3d6000fd5b505050506040513d602081101561025d57600080fd5b810190808051906020019092919050505060ff1660405190808252806020026020018201604052801561029f5781602001602082028038833980820191505090505b50600690805190602001906102b5929190610344565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561033557fe5b021790555050505050506103b6565b828054828255906000526020600020908101928215610380579160200282015b8281111561037f578251825591602001919060010190610364565b5b50905061038d9190610391565b5090565b6103b391905b808211156103af576000816000905550600101610397565b5090565b90565b6104a9806103c56000396000f3006080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100f25780631f21f9af1461014957806359acb42c146101a0578063a157979c146101cb578063a619486e1461020c578063c040e6b814610263578063cb4c86b71461029c578063ddca3f43146102c7578063e274fd24146102fc578063fbde47f614610353575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100ed573d6000f35b3d6000fd5b3480156100fe57600080fd5b50610107610388565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015557600080fd5b5061015e6103ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ac57600080fd5b506101b56103d4565b6040518082815260200191505060405180910390f35b3480156101d757600080fd5b506101f6600480360381019080803590602001909291905050506103da565b6040518082815260200191505060405180910390f35b34801561021857600080fd5b506102216103fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026f57600080fd5b50610278610422565b6040518082600281111561028857fe5b60ff16815260200191505060405180910390f35b3480156102a857600080fd5b506102b1610435565b6040518082815260200191505060405180910390f35b3480156102d357600080fd5b506102dc61043b565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561030857600080fd5b50610311610450565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035f57600080fd5b50610368610476565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6006818154811015156103e957fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60055481565b600460149054906101000a900462ffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a7230582084c0e07b43116ca5cd12fa2ca3e9a7479497ba4538cc77646fabcfa0d8e8b33c0029a165627a7a72305820917b2fa0cf8ef19808c863791eff5bea4e13f083c96942ddf5093e7cffb03b6c0029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635f78e700146100515780637abeb6a0146100a8575b600080fd5b34801561005d57600080fd5b5061006661015a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b50610118600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919050505061017f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16338585856101af6103a9565b808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff1662ffffff16815260200195505050505050604051809103906000f0801580156102ab573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167fa88e14227921dd3cab0fe30e6e4e4f8d646d8968abd25634fe49781588a8cf9482868686604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff1662ffffff16815260200194505050505060405180910390a29392505050565b60405161086e806103ba833901905600608060405234801561001057600080fd5b5060405160a08061086e83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508460008173ffffffffffffffffffffffffffffffffffffffff161415151561008257600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008373ffffffffffffffffffffffffffffffffffffffff1614158015610101575060008273ffffffffffffffffffffffffffffffffffffffff1614155b80156101195750620f424062ffffff168162ffffff16105b151561012457600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561023357600080fd5b505af1158015610247573d6000803e3d6000fd5b505050506040513d602081101561025d57600080fd5b810190808051906020019092919050505060ff1660405190808252806020026020018201604052801561029f5781602001602082028038833980820191505090505b50600690805190602001906102b5929190610344565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561033557fe5b021790555050505050506103b6565b828054828255906000526020600020908101928215610380579160200282015b8281111561037f578251825591602001919060010190610364565b5b50905061038d9190610391565b5090565b6103b391905b808211156103af576000816000905550600101610397565b5090565b90565b6104a9806103c56000396000f3006080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100f25780631f21f9af1461014957806359acb42c146101a0578063a157979c146101cb578063a619486e1461020c578063c040e6b814610263578063cb4c86b71461029c578063ddca3f43146102c7578063e274fd24146102fc578063fbde47f614610353575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100ed573d6000f35b3d6000fd5b3480156100fe57600080fd5b50610107610388565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015557600080fd5b5061015e6103ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ac57600080fd5b506101b56103d4565b6040518082815260200191505060405180910390f35b3480156101d757600080fd5b506101f6600480360381019080803590602001909291905050506103da565b6040518082815260200191505060405180910390f35b34801561021857600080fd5b506102216103fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026f57600080fd5b50610278610422565b6040518082600281111561028857fe5b60ff16815260200191505060405180910390f35b3480156102a857600080fd5b506102b1610435565b6040518082815260200191505060405180910390f35b3480156102d357600080fd5b506102dc61043b565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561030857600080fd5b50610311610450565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035f57600080fd5b50610368610476565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6006818154811015156103e957fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60055481565b600460149054906101000a900462ffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a7230582084c0e07b43116ca5cd12fa2ca3e9a7479497ba4538cc77646fabcfa0d8e8b33c0029a165627a7a72305820917b2fa0cf8ef19808c863791eff5bea4e13f083c96942ddf5093e7cffb03b6c0029","sourceMap":"185:1026:10:-;;;510:130;8:9:-1;5:2;;;30:1;27;20:12;5:2;510:130:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;608:25;581:24;;:52;;;;;;;;;;;;;;;;;;510:130;185:1026;;;;;;","deployedSourceMap":"185:1026:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;417:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;417:46:10;;;;;;;;;;;;;;;;;;;;;;;;;;;844:365;;8:9:-1;5:2;;;30:1;27;20:12;5:2;844:365:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;417:46;;;;;;;;;;;;;:::o;844:365::-;956:21;1041:24;;;;;;;;;;;1067:10;1079:13;1094:11;1107:3;1017:94;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1017:94:10;993:119;;1150:10;1127:75;;;1162:6;1170:13;1185:11;1198:3;1127:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;844:365;;;;;:::o;185:1026::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/StandardMarket.sol\";\n\n\n/// @title Market factory contract - Allows to create market contracts\n/// @author Stefan George - \ncontract StandardMarketFactory {\n\n /*\n * Events\n */\n event StandardMarketCreation(address indexed creator, Market market, Event eventContract, MarketMaker marketMaker, uint24 fee);\n\n /*\n * Storage\n */\n StandardMarket public standardMarketMasterCopy;\n\n /*\n * Public functions\n */\n constructor(StandardMarket _standardMarketMasterCopy) public {\n standardMarketMasterCopy = _standardMarketMasterCopy;\n }\n\n /// @dev Creates a new market contract\n /// @param eventContract Event contract\n /// @param marketMaker Market maker contract\n /// @param fee Market fee\n /// @return Market contract\n function createMarket(Event eventContract, MarketMaker marketMaker, uint24 fee)\n public\n returns (StandardMarket market)\n {\n market = StandardMarket(new StandardMarketProxy(standardMarketMasterCopy, msg.sender, eventContract, marketMaker, fee));\n emit StandardMarketCreation(msg.sender, market, eventContract, marketMaker, fee);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","exportedSymbols":{"StandardMarketFactory":[3175]},"id":3176,"nodeType":"SourceUnit","nodes":[{"id":3114,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:10"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","file":"../Markets/StandardMarket.sol","id":3115,"nodeType":"ImportDirective","scope":3176,"sourceUnit":3113,"src":"25:39:10","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[2326],"contractKind":"contract","documentation":"@title Market factory contract - Allows to create market contracts\n @author Stefan George - ","fullyImplemented":true,"id":3175,"linearizedBaseContracts":[3175],"name":"StandardMarketFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3127,"name":"StandardMarketCreation","nodeType":"EventDefinition","parameters":{"id":3126,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3117,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":3127,"src":"282:23:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3116,"name":"address","nodeType":"ElementaryTypeName","src":"282:7:10","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3119,"indexed":false,"name":"market","nodeType":"VariableDeclaration","scope":3127,"src":"307:13:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":3118,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"307:6:10","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":3121,"indexed":false,"name":"eventContract","nodeType":"VariableDeclaration","scope":3127,"src":"322:19:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3120,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"322:5:10","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3123,"indexed":false,"name":"marketMaker","nodeType":"VariableDeclaration","scope":3127,"src":"343:23:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3122,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"343:11:10","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3125,"indexed":false,"name":"fee","nodeType":"VariableDeclaration","scope":3127,"src":"368:10:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3124,"name":"uint24","nodeType":"ElementaryTypeName","src":"368:6:10","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"281:98:10"},"src":"253:127:10"},{"constant":false,"id":3129,"name":"standardMarketMasterCopy","nodeType":"VariableDeclaration","scope":3175,"src":"417:46:10","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},"typeName":{"contractScope":null,"id":3128,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"417:14:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"value":null,"visibility":"public"},{"body":{"id":3138,"nodeType":"Block","src":"571:69:10","statements":[{"expression":{"argumentTypes":null,"id":3136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3134,"name":"standardMarketMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3129,"src":"581:24:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3135,"name":"_standardMarketMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3131,"src":"608:25:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"581:52:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3137,"nodeType":"ExpressionStatement","src":"581:52:10"}]},"documentation":null,"id":3139,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3132,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3131,"name":"_standardMarketMasterCopy","nodeType":"VariableDeclaration","scope":3139,"src":"522:40:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},"typeName":{"contractScope":null,"id":3130,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"522:14:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"value":null,"visibility":"internal"}],"src":"521:42:10"},"payable":false,"returnParameters":{"id":3133,"nodeType":"ParameterList","parameters":[],"src":"571:0:10"},"scope":3175,"src":"510:130:10","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3173,"nodeType":"Block","src":"983:226:10","statements":[{"expression":{"argumentTypes":null,"id":3162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3150,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3148,"src":"993:6:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3154,"name":"standardMarketMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3129,"src":"1041:24:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3155,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1067:3:10","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3156,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1067:10:10","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3157,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3141,"src":"1079:13:10","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3158,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3143,"src":"1094:11:10","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3159,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3145,"src":"1107:3:10","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"id":3153,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1017:23:10","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$_t_contract$_StandardMarketProxy_$2326_$","typeString":"function (address,address,contract Event,contract MarketMaker,uint24) returns (contract StandardMarketProxy)"},"typeName":{"contractScope":null,"id":3152,"name":"StandardMarketProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":2326,"src":"1021:19:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}}},"id":3160,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1017:94:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}],"id":3151,"name":"StandardMarket","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3112,"src":"1002:14:10","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarket_$3112_$","typeString":"type(contract StandardMarket)"}},"id":3161,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1002:110:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"993:119:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3163,"nodeType":"ExpressionStatement","src":"993:119:10"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3165,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1150:3:10","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3166,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1150:10:10","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3167,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3148,"src":"1162:6:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":3168,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3141,"src":"1170:13:10","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3169,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3143,"src":"1185:11:10","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3170,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3145,"src":"1198:3:10","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"id":3164,"name":"StandardMarketCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3127,"src":"1127:22:10","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_Market_$2238_$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$__$","typeString":"function (address,contract Market,contract Event,contract MarketMaker,uint24)"}},"id":3171,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1127:75:10","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3172,"nodeType":"EmitStatement","src":"1122:80:10"}]},"documentation":"@dev Creates a new market contract\n @param eventContract Event contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @return Market contract","id":3174,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":3146,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3141,"name":"eventContract","nodeType":"VariableDeclaration","scope":3174,"src":"866:19:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3140,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"866:5:10","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3143,"name":"marketMaker","nodeType":"VariableDeclaration","scope":3174,"src":"887:23:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3142,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"887:11:10","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3145,"name":"fee","nodeType":"VariableDeclaration","scope":3174,"src":"912:10:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3144,"name":"uint24","nodeType":"ElementaryTypeName","src":"912:6:10","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"865:58:10"},"payable":false,"returnParameters":{"id":3149,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3148,"name":"market","nodeType":"VariableDeclaration","scope":3174,"src":"956:21:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},"typeName":{"contractScope":null,"id":3147,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"956:14:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"value":null,"visibility":"internal"}],"src":"955:23:10"},"scope":3175,"src":"844:365:10","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3176,"src":"185:1026:10"}],"src":"0:1212:10"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketFactory.sol","exportedSymbols":{"StandardMarketFactory":[3175]},"id":3176,"nodeType":"SourceUnit","nodes":[{"id":3114,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:10"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","file":"../Markets/StandardMarket.sol","id":3115,"nodeType":"ImportDirective","scope":3176,"sourceUnit":3113,"src":"25:39:10","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[2326],"contractKind":"contract","documentation":"@title Market factory contract - Allows to create market contracts\n @author Stefan George - ","fullyImplemented":true,"id":3175,"linearizedBaseContracts":[3175],"name":"StandardMarketFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3127,"name":"StandardMarketCreation","nodeType":"EventDefinition","parameters":{"id":3126,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3117,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":3127,"src":"282:23:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3116,"name":"address","nodeType":"ElementaryTypeName","src":"282:7:10","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3119,"indexed":false,"name":"market","nodeType":"VariableDeclaration","scope":3127,"src":"307:13:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":3118,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"307:6:10","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":3121,"indexed":false,"name":"eventContract","nodeType":"VariableDeclaration","scope":3127,"src":"322:19:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3120,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"322:5:10","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3123,"indexed":false,"name":"marketMaker","nodeType":"VariableDeclaration","scope":3127,"src":"343:23:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3122,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"343:11:10","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3125,"indexed":false,"name":"fee","nodeType":"VariableDeclaration","scope":3127,"src":"368:10:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3124,"name":"uint24","nodeType":"ElementaryTypeName","src":"368:6:10","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"281:98:10"},"src":"253:127:10"},{"constant":false,"id":3129,"name":"standardMarketMasterCopy","nodeType":"VariableDeclaration","scope":3175,"src":"417:46:10","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},"typeName":{"contractScope":null,"id":3128,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"417:14:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"value":null,"visibility":"public"},{"body":{"id":3138,"nodeType":"Block","src":"571:69:10","statements":[{"expression":{"argumentTypes":null,"id":3136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3134,"name":"standardMarketMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3129,"src":"581:24:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3135,"name":"_standardMarketMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3131,"src":"608:25:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"581:52:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3137,"nodeType":"ExpressionStatement","src":"581:52:10"}]},"documentation":null,"id":3139,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3132,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3131,"name":"_standardMarketMasterCopy","nodeType":"VariableDeclaration","scope":3139,"src":"522:40:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},"typeName":{"contractScope":null,"id":3130,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"522:14:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"value":null,"visibility":"internal"}],"src":"521:42:10"},"payable":false,"returnParameters":{"id":3133,"nodeType":"ParameterList","parameters":[],"src":"571:0:10"},"scope":3175,"src":"510:130:10","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3173,"nodeType":"Block","src":"983:226:10","statements":[{"expression":{"argumentTypes":null,"id":3162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3150,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3148,"src":"993:6:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3154,"name":"standardMarketMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3129,"src":"1041:24:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3155,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1067:3:10","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3156,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1067:10:10","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3157,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3141,"src":"1079:13:10","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3158,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3143,"src":"1094:11:10","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3159,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3145,"src":"1107:3:10","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"id":3153,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1017:23:10","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$_t_contract$_StandardMarketProxy_$2326_$","typeString":"function (address,address,contract Event,contract MarketMaker,uint24) returns (contract StandardMarketProxy)"},"typeName":{"contractScope":null,"id":3152,"name":"StandardMarketProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":2326,"src":"1021:19:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}}},"id":3160,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1017:94:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}],"id":3151,"name":"StandardMarket","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3112,"src":"1002:14:10","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarket_$3112_$","typeString":"type(contract StandardMarket)"}},"id":3161,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1002:110:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"src":"993:119:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3163,"nodeType":"ExpressionStatement","src":"993:119:10"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3165,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1150:3:10","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3166,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1150:10:10","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3167,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3148,"src":"1162:6:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":3168,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3141,"src":"1170:13:10","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3169,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3143,"src":"1185:11:10","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3170,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3145,"src":"1198:3:10","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"}],"id":3164,"name":"StandardMarketCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3127,"src":"1127:22:10","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_Market_$2238_$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$returns$__$","typeString":"function (address,contract Market,contract Event,contract MarketMaker,uint24)"}},"id":3171,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1127:75:10","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3172,"nodeType":"EmitStatement","src":"1122:80:10"}]},"documentation":"@dev Creates a new market contract\n @param eventContract Event contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @return Market contract","id":3174,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":3146,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3141,"name":"eventContract","nodeType":"VariableDeclaration","scope":3174,"src":"866:19:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3140,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"866:5:10","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3143,"name":"marketMaker","nodeType":"VariableDeclaration","scope":3174,"src":"887:23:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3142,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"887:11:10","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3145,"name":"fee","nodeType":"VariableDeclaration","scope":3174,"src":"912:10:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3144,"name":"uint24","nodeType":"ElementaryTypeName","src":"912:6:10","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"865:58:10"},"payable":false,"returnParameters":{"id":3149,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3148,"name":"market","nodeType":"VariableDeclaration","scope":3174,"src":"956:21:10","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},"typeName":{"contractScope":null,"id":3147,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"956:14:10","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"value":null,"visibility":"internal"}],"src":"955:23:10"},"scope":3175,"src":"844:365:10","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3176,"src":"185:1026:10"}],"src":"0:1212:10"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0x87443cf156a34459d86737c055beb80071f537cc","transactionHash":"0x1c5c2044833dbfb36af5e7dbde0820538cb20eb4d353362965c003af29dbb955"},"3":{"address":"0x09ab70447f3227288a9cdc3943a0e4d58c1e64e0","transactionHash":"0x72def640c22aa0b2c889319a1994a5fb9fba07b36221fc0be0b443b6b65db629"},"4":{"address":"0xf7bb4c73a0e194c9e11fe5a82f429a67e1788533","transactionHash":"0x55c72db1b219f5e2fcf3865293cca5a2065407f92ab5176aac85c4884593ccdc"},"42":{"address":"0x47421ed942a57e772dac036b937b7a64d5b11a03","transactionHash":"0x524ab23da4553330a03b207c2583109d39548cfed7685469beeea07378715c6b"},"437894314312":{"address":"0xfc628dd79137395f3c9744e33b1c5de554d94882","transactionHash":"0xd2b2d046c36114caad0f35e8122188ff2274363834216cee28be14e7df63589a"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:48.275Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketProxy.json": +/*!***************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketProxy.json ***! + \***************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"StandardMarketProxy","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"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":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"proxy","type":"address"},{"name":"_creator","type":"address"},{"name":"_eventContract","type":"address"},{"name":"_marketMaker","type":"address"},{"name":"_fee","type":"uint24"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"transactor","type":"address"},{"indexed":false,"name":"outcomeTokenAmounts","type":"int256[]"},{"indexed":false,"name":"outcomeTokenNetCost","type":"int256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenTrade","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160a08061086e83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508460008173ffffffffffffffffffffffffffffffffffffffff161415151561008257600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008373ffffffffffffffffffffffffffffffffffffffff1614158015610101575060008273ffffffffffffffffffffffffffffffffffffffff1614155b80156101195750620f424062ffffff168162ffffff16105b151561012457600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561023357600080fd5b505af1158015610247573d6000803e3d6000fd5b505050506040513d602081101561025d57600080fd5b810190808051906020019092919050505060ff1660405190808252806020026020018201604052801561029f5781602001602082028038833980820191505090505b50600690805190602001906102b5929190610344565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561033557fe5b021790555050505050506103b6565b828054828255906000526020600020908101928215610380579160200282015b8281111561037f578251825591602001919060010190610364565b5b50905061038d9190610391565b5090565b6103b391905b808211156103af576000816000905550600101610397565b5090565b90565b6104a9806103c56000396000f3006080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100f25780631f21f9af1461014957806359acb42c146101a0578063a157979c146101cb578063a619486e1461020c578063c040e6b814610263578063cb4c86b71461029c578063ddca3f43146102c7578063e274fd24146102fc578063fbde47f614610353575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100ed573d6000f35b3d6000fd5b3480156100fe57600080fd5b50610107610388565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015557600080fd5b5061015e6103ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ac57600080fd5b506101b56103d4565b6040518082815260200191505060405180910390f35b3480156101d757600080fd5b506101f6600480360381019080803590602001909291905050506103da565b6040518082815260200191505060405180910390f35b34801561021857600080fd5b506102216103fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026f57600080fd5b50610278610422565b6040518082600281111561028857fe5b60ff16815260200191505060405180910390f35b3480156102a857600080fd5b506102b1610435565b6040518082815260200191505060405180910390f35b3480156102d357600080fd5b506102dc61043b565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561030857600080fd5b50610311610450565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035f57600080fd5b50610368610476565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6006818154811015156103e957fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60055481565b600460149054906101000a900462ffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a7230582084c0e07b43116ca5cd12fa2ca3e9a7479497ba4538cc77646fabcfa0d8e8b33c0029","deployedBytecode":"0x6080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100f25780631f21f9af1461014957806359acb42c146101a0578063a157979c146101cb578063a619486e1461020c578063c040e6b814610263578063cb4c86b71461029c578063ddca3f43146102c7578063e274fd24146102fc578063fbde47f614610353575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146100ed573d6000f35b3d6000fd5b3480156100fe57600080fd5b50610107610388565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561015557600080fd5b5061015e6103ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101ac57600080fd5b506101b56103d4565b6040518082815260200191505060405180910390f35b3480156101d757600080fd5b506101f6600480360381019080803590602001909291905050506103da565b6040518082815260200191505060405180910390f35b34801561021857600080fd5b506102216103fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561026f57600080fd5b50610278610422565b6040518082600281111561028857fe5b60ff16815260200191505060405180910390f35b3480156102a857600080fd5b506102b1610435565b6040518082815260200191505060405180910390f35b3480156102d357600080fd5b506102dc61043b565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561030857600080fd5b50610311610450565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035f57600080fd5b50610368610476565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6006818154811015156103e957fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60055481565b600460149054906101000a900462ffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a7230582084c0e07b43116ca5cd12fa2ca3e9a7479497ba4538cc77646fabcfa0d8e8b33c0029","sourceMap":"317:631:9:-;;;393:553;8:9:-1;5:2;;;30:1;27;20:12;5:2;393:553:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;513:5;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;611:1:9;592:14;584:28;;;;:58;;;;;641:1;624:12;616:26;;;;584:58;:78;;;;;297:7;646:16;;:4;:16;;;584:78;576:87;;;;;;;;683:8;673:7;;:18;;;;;;;;;;;;;;;;;;718:12;701:14;:29;;;;756:14;740:13;;:30;;;;;;;;;;;;;;;;;;813:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;813:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;813:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;813:31:9;;;;;;;;;;;;;;;;803:42;;;;;;;;;;;;;;;;;;;;;;;;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;803:42:9;;;;780:20;:65;;;;;;;;;;;;:::i;:::-;;861:4;855:3;;:10;;;;;;;;;;;;;;;;;;889:12;875:11;;:26;;;;;;;;;;;;;;;;;;919:20;911:5;;:28;;;;;;;;;;;;;;;;;;;;;;;;393:553;;;;;317:631;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;","deployedSourceMap":"317:631:9:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;874:22:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;874:22:8;;;;;;;;;;;;;;;;;;;;;;;;;;;966:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;966:30:8;;;;;;;;;;;;;;;;;;;;;;;;;;;902:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;902:26:8;;;;;;;;;;;;;;;;;;;;;;;1050:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1050:33:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;1089:19:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:19:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1025;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1025:19:8;;;;;;;;;;;;;;;;;;;;;;;1002:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1002:17:8;;;;;;;;;;;;;;;;;;;;;;;;;;;934:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;934:26:8;;;;;;;;;;;;;;;;;;;;;;;;;;;262:42:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:42:9;;;;;;;;;;;;;;;;;;;;;;;;;;;874:22:8;;;;;;;;;;;;;:::o;966:30::-;;;;;;;;;;;;;:::o;902:26::-;;;;:::o;1050:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;1089:19:8:-;;;;;;;;;;;;;:::o;1025:::-;;;;:::o;1002:17::-;;;;;;;;;;;;;:::o;934:26::-;;;;;;;;;;;;;:::o;262:42:9:-;297:7;262:42;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/Market.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"../Events/Event.sol\";\nimport \"../MarketMakers/MarketMaker.sol\";\n\n\ncontract StandardMarketData {\n /*\n * Constants\n */\n uint24 public constant FEE_RANGE = 1000000; // 100%\n}\n\ncontract StandardMarketProxy is Proxy, MarketData, StandardMarketData {\n constructor(address proxy, address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee)\n Proxy(proxy)\n public\n {\n // Validate inputs\n require(address(_eventContract) != 0 && address(_marketMaker) != 0 && _fee < FEE_RANGE);\n creator = _creator;\n createdAtBlock = block.number;\n eventContract = _eventContract;\n netOutcomeTokensSold = new int[](eventContract.getOutcomeCount());\n fee = _fee;\n marketMaker = _marketMaker;\n stage = Stages.MarketCreated;\n }\n}\n\n/// @title Standard market contract - Backed implementation of standard markets\n/// @author Stefan George - \ncontract StandardMarket is Proxied, Market, StandardMarketData {\n using SafeMath for *;\n\n /*\n * Modifiers\n */\n modifier isCreator() {\n // Only creator is allowed to proceed\n require(msg.sender == creator);\n _;\n }\n\n modifier atStage(Stages _stage) {\n // Contract has to be in given stage\n require(stage == _stage);\n _;\n }\n\n /*\n * Public functions\n */\n /// @dev Allows to fund the market with collateral tokens converting them into outcome tokens\n /// @param _funding Funding amount\n function fund(uint _funding)\n public\n isCreator\n atStage(Stages.MarketCreated)\n {\n // Request collateral tokens and allow event contract to transfer them to buy all outcomes\n require( eventContract.collateralToken().transferFrom(msg.sender, this, _funding)\n && eventContract.collateralToken().approve(eventContract, _funding));\n eventContract.buyAllOutcomes(_funding);\n funding = _funding;\n stage = Stages.MarketFunded;\n emit MarketFunding(funding);\n }\n\n /// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator\n function close()\n public\n isCreator\n atStage(Stages.MarketFunded)\n {\n uint8 outcomeCount = eventContract.getOutcomeCount();\n for (uint8 i = 0; i < outcomeCount; i++)\n require(eventContract.outcomeTokens(i).transfer(creator, eventContract.outcomeTokens(i).balanceOf(this)));\n stage = Stages.MarketClosed;\n emit MarketClosing();\n }\n\n /// @dev Allows market creator to withdraw fees generated by trades\n /// @return Fee amount\n function withdrawFees()\n public\n isCreator\n returns (uint fees)\n {\n fees = eventContract.collateralToken().balanceOf(this);\n // Transfer fees\n require(eventContract.collateralToken().transfer(creator, fees));\n emit FeeWithdrawal(fees);\n }\n\n /// @dev Allows to buy outcome tokens from market maker\n /// @param outcomeTokenIndex Index of the outcome token to buy\n /// @param outcomeTokenCount Amount of outcome tokens to buy\n /// @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n /// @return Cost in collateral tokens\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost)\n public\n atStage(Stages.MarketFunded)\n returns (uint cost)\n {\n require(int(outcomeTokenCount) >= 0 && int(maxCost) > 0);\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenIndex >= 0 && outcomeTokenIndex < outcomeCount);\n int[] memory outcomeTokenAmounts = new int[](outcomeCount);\n outcomeTokenAmounts[outcomeTokenIndex] = int(outcomeTokenCount);\n (int netCost, int outcomeTokenNetCost, uint fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, int(maxCost));\n require(netCost >= 0 && outcomeTokenNetCost >= 0);\n cost = uint(netCost);\n emit OutcomeTokenPurchase(msg.sender, outcomeTokenIndex, outcomeTokenCount, uint(outcomeTokenNetCost), fees);\n }\n\n /// @dev Allows to sell outcome tokens to market maker\n /// @param outcomeTokenIndex Index of the outcome token to sell\n /// @param outcomeTokenCount Amount of outcome tokens to sell\n /// @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n /// @return Profit in collateral tokens\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n atStage(Stages.MarketFunded)\n returns (uint profit)\n {\n require(-int(outcomeTokenCount) <= 0 && -int(minProfit) < 0);\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenIndex >= 0 && outcomeTokenIndex < outcomeCount);\n int[] memory outcomeTokenAmounts = new int[](outcomeCount);\n outcomeTokenAmounts[outcomeTokenIndex] = -int(outcomeTokenCount);\n (int netCost, int outcomeTokenNetCost, uint fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, -int(minProfit));\n require(netCost <= 0 && outcomeTokenNetCost <= 0);\n profit = uint(-netCost);\n emit OutcomeTokenSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, uint(-outcomeTokenNetCost), fees);\n }\n\n /// @dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n /// shares of all other outcome tokens.\n /// @param outcomeTokenIndex Index of the outcome token to short sell\n /// @param outcomeTokenCount Amount of outcome tokens to short sell\n /// @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n /// @return Cost to short sell outcome in collateral tokens\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint cost)\n {\n // Buy all outcomes\n require( eventContract.collateralToken().transferFrom(msg.sender, this, outcomeTokenCount)\n && eventContract.collateralToken().approve(eventContract, outcomeTokenCount));\n eventContract.buyAllOutcomes(outcomeTokenCount);\n // Short sell selected outcome\n eventContract.outcomeTokens(outcomeTokenIndex).approve(this, outcomeTokenCount);\n uint profit = this.sell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n cost = outcomeTokenCount - profit;\n // Transfer outcome tokens to buyer\n uint8 outcomeCount = eventContract.getOutcomeCount();\n for (uint8 i = 0; i < outcomeCount; i++)\n if (i != outcomeTokenIndex)\n require(eventContract.outcomeTokens(i).transfer(msg.sender, outcomeTokenCount));\n // Send change back to buyer\n require(eventContract.collateralToken().transfer(msg.sender, profit));\n emit OutcomeTokenShortSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);\n }\n\n /// @dev Allows to trade outcome tokens and collateral with the market maker\n /// @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n /// @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n /// @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.\n function trade(int[] outcomeTokenAmounts, int collateralLimit)\n public\n atStage(Stages.MarketFunded)\n returns (int netCost)\n {\n uint8 outcomeCount = eventContract.getOutcomeCount();\n require(outcomeTokenAmounts.length == outcomeCount);\n\n int outcomeTokenNetCost;\n uint fees;\n (netCost, outcomeTokenNetCost, fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, collateralLimit);\n\n emit OutcomeTokenTrade(msg.sender, outcomeTokenAmounts, outcomeTokenNetCost, fees);\n }\n\n function tradeImpl(uint8 outcomeCount, int[] outcomeTokenAmounts, int collateralLimit)\n private\n returns (int netCost, int outcomeTokenNetCost, uint fees)\n {\n // Calculate net cost for executing trade\n outcomeTokenNetCost = marketMaker.calcNetCost(this, outcomeTokenAmounts);\n if(outcomeTokenNetCost < 0)\n fees = calcMarketFee(uint(-outcomeTokenNetCost));\n else\n fees = calcMarketFee(uint(outcomeTokenNetCost));\n\n require(int(fees) >= 0);\n netCost = outcomeTokenNetCost.add(int(fees));\n\n require(\n (collateralLimit != 0 && netCost <= collateralLimit) ||\n collateralLimit == 0\n );\n\n if(outcomeTokenNetCost > 0) {\n require(\n eventContract.collateralToken().transferFrom(msg.sender, this, uint(netCost)) &&\n eventContract.collateralToken().approve(eventContract, uint(outcomeTokenNetCost))\n );\n\n eventContract.buyAllOutcomes(uint(outcomeTokenNetCost));\n }\n\n for (uint8 i = 0; i < outcomeCount; i++) {\n if(outcomeTokenAmounts[i] != 0) {\n if(outcomeTokenAmounts[i] < 0) {\n require(eventContract.outcomeTokens(i).transferFrom(msg.sender, this, uint(-outcomeTokenAmounts[i])));\n } else {\n require(eventContract.outcomeTokens(i).transfer(msg.sender, uint(outcomeTokenAmounts[i])));\n }\n\n netOutcomeTokensSold[i] = netOutcomeTokensSold[i].add(outcomeTokenAmounts[i]);\n }\n }\n\n if(outcomeTokenNetCost < 0) {\n // This is safe since\n // 0x8000000000000000000000000000000000000000000000000000000000000000 ==\n // uint(-int(-0x8000000000000000000000000000000000000000000000000000000000000000))\n eventContract.sellAllOutcomes(uint(-outcomeTokenNetCost));\n if(netCost < 0) {\n require(eventContract.collateralToken().transfer(msg.sender, uint(-netCost)));\n }\n }\n }\n\n /// @dev Calculates fee to be paid to market maker\n /// @param outcomeTokenCost Cost for buying outcome tokens\n /// @return Fee for trade\n function calcMarketFee(uint outcomeTokenCost)\n public\n view\n returns (uint)\n {\n return outcomeTokenCost * fee / FEE_RANGE;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","exportedSymbols":{"StandardMarket":[3112],"StandardMarketData":[2248],"StandardMarketProxy":[2326]},"id":3113,"nodeType":"SourceUnit","nodes":[{"id":2240,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:9"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","file":"../Markets/Market.sol","id":2241,"nodeType":"ImportDirective","scope":3113,"sourceUnit":2239,"src":"25:31:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":2242,"nodeType":"ImportDirective","scope":3113,"sourceUnit":7329,"src":"57:63:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2243,"nodeType":"ImportDirective","scope":3113,"sourceUnit":385,"src":"121:29:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2244,"nodeType":"ImportDirective","scope":3113,"sourceUnit":1572,"src":"151:41:9","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2248,"linearizedBaseContracts":[2248],"name":"StandardMarketData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":2247,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":2248,"src":"262:42:9","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2245,"name":"uint24","nodeType":"ElementaryTypeName","src":"262:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":2246,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"297:7:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"}],"scope":3113,"src":"195:120:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2249,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"349:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":2250,"nodeType":"InheritanceSpecifier","src":"349:5:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2251,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"356:10:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2252,"nodeType":"InheritanceSpecifier","src":"356:10:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2253,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"368:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2254,"nodeType":"InheritanceSpecifier","src":"368:18:9"}],"contractDependencies":[2172,2248,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2326,"linearizedBaseContracts":[2326,2248,2172,6701,6673],"name":"StandardMarketProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":2324,"nodeType":"Block","src":"539:407:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2272,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"592:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":2271,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"584:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2273,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"584:23:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2274,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"611:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"584:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2277,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"624:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":2276,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"616:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2278,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"616:21:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2279,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"641:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"616:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":2284,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2282,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"646:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2283,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"653:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"646:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:78:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2270,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"576:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"576:87:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2287,"nodeType":"ExpressionStatement","src":"576:87:9"},{"expression":{"argumentTypes":null,"id":2290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2288,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"673:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2289,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2258,"src":"683:8:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"673:18:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":2291,"nodeType":"ExpressionStatement","src":"673:18:9"},{"expression":{"argumentTypes":null,"id":2295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2292,"name":"createdAtBlock","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2154,"src":"701:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2293,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"718:5:9","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":2294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"718:12:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2296,"nodeType":"ExpressionStatement","src":"701:29:9"},{"expression":{"argumentTypes":null,"id":2299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2297,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"740:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2298,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"756:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"740:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2300,"nodeType":"ExpressionStatement","src":"740:30:9"},{"expression":{"argumentTypes":null,"id":2309,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2301,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"780:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2305,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"813:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"813:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2307,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"813:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2304,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"803:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2302,"name":"int","nodeType":"ElementaryTypeName","src":"807:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2303,"length":null,"nodeType":"ArrayTypeName","src":"807:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2308,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"803:42:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"src":"780:65:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":2310,"nodeType":"ExpressionStatement","src":"780:65:9"},{"expression":{"argumentTypes":null,"id":2313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2311,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"855:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2312,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"861:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"855:10:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":2314,"nodeType":"ExpressionStatement","src":"855:10:9"},{"expression":{"argumentTypes":null,"id":2317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2315,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"875:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2316,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"889:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"875:26:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2318,"nodeType":"ExpressionStatement","src":"875:26:9"},{"expression":{"argumentTypes":null,"id":2322,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2319,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"911:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2320,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"919:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2321,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"919:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"911:28:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2323,"nodeType":"ExpressionStatement","src":"911:28:9"}]},"documentation":null,"id":2325,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":2267,"name":"proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2256,"src":"513:5:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":2268,"modifierName":{"argumentTypes":null,"id":2266,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"507:5:9","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"507:12:9"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":2265,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2256,"name":"proxy","nodeType":"VariableDeclaration","scope":2325,"src":"405:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2255,"name":"address","nodeType":"ElementaryTypeName","src":"405:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2258,"name":"_creator","nodeType":"VariableDeclaration","scope":2325,"src":"420:16:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2257,"name":"address","nodeType":"ElementaryTypeName","src":"420:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2260,"name":"_eventContract","nodeType":"VariableDeclaration","scope":2325,"src":"438:20:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2259,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"438:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2262,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":2325,"src":"460:24:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2261,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"460:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2264,"name":"_fee","nodeType":"VariableDeclaration","scope":2325,"src":"486:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2263,"name":"uint24","nodeType":"ElementaryTypeName","src":"486:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"404:94:9"},"payable":false,"returnParameters":{"id":2269,"nodeType":"ParameterList","parameters":[],"src":"539:0:9"},"scope":2326,"src":"393:553:9","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3113,"src":"317:631:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2327,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1104:7:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":2328,"nodeType":"InheritanceSpecifier","src":"1104:7:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2329,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"1113:6:9","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":2330,"nodeType":"InheritanceSpecifier","src":"1113:6:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2331,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"1121:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2332,"nodeType":"InheritanceSpecifier","src":"1121:18:9"}],"contractDependencies":[2172,2238,2248,6673],"contractKind":"contract","documentation":"@title Standard market contract - Backed implementation of standard markets\n @author Stefan George - ","fullyImplemented":true,"id":3112,"linearizedBaseContracts":[3112,2248,2238,2172,6673],"name":"StandardMarket","nodeType":"ContractDefinition","nodes":[{"id":2334,"libraryName":{"contractScope":null,"id":2333,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1152:8:9","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1146:21:9","typeName":null},{"body":{"id":2344,"nodeType":"Block","src":"1227:104:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2337,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1291:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2338,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1291:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2339,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"1305:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1291:21:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2336,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1283:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2341,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1283:30:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2342,"nodeType":"ExpressionStatement","src":"1283:30:9"},{"id":2343,"nodeType":"PlaceholderStatement","src":"1323:1:9"}]},"documentation":null,"id":2345,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":2335,"nodeType":"ParameterList","parameters":[],"src":"1224:2:9"},"src":"1206:125:9","visibility":"internal"},{"body":{"id":2356,"nodeType":"Block","src":"1369:97:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"id":2352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2350,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"1432:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2351,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2347,"src":"1441:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"1432:15:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2349,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1424:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2353,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1424:24:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2354,"nodeType":"ExpressionStatement","src":"1424:24:9"},{"id":2355,"nodeType":"PlaceholderStatement","src":"1458:1:9"}]},"documentation":null,"id":2357,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":2348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2347,"name":"_stage","nodeType":"VariableDeclaration","scope":2357,"src":"1354:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2346,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1354:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"internal"}],"src":"1353:15:9"},"src":"1337:129:9","visibility":"internal"},{"body":{"id":2407,"nodeType":"Block","src":"1753:434:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2385,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2373,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1918:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1918:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2375,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"1930:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2376,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"1936:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2369,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1873:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1873:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2371,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1873:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2377,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:72:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2382,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2383,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2020:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2378,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1965:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1965:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2381,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"1965:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2384,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:64:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1873:156:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2368,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1862:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2386,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1862:168:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2387,"nodeType":"ExpressionStatement","src":"1862:168:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2391,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2069:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2388,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2040:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"2040:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2392,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2040:38:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2393,"nodeType":"ExpressionStatement","src":"2040:38:9"},{"expression":{"argumentTypes":null,"id":2396,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2394,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2088:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2395,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2098:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2088:18:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2397,"nodeType":"ExpressionStatement","src":"2088:18:9"},{"expression":{"argumentTypes":null,"id":2401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2398,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2116:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2399,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2124:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2400,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2124:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2116:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2402,"nodeType":"ExpressionStatement","src":"2116:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2404,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2172:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2403,"name":"MarketFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2099,"src":"2158:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2405,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:22:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2406,"nodeType":"EmitStatement","src":"2153:27:9"}]},"documentation":"@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount","id":2408,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2362,"modifierName":{"argumentTypes":null,"id":2361,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"1701:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1701:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2364,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"1727:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2365,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2366,"modifierName":{"argumentTypes":null,"id":2363,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"1719:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"1719:29:9"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2360,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2359,"name":"_funding","nodeType":"VariableDeclaration","scope":2408,"src":"1663:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2358,"name":"uint","nodeType":"ElementaryTypeName","src":"1663:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1662:15:9"},"payable":false,"returnParameters":{"id":2367,"nodeType":"ParameterList","parameters":[],"src":"1753:0:9"},"scope":3112,"src":"1649:538:9","stateMutability":"nonpayable","superFunction":2179,"visibility":"public"},{"body":{"id":2459,"nodeType":"Block","src":"2400:304:9","statements":[{"assignments":[2418],"declarations":[{"constant":false,"id":2418,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2460,"src":"2410:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2417,"name":"uint8","nodeType":"ElementaryTypeName","src":"2410:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2422,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2419,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2431:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2431:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2421,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2431:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"2410:52:9"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2439,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"2573:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2445,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2623:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2442,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2610:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2440,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2582:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2582:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2443,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2444,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2582:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2446,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:46:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2436,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2561:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2434,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2533:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2533:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2437,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"2533:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:96:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2433,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2525:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2448,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2525:105:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2449,"nodeType":"ExpressionStatement","src":"2525:105:9"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2427,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2490:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2428,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2418,"src":"2494:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2490:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2450,"initializationExpression":{"assignments":[2424],"declarations":[{"constant":false,"id":2424,"name":"i","nodeType":"VariableDeclaration","scope":2460,"src":"2477:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2423,"name":"uint8","nodeType":"ElementaryTypeName","src":"2477:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2426,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2425,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2487:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2477:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2508:3:9","subExpression":{"argumentTypes":null,"id":2430,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2508:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2432,"nodeType":"ExpressionStatement","src":"2508:3:9"},"nodeType":"ForStatement","src":"2472:158:9"},{"expression":{"argumentTypes":null,"id":2454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2451,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2640:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2452,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2648:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2453,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2648:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2640:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2455,"nodeType":"ExpressionStatement","src":"2640:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":2456,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2101,"src":"2682:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":2457,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2682:15:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2458,"nodeType":"EmitStatement","src":"2677:20:9"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":2460,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2411,"modifierName":{"argumentTypes":null,"id":2410,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2349:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2349:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2413,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2375:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2414,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2375:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2415,"modifierName":{"argumentTypes":null,"id":2412,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"2367:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"2367:28:9"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2409,"nodeType":"ParameterList","parameters":[],"src":"2323:2:9"},"payable":false,"returnParameters":{"id":2416,"nodeType":"ParameterList","parameters":[],"src":"2400:0:9"},"scope":3112,"src":"2309:395:9","stateMutability":"nonpayable","superFunction":2182,"visibility":"public"},{"body":{"id":2490,"nodeType":"Block","src":"2898:204:9","statements":[{"expression":{"argumentTypes":null,"id":2474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2467,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"2908:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2472,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2957:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2468,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2915:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2469,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"2915:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2470,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2471,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"2915:41:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2908:54:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2475,"nodeType":"ExpressionStatement","src":"2908:54:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2481,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"3046:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2482,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3055:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2477,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2478,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3005:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2479,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2480,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3005:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:55:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2476,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2997:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2997:64:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2485,"nodeType":"ExpressionStatement","src":"2997:64:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2487,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3090:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2486,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2105,"src":"3076:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2488,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3076:19:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2489,"nodeType":"EmitStatement","src":"3071:24:9"}]},"documentation":"@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount","id":2491,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2463,"modifierName":{"argumentTypes":null,"id":2462,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2856:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2856:9:9"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2461,"nodeType":"ParameterList","parameters":[],"src":"2830:2:9"},"payable":false,"returnParameters":{"id":2466,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2465,"name":"fees","nodeType":"VariableDeclaration","scope":2491,"src":"2883:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2464,"name":"uint","nodeType":"ElementaryTypeName","src":"2883:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2882:11:9"},"scope":3112,"src":"2809:293:9","stateMutability":"nonpayable","superFunction":2187,"visibility":"public"},{"body":{"id":2595,"nodeType":"Block","src":"3589:680:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2517,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2508,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3611:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2507,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3607:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2509,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3607:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2510,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3633:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3607:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2516,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2513,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"3642:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2512,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3638:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2514,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3638:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2515,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3653:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3638:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3607:47:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2506,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3599:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2518,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3599:56:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2519,"nodeType":"ExpressionStatement","src":"3599:56:9"},{"assignments":[2521],"declarations":[{"constant":false,"id":2521,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2596,"src":"3665:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2520,"name":"uint8","nodeType":"ElementaryTypeName","src":"3665:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2525,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2522,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3686:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2523,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"3686:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3686:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"3665:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2533,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2527,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3735:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2528,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3756:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3735:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2532,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2530,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3761:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2531,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3781:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"3761:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3735:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2526,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3727:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2534,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3727:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2535,"nodeType":"ExpressionStatement","src":"3727:67:9"},{"assignments":[2539],"declarations":[{"constant":false,"id":2539,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2596,"src":"3804:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2537,"name":"int","nodeType":"ElementaryTypeName","src":"3804:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2538,"length":null,"nodeType":"ArrayTypeName","src":"3804:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2545,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2543,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3849:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2542,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3839:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2540,"name":"int","nodeType":"ElementaryTypeName","src":"3843:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2541,"length":null,"nodeType":"ArrayTypeName","src":"3843:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3839:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"3804:58:9"},{"expression":{"argumentTypes":null,"id":2552,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2546,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"3872:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2548,"indexExpression":{"argumentTypes":null,"id":2547,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3892:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3872:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2550,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3917:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2549,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2551,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3872:63:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2553,"nodeType":"ExpressionStatement","src":"3872:63:9"},{"assignments":[2555,2557,2559],"declarations":[{"constant":false,"id":2555,"name":"netCost","nodeType":"VariableDeclaration","scope":2596,"src":"3946:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2554,"name":"int","nodeType":"ElementaryTypeName","src":"3946:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2557,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2596,"src":"3959:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2556,"name":"int","nodeType":"ElementaryTypeName","src":"3959:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2559,"name":"fees","nodeType":"VariableDeclaration","scope":2596,"src":"3984:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2558,"name":"uint","nodeType":"ElementaryTypeName","src":"3984:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2567,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2561,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"4007:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2562,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"4021:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2564,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"4046:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2563,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4042:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2565,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4042:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2560,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"3997:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2566,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3997:58:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"3945:110:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2575,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2569,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4073:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4084:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4073:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2572,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4089:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2573,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4112:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4089:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4073:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2568,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4065:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2576,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4065:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2577,"nodeType":"ExpressionStatement","src":"4065:49:9"},{"expression":{"argumentTypes":null,"id":2582,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2578,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2504,"src":"4124:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2580,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4136:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4131:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2581,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4131:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4124:20:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2583,"nodeType":"ExpressionStatement","src":"4124:20:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2585,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4180:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4180:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2587,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"4192:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2588,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"4211:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2590,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4235:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2589,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4230:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2591,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4230:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2592,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2559,"src":"4257:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2584,"name":"OutcomeTokenPurchase","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2117,"src":"4159:20:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4159:103:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2594,"nodeType":"EmitStatement","src":"4154:108:9"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":2596,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2500,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"3536:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2501,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3536:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2502,"modifierName":{"argumentTypes":null,"id":2499,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"3528:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"3528:28:9"}],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2498,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2493,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2596,"src":"3442:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2492,"name":"uint8","nodeType":"ElementaryTypeName","src":"3442:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2495,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2596,"src":"3467:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2494,"name":"uint","nodeType":"ElementaryTypeName","src":"3467:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2497,"name":"maxCost","nodeType":"VariableDeclaration","scope":2596,"src":"3491:12:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2496,"name":"uint","nodeType":"ElementaryTypeName","src":"3491:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3441:63:9"},"payable":false,"returnParameters":{"id":2505,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2504,"name":"cost","nodeType":"VariableDeclaration","scope":2596,"src":"3574:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2503,"name":"uint","nodeType":"ElementaryTypeName","src":"3574:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3573:11:9"},"scope":3112,"src":"3429:840:9","stateMutability":"nonpayable","superFunction":2198,"visibility":"public"},{"body":{"id":2706,"nodeType":"Block","src":"4769:688:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2624,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2617,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4787:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2613,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"4792:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2612,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4788:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2614,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4788:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2616,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4814:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4787:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2623,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2621,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4819:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2619,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"4824:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2618,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2620,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2622,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4837:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4819:19:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4787:51:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2611,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2625,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4779:60:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2626,"nodeType":"ExpressionStatement","src":"4779:60:9"},{"assignments":[2628],"declarations":[{"constant":false,"id":2628,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2707,"src":"4849:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2627,"name":"uint8","nodeType":"ElementaryTypeName","src":"4849:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2632,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2629,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"4870:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"4870:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"4849:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2634,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4919:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2635,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4940:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4919:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2637,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4945:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2638,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"4965:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"4945:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4919:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4911:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2641,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4911:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2642,"nodeType":"ExpressionStatement","src":"4911:67:9"},{"assignments":[2646],"declarations":[{"constant":false,"id":2646,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2707,"src":"4988:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2644,"name":"int","nodeType":"ElementaryTypeName","src":"4988:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2645,"length":null,"nodeType":"ArrayTypeName","src":"4988:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2652,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2650,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5033:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2649,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"5023:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2647,"name":"int","nodeType":"ElementaryTypeName","src":"5027:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2648,"length":null,"nodeType":"ArrayTypeName","src":"5027:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2651,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5023:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"4988:58:9"},{"expression":{"argumentTypes":null,"id":2660,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2653,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5056:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2655,"indexExpression":{"argumentTypes":null,"id":2654,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5076:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5056:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2659,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5097:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2657,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5102:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5098:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5098:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5056:64:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2661,"nodeType":"ExpressionStatement","src":"5056:64:9"},{"assignments":[2663,2665,2667],"declarations":[{"constant":false,"id":2663,"name":"netCost","nodeType":"VariableDeclaration","scope":2707,"src":"5131:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2662,"name":"int","nodeType":"ElementaryTypeName","src":"5131:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2665,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2707,"src":"5144:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2664,"name":"int","nodeType":"ElementaryTypeName","src":"5144:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2667,"name":"fees","nodeType":"VariableDeclaration","scope":2707,"src":"5169:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2666,"name":"uint","nodeType":"ElementaryTypeName","src":"5169:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2676,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2669,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5192:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2670,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5206:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2674,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5227:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2672,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"5232:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2671,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5228:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2673,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5228:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2668,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"5182:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2675,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5182:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"5130:113:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2684,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2680,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2678,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5261:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2679,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5272:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5261:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2681,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5277:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5300:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5277:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5261:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2677,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5253:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2685,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5253:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2686,"nodeType":"ExpressionStatement","src":"5253:49:9"},{"expression":{"argumentTypes":null,"id":2692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2687,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2609,"src":"5312:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2690,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5326:8:9","subExpression":{"argumentTypes":null,"id":2689,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5327:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5321:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2691,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5321:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5312:23:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2693,"nodeType":"ExpressionStatement","src":"5312:23:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2695,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5367:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2696,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5367:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2697,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5379:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2698,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5398:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2701,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5422:20:9","subExpression":{"argumentTypes":null,"id":2700,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5423:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5417:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2702,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5417:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2703,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2667,"src":"5445:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2694,"name":"OutcomeTokenSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2129,"src":"5350:16:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2704,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5350:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2705,"nodeType":"EmitStatement","src":"5345:105:9"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":2707,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2605,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"4714:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2606,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4714:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2607,"modifierName":{"argumentTypes":null,"id":2604,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"4706:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"4706:28:9"}],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2603,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2598,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2707,"src":"4618:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2597,"name":"uint8","nodeType":"ElementaryTypeName","src":"4618:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2600,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2707,"src":"4643:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2599,"name":"uint","nodeType":"ElementaryTypeName","src":"4643:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2602,"name":"minProfit","nodeType":"VariableDeclaration","scope":2707,"src":"4667:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2601,"name":"uint","nodeType":"ElementaryTypeName","src":"4667:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4617:65:9"},"payable":false,"returnParameters":{"id":2610,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2609,"name":"profit","nodeType":"VariableDeclaration","scope":2707,"src":"4752:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2608,"name":"uint","nodeType":"ElementaryTypeName","src":"4752:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4751:13:9"},"scope":3112,"src":"4604:853:9","stateMutability":"nonpayable","superFunction":2209,"visibility":"public"},{"body":{"id":2821,"nodeType":"Block","src":"6057:1041:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2735,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2723,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6151:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2724,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6151:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2725,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6163:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2726,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6169:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6106:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2720,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6106:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2721,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"6106:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2727,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2732,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6247:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2733,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6262:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2728,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6207:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6207:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2730,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"6207:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2734,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:73:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6106:174:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2718,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6095:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2736,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6095:186:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2737,"nodeType":"ExpressionStatement","src":"6095:186:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2741,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6320:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2738,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6291:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2740,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"6291:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2742,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6291:47:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2743,"nodeType":"ExpressionStatement","src":"6291:47:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2750,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6442:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2751,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6448:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2747,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6415:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2744,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6387:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2748,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:46:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2749,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7488,"src":"6387:54:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2752,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:79:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2753,"nodeType":"ExpressionStatement","src":"6387:79:9"},{"assignments":[2755],"declarations":[{"constant":false,"id":2755,"name":"profit","nodeType":"VariableDeclaration","scope":2822,"src":"6476:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2754,"name":"uint","nodeType":"ElementaryTypeName","src":"6476:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2762,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2758,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6500:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2759,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6519:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2760,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2713,"src":"6538:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2756,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6490:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":2757,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"6490:9:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) external returns (uint256)"}},"id":2761,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6490:58:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"6476:72:9"},{"expression":{"argumentTypes":null,"id":2767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2763,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"6558:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2766,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2764,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6565:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":2765,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6585:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6565:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6558:33:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2768,"nodeType":"ExpressionStatement","src":"6558:33:9"},{"assignments":[2770],"declarations":[{"constant":false,"id":2770,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2822,"src":"6645:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2769,"name":"uint8","nodeType":"ElementaryTypeName","src":"6645:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2774,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2771,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6666:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2772,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"6666:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2773,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6666:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"6645:52:9"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2785,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6764:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":2786,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6769:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6764:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2800,"nodeType":"IfStatement","src":"6760:123:9","trueBody":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2794,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6852:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2795,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6852:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2796,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6864:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2791,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6840:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2789,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6812:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6812:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2792,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2793,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"6812:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2797,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:70:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2788,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6804:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2798,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6804:79:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2799,"nodeType":"ExpressionStatement","src":"6804:79:9"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2779,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6725:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2780,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2770,"src":"6729:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6725:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2801,"initializationExpression":{"assignments":[2776],"declarations":[{"constant":false,"id":2776,"name":"i","nodeType":"VariableDeclaration","scope":2822,"src":"6712:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2775,"name":"uint8","nodeType":"ElementaryTypeName","src":"6712:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2778,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2777,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6722:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"6712:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"6743:3:9","subExpression":{"argumentTypes":null,"id":2782,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6743:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2784,"nodeType":"ExpressionStatement","src":"6743:3:9"},"nodeType":"ForStatement","src":"6707:176:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2807,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6979:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2808,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6979:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2809,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6991:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2803,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6938:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6938:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"6938:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2810,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:60:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2802,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6930:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2811,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6930:69:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2812,"nodeType":"ExpressionStatement","src":"6930:69:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2814,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"7036:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2815,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7036:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2816,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"7048:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2817,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"7067:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2818,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"7086:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2813,"name":"OutcomeTokenShortSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2139,"src":"7014:21:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256)"}},"id":2819,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7014:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2820,"nodeType":"EmitStatement","src":"7009:82:9"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":2822,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2709,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2822,"src":"5945:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2708,"name":"uint8","nodeType":"ElementaryTypeName","src":"5945:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2711,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2822,"src":"5970:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2710,"name":"uint","nodeType":"ElementaryTypeName","src":"5970:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2713,"name":"minProfit","nodeType":"VariableDeclaration","scope":2822,"src":"5994:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2712,"name":"uint","nodeType":"ElementaryTypeName","src":"5994:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5944:65:9"},"payable":false,"returnParameters":{"id":2717,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2716,"name":"cost","nodeType":"VariableDeclaration","scope":2822,"src":"6042:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2715,"name":"uint","nodeType":"ElementaryTypeName","src":"6042:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6041:11:9"},"scope":3112,"src":"5926:1172:9","stateMutability":"nonpayable","superFunction":2220,"visibility":"public"},{"body":{"id":2874,"nodeType":"Block","src":"8025:386:9","statements":[{"assignments":[2837],"declarations":[{"constant":false,"id":2837,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2875,"src":"8035:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2836,"name":"uint8","nodeType":"ElementaryTypeName","src":"8035:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2841,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2838,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"8056:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2839,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"8056:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2840,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8056:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"8035:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2846,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2843,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8105:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2844,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8105:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2845,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8135:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"8105:42:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2842,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8097:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2847,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8097:51:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2848,"nodeType":"ExpressionStatement","src":"8097:51:9"},{"assignments":[],"declarations":[{"constant":false,"id":2850,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2875,"src":"8159:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2849,"name":"int","nodeType":"ElementaryTypeName","src":"8159:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":2851,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8159:23:9"},{"assignments":[],"declarations":[{"constant":false,"id":2853,"name":"fees","nodeType":"VariableDeclaration","scope":2875,"src":"8192:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2852,"name":"uint","nodeType":"ElementaryTypeName","src":"8192:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2854,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8192:9:9"},{"expression":{"argumentTypes":null,"id":2864,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":2855,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2834,"src":"8212:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2856,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8221:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2857,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8242:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":2858,"isConstant":false,"isInlineArray":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"TupleExpression","src":"8211:36:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2860,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8260:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2861,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8274:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2862,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2827,"src":"8295:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2859,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"8250:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2863,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8250:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"src":"8211:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2865,"nodeType":"ExpressionStatement","src":"8211:100:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2867,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"8345:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2868,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8345:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2869,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8357:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2870,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8378:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2871,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8399:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2866,"name":"OutcomeTokenTrade","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2150,"src":"8327:17:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256[] memory,int256,uint256)"}},"id":2872,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8327:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2873,"nodeType":"EmitStatement","src":"8322:82:9"}]},"documentation":"@dev Allows to trade outcome tokens and collateral with the market maker\n @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.","id":2875,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2830,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"7970:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2831,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7970:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2832,"modifierName":{"argumentTypes":null,"id":2829,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"7962:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"7962:28:9"}],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2828,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2825,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2875,"src":"7891:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2823,"name":"int","nodeType":"ElementaryTypeName","src":"7891:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2824,"length":null,"nodeType":"ArrayTypeName","src":"7891:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2827,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":2875,"src":"7918:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2826,"name":"int","nodeType":"ElementaryTypeName","src":"7918:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7890:48:9"},"payable":false,"returnParameters":{"id":2835,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2834,"name":"netCost","nodeType":"VariableDeclaration","scope":2875,"src":"8008:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2833,"name":"int","nodeType":"ElementaryTypeName","src":"8008:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8007:13:9"},"scope":3112,"src":"7876:535:9","stateMutability":"nonpayable","superFunction":2230,"visibility":"public"},{"body":{"id":3096,"nodeType":"Block","src":"8590:1897:9","statements":[{"expression":{"argumentTypes":null,"id":2897,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2891,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8650:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2894,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"8696:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2895,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"8702:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}],"expression":{"argumentTypes":null,"id":2892,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"8672:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2893,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcNetCost","nodeType":"MemberAccess","referencedDeclaration":1561,"src":"8672:23:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$","typeString":"function (contract Market,int256[] memory) view external returns (int256)"}},"id":2896,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8672:50:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8650:72:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2898,"nodeType":"ExpressionStatement","src":"8650:72:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2901,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2899,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8735:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2900,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8757:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8735:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":2917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2911,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8847:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2914,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8873:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2913,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8868:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2915,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8868:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2912,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8854:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2916,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8854:40:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8847:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2918,"nodeType":"ExpressionStatement","src":"8847:47:9"},"id":2919,"nodeType":"IfStatement","src":"8732:162:9","trueBody":{"expression":{"argumentTypes":null,"id":2909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2902,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8772:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8798:20:9","subExpression":{"argumentTypes":null,"id":2905,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8799:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2904,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8793:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2907,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8793:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2903,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8779:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2908,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8779:41:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8772:48:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2910,"nodeType":"ExpressionStatement","src":"8772:48:9"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2925,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2922,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8917:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2921,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2923,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8913:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2924,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8926:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8913:14:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2920,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8905:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2926,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8905:23:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2927,"nodeType":"ExpressionStatement","src":"8905:23:9"},{"expression":{"argumentTypes":null,"id":2935,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2928,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"8938:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2932,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8976:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2931,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8972:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2933,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8972:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":2929,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8948:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"8948:23:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":2934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8948:34:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8938:44:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2936,"nodeType":"ExpressionStatement","src":"8938:44:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2949,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2944,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2940,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2938,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9015:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2939,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9034:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9015:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2941,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9039:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":2942,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9050:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9039:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9015:50:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":2945,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"9014:52:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2946,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9082:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2947,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9101:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9082:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9014:88:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2937,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8993:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2950,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8993:119:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2951,"nodeType":"ExpressionStatement","src":"8993:119:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2952,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9126:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2953,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9148:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9126:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2988,"nodeType":"IfStatement","src":"9123:340:9","trueBody":{"id":2987,"nodeType":"Block","src":"9151:312:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2960,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9235:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2961,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9235:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2962,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9247:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2964,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9258:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2963,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9253:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2965,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9253:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2956,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9190:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9190:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2958,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2959,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"9190:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2966,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:77:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2971,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9327:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2973,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9347:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2972,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9342:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2974,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9342:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2967,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9287:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9287:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2969,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"9287:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2975,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9190:178:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2955,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9165:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2977,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9165:217:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2978,"nodeType":"ExpressionStatement","src":"9165:217:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2983,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9431:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2982,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9426:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2984,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9426:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2979,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9397:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2981,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"9397:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2985,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9397:55:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2986,"nodeType":"ExpressionStatement","src":"9397:55:9"}]}},{"body":{"id":3061,"nodeType":"Block","src":"9514:494:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2999,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9531:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3001,"indexExpression":{"argumentTypes":null,"id":3000,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9551:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9531:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3002,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9557:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9531:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3060,"nodeType":"IfStatement","src":"9528:470:9","trueBody":{"id":3059,"nodeType":"Block","src":"9560:438:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3008,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3004,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9581:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3006,"indexExpression":{"argumentTypes":null,"id":3005,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9601:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9581:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9606:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9581:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3044,"nodeType":"Block","src":"9757:131:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3034,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9827:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3035,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9827:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3037,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9844:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3039,"indexExpression":{"argumentTypes":null,"id":3038,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9864:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9844:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3036,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9839:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3040,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9839:28:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3031,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9815:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3029,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9787:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3030,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9787:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3032,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3033,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"9787:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3041,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3028,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3042,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9779:90:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3043,"nodeType":"ExpressionStatement","src":"9779:90:9"}]},"id":3045,"nodeType":"IfStatement","src":"9578:310:9","trueBody":{"id":3027,"nodeType":"Block","src":"9609:142:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3015,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9683:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9683:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3017,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9695:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3022,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"9706:23:9","subExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3019,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9707:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3021,"indexExpression":{"argumentTypes":null,"id":3020,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9727:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9707:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3018,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9701:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3023,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3012,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9667:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3010,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9639:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9639:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3013,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3014,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7460,"src":"9639:43:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":3024,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:92:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3009,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9631:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3025,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9631:101:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3026,"nodeType":"ExpressionStatement","src":"9631:101:9"}]}},{"expression":{"argumentTypes":null,"id":3057,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3046,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9906:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3048,"indexExpression":{"argumentTypes":null,"id":3047,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9927:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"9906:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3053,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9960:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3055,"indexExpression":{"argumentTypes":null,"id":3054,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9980:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9960:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3049,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9932:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3051,"indexExpression":{"argumentTypes":null,"id":3050,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9953:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9932:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"9932:27:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":3056,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9932:51:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9906:77:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3058,"nodeType":"ExpressionStatement","src":"9906:77:9"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2993,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9491:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2994,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2877,"src":"9495:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"9491:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3062,"initializationExpression":{"assignments":[2990],"declarations":[{"constant":false,"id":2990,"name":"i","nodeType":"VariableDeclaration","scope":3097,"src":"9478:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2989,"name":"uint8","nodeType":"ElementaryTypeName","src":"9478:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2992,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2991,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9488:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"9478:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2997,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"9509:3:9","subExpression":{"argumentTypes":null,"id":2996,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9509:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2998,"nodeType":"ExpressionStatement","src":"9509:3:9"},"nodeType":"ForStatement","src":"9473:535:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3063,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10021:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10043:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10021:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3095,"nodeType":"IfStatement","src":"10018:463:9","trueBody":{"id":3094,"nodeType":"Block","src":"10046:435:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10309:20:9","subExpression":{"argumentTypes":null,"id":3070,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10310:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3069,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10304:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3072,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10304:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3066,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10274:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sellAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":285,"src":"10274:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":3073,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10274:57:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3074,"nodeType":"ExpressionStatement","src":"10274:57:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3077,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3075,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10348:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3076,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10358:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10348:11:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3093,"nodeType":"IfStatement","src":"10345:126:9","trueBody":{"id":3092,"nodeType":"Block","src":"10361:110:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3083,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"10428:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"10428:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10445:8:9","subExpression":{"argumentTypes":null,"id":3086,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10446:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3085,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10440:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10440:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3079,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3080,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"10387:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":3081,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":3082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"10387:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3089,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:68:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3078,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"10379:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3090,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10379:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3091,"nodeType":"ExpressionStatement","src":"10379:77:9"}]}}]}}]},"documentation":null,"id":3097,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"tradeImpl","nodeType":"FunctionDefinition","parameters":{"id":2883,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2877,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":3097,"src":"8436:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2876,"name":"uint8","nodeType":"ElementaryTypeName","src":"8436:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2880,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3097,"src":"8456:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2878,"name":"int","nodeType":"ElementaryTypeName","src":"8456:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2879,"length":null,"nodeType":"ArrayTypeName","src":"8456:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2882,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3097,"src":"8483:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2881,"name":"int","nodeType":"ElementaryTypeName","src":"8483:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8435:68:9"},"payable":false,"returnParameters":{"id":2890,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2885,"name":"netCost","nodeType":"VariableDeclaration","scope":3097,"src":"8537:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2884,"name":"int","nodeType":"ElementaryTypeName","src":"8537:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2887,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":3097,"src":"8550:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2886,"name":"int","nodeType":"ElementaryTypeName","src":"8550:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2889,"name":"fees","nodeType":"VariableDeclaration","scope":3097,"src":"8575:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2888,"name":"uint","nodeType":"ElementaryTypeName","src":"8575:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8536:49:9"},"scope":3112,"src":"8417:2070:9","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3110,"nodeType":"Block","src":"10742:58:9","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3104,"name":"outcomeTokenCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3099,"src":"10759:16:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":3105,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"10778:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:22:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":3107,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"10784:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:34:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3103,"id":3109,"nodeType":"Return","src":"10752:41:9"}]},"documentation":"@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade","id":3111,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":3100,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3099,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":3111,"src":"10664:21:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3098,"name":"uint","nodeType":"ElementaryTypeName","src":"10664:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10663:23:9"},"payable":false,"returnParameters":{"id":3103,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3102,"name":"","nodeType":"VariableDeclaration","scope":3111,"src":"10732:4:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3101,"name":"uint","nodeType":"ElementaryTypeName","src":"10732:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10731:6:9"},"scope":3112,"src":"10641:159:9","stateMutability":"view","superFunction":2237,"visibility":"public"}],"scope":3113,"src":"1077:9725:9"}],"src":"0:10803:9"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","exportedSymbols":{"StandardMarket":[3112],"StandardMarketData":[2248],"StandardMarketProxy":[2326]},"id":3113,"nodeType":"SourceUnit","nodes":[{"id":2240,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:9"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol","file":"../Markets/Market.sol","id":2241,"nodeType":"ImportDirective","scope":3113,"sourceUnit":2239,"src":"25:31:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":2242,"nodeType":"ImportDirective","scope":3113,"sourceUnit":7329,"src":"57:63:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol","file":"../Events/Event.sol","id":2243,"nodeType":"ImportDirective","scope":3113,"sourceUnit":385,"src":"121:29:9","symbolAliases":[],"unitAlias":""},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol","file":"../MarketMakers/MarketMaker.sol","id":2244,"nodeType":"ImportDirective","scope":3113,"sourceUnit":1572,"src":"151:41:9","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2248,"linearizedBaseContracts":[2248],"name":"StandardMarketData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":2247,"name":"FEE_RANGE","nodeType":"VariableDeclaration","scope":2248,"src":"262:42:9","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2245,"name":"uint24","nodeType":"ElementaryTypeName","src":"262:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":{"argumentTypes":null,"hexValue":"31303030303030","id":2246,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"297:7:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1000000_by_1","typeString":"int_const 1000000"},"value":"1000000"},"visibility":"public"}],"scope":3113,"src":"195:120:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2249,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"349:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":2250,"nodeType":"InheritanceSpecifier","src":"349:5:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2251,"name":"MarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2172,"src":"356:10:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketData_$2172","typeString":"contract MarketData"}},"id":2252,"nodeType":"InheritanceSpecifier","src":"356:10:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2253,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"368:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2254,"nodeType":"InheritanceSpecifier","src":"368:18:9"}],"contractDependencies":[2172,2248,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":2326,"linearizedBaseContracts":[2326,2248,2172,6701,6673],"name":"StandardMarketProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":2324,"nodeType":"Block","src":"539:407:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2272,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"592:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}],"id":2271,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"584:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2273,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"584:23:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2274,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"611:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"584:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2277,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"624:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}],"id":2276,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"616:7:9","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":2278,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"616:21:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2279,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"641:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"616:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint24","typeString":"uint24"},"id":2284,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2282,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"646:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2283,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"653:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"646:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"584:78:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2270,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"576:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2286,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"576:87:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2287,"nodeType":"ExpressionStatement","src":"576:87:9"},{"expression":{"argumentTypes":null,"id":2290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2288,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"673:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2289,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2258,"src":"683:8:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"673:18:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":2291,"nodeType":"ExpressionStatement","src":"673:18:9"},{"expression":{"argumentTypes":null,"id":2295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2292,"name":"createdAtBlock","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2154,"src":"701:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2293,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7612,"src":"718:5:9","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":2294,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"number","nodeType":"MemberAccess","referencedDeclaration":null,"src":"718:12:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2296,"nodeType":"ExpressionStatement","src":"701:29:9"},{"expression":{"argumentTypes":null,"id":2299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2297,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"740:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2298,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2260,"src":"756:14:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"src":"740:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2300,"nodeType":"ExpressionStatement","src":"740:30:9"},{"expression":{"argumentTypes":null,"id":2309,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2301,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"780:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2305,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"813:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"813:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2307,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"813:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2304,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"803:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2302,"name":"int","nodeType":"ElementaryTypeName","src":"807:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2303,"length":null,"nodeType":"ArrayTypeName","src":"807:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2308,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"803:42:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"src":"780:65:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":2310,"nodeType":"ExpressionStatement","src":"780:65:9"},{"expression":{"argumentTypes":null,"id":2313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2311,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"855:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2312,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2264,"src":"861:4:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"855:10:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"id":2314,"nodeType":"ExpressionStatement","src":"855:10:9"},{"expression":{"argumentTypes":null,"id":2317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2315,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"875:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2316,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2262,"src":"889:12:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"src":"875:26:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2318,"nodeType":"ExpressionStatement","src":"875:26:9"},{"expression":{"argumentTypes":null,"id":2322,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2319,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"911:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2320,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"919:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2321,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"919:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"911:28:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2323,"nodeType":"ExpressionStatement","src":"911:28:9"}]},"documentation":null,"id":2325,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":2267,"name":"proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2256,"src":"513:5:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":2268,"modifierName":{"argumentTypes":null,"id":2266,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"507:5:9","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"507:12:9"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":2265,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2256,"name":"proxy","nodeType":"VariableDeclaration","scope":2325,"src":"405:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2255,"name":"address","nodeType":"ElementaryTypeName","src":"405:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2258,"name":"_creator","nodeType":"VariableDeclaration","scope":2325,"src":"420:16:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2257,"name":"address","nodeType":"ElementaryTypeName","src":"420:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":2260,"name":"_eventContract","nodeType":"VariableDeclaration","scope":2325,"src":"438:20:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":2259,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"438:5:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":2262,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":2325,"src":"460:24:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":2261,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"460:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":2264,"name":"_fee","nodeType":"VariableDeclaration","scope":2325,"src":"486:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":2263,"name":"uint24","nodeType":"ElementaryTypeName","src":"486:6:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"}],"src":"404:94:9"},"payable":false,"returnParameters":{"id":2269,"nodeType":"ParameterList","parameters":[],"src":"539:0:9"},"scope":2326,"src":"393:553:9","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3113,"src":"317:631:9"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":2327,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"1104:7:9","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":2328,"nodeType":"InheritanceSpecifier","src":"1104:7:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2329,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"1113:6:9","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"id":2330,"nodeType":"InheritanceSpecifier","src":"1113:6:9"},{"arguments":null,"baseName":{"contractScope":null,"id":2331,"name":"StandardMarketData","nodeType":"UserDefinedTypeName","referencedDeclaration":2248,"src":"1121:18:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketData_$2248","typeString":"contract StandardMarketData"}},"id":2332,"nodeType":"InheritanceSpecifier","src":"1121:18:9"}],"contractDependencies":[2172,2238,2248,6673],"contractKind":"contract","documentation":"@title Standard market contract - Backed implementation of standard markets\n @author Stefan George - ","fullyImplemented":true,"id":3112,"linearizedBaseContracts":[3112,2248,2238,2172,6673],"name":"StandardMarket","nodeType":"ContractDefinition","nodes":[{"id":2334,"libraryName":{"contractScope":null,"id":2333,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"1152:8:9","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"1146:21:9","typeName":null},{"body":{"id":2344,"nodeType":"Block","src":"1227:104:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":2340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2337,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1291:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2338,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1291:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2339,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"1305:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1291:21:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2336,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1283:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2341,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1283:30:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2342,"nodeType":"ExpressionStatement","src":"1283:30:9"},{"id":2343,"nodeType":"PlaceholderStatement","src":"1323:1:9"}]},"documentation":null,"id":2345,"name":"isCreator","nodeType":"ModifierDefinition","parameters":{"id":2335,"nodeType":"ParameterList","parameters":[],"src":"1224:2:9"},"src":"1206:125:9","visibility":"internal"},{"body":{"id":2356,"nodeType":"Block","src":"1369:97:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"id":2352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2350,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"1432:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2351,"name":"_stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2347,"src":"1441:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"1432:15:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2349,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1424:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2353,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1424:24:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2354,"nodeType":"ExpressionStatement","src":"1424:24:9"},{"id":2355,"nodeType":"PlaceholderStatement","src":"1458:1:9"}]},"documentation":null,"id":2357,"name":"atStage","nodeType":"ModifierDefinition","parameters":{"id":2348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2347,"name":"_stage","nodeType":"VariableDeclaration","scope":2357,"src":"1354:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"},"typeName":{"contractScope":null,"id":2346,"name":"Stages","nodeType":"UserDefinedTypeName","referencedDeclaration":2171,"src":"1354:6:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"value":null,"visibility":"internal"}],"src":"1353:15:9"},"src":"1337:129:9","visibility":"internal"},{"body":{"id":2407,"nodeType":"Block","src":"1753:434:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2385,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2373,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1918:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1918:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2375,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"1930:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2376,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"1936:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2369,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1873:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1873:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2371,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2372,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"1873:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2377,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:72:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2382,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2383,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2020:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2378,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1965:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"1965:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2381,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"1965:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2384,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:64:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1873:156:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2368,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1862:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2386,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1862:168:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2387,"nodeType":"ExpressionStatement","src":"1862:168:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2391,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2069:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2388,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2040:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"2040:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2392,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2040:38:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2393,"nodeType":"ExpressionStatement","src":"2040:38:9"},{"expression":{"argumentTypes":null,"id":2396,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2394,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2088:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2395,"name":"_funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2359,"src":"2098:8:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2088:18:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2397,"nodeType":"ExpressionStatement","src":"2088:18:9"},{"expression":{"argumentTypes":null,"id":2401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2398,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2116:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2399,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2124:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2400,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2124:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2116:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2402,"nodeType":"ExpressionStatement","src":"2116:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2404,"name":"funding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2162,"src":"2172:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2403,"name":"MarketFunding","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2099,"src":"2158:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2405,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2158:22:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2406,"nodeType":"EmitStatement","src":"2153:27:9"}]},"documentation":"@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount","id":2408,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2362,"modifierName":{"argumentTypes":null,"id":2361,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"1701:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1701:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2364,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"1727:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2365,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketCreated","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1727:20:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2366,"modifierName":{"argumentTypes":null,"id":2363,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"1719:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"1719:29:9"}],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":2360,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2359,"name":"_funding","nodeType":"VariableDeclaration","scope":2408,"src":"1663:13:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2358,"name":"uint","nodeType":"ElementaryTypeName","src":"1663:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1662:15:9"},"payable":false,"returnParameters":{"id":2367,"nodeType":"ParameterList","parameters":[],"src":"1753:0:9"},"scope":3112,"src":"1649:538:9","stateMutability":"nonpayable","superFunction":2179,"visibility":"public"},{"body":{"id":2459,"nodeType":"Block","src":"2400:304:9","statements":[{"assignments":[2418],"declarations":[{"constant":false,"id":2418,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2460,"src":"2410:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2417,"name":"uint8","nodeType":"ElementaryTypeName","src":"2410:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2422,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2419,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2431:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"2431:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2421,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2431:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"2410:52:9"},{"body":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2439,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"2573:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2445,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2623:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2442,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2610:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2440,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2582:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2582:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2443,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2444,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7284,"src":"2582:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2446,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2582:46:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2436,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2561:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2434,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2533:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"2533:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2437,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2438,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"2533:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2447,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2533:96:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2433,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2525:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2448,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2525:105:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2449,"nodeType":"ExpressionStatement","src":"2525:105:9"},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2427,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2490:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2428,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2418,"src":"2494:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2490:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2450,"initializationExpression":{"assignments":[2424],"declarations":[{"constant":false,"id":2424,"name":"i","nodeType":"VariableDeclaration","scope":2460,"src":"2477:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2423,"name":"uint8","nodeType":"ElementaryTypeName","src":"2477:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2426,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2425,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2487:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2477:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"2508:3:9","subExpression":{"argumentTypes":null,"id":2430,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2424,"src":"2508:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2432,"nodeType":"ExpressionStatement","src":"2508:3:9"},"nodeType":"ForStatement","src":"2472:158:9"},{"expression":{"argumentTypes":null,"id":2454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2451,"name":"stage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2167,"src":"2640:5:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2452,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2648:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2453,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketClosed","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2648:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"src":"2640:27:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}},"id":2455,"nodeType":"ExpressionStatement","src":"2640:27:9"},{"eventCall":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":2456,"name":"MarketClosing","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2101,"src":"2682:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":2457,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2682:15:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2458,"nodeType":"EmitStatement","src":"2677:20:9"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":2460,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2411,"modifierName":{"argumentTypes":null,"id":2410,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2349:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2349:9:9"},{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2413,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"2375:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2414,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2375:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2415,"modifierName":{"argumentTypes":null,"id":2412,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"2367:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"2367:28:9"}],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":2409,"nodeType":"ParameterList","parameters":[],"src":"2323:2:9"},"payable":false,"returnParameters":{"id":2416,"nodeType":"ParameterList","parameters":[],"src":"2400:0:9"},"scope":3112,"src":"2309:395:9","stateMutability":"nonpayable","superFunction":2182,"visibility":"public"},{"body":{"id":2490,"nodeType":"Block","src":"2898:204:9","statements":[{"expression":{"argumentTypes":null,"id":2474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2467,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"2908:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2472,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"2957:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2468,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"2915:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2469,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"2915:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2470,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2471,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":7342,"src":"2915:41:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":2473,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2915:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2908:54:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2475,"nodeType":"ExpressionStatement","src":"2908:54:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2481,"name":"creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2152,"src":"3046:7:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2482,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3055:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2477,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3005:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2478,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"3005:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2479,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2480,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"3005:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3005:55:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2476,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2997:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2484,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2997:64:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2485,"nodeType":"ExpressionStatement","src":"2997:64:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2487,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2465,"src":"3090:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2486,"name":"FeeWithdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2105,"src":"3076:13:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":2488,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3076:19:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2489,"nodeType":"EmitStatement","src":"3071:24:9"}]},"documentation":"@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount","id":2491,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":null,"id":2463,"modifierName":{"argumentTypes":null,"id":2462,"name":"isCreator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2345,"src":"2856:9:9","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2856:9:9"}],"name":"withdrawFees","nodeType":"FunctionDefinition","parameters":{"id":2461,"nodeType":"ParameterList","parameters":[],"src":"2830:2:9"},"payable":false,"returnParameters":{"id":2466,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2465,"name":"fees","nodeType":"VariableDeclaration","scope":2491,"src":"2883:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2464,"name":"uint","nodeType":"ElementaryTypeName","src":"2883:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2882:11:9"},"scope":3112,"src":"2809:293:9","stateMutability":"nonpayable","superFunction":2187,"visibility":"public"},{"body":{"id":2595,"nodeType":"Block","src":"3589:680:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2517,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2511,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2508,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3611:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2507,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3607:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2509,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3607:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2510,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3633:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3607:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2516,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2513,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"3642:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2512,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3638:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2514,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3638:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2515,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3653:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3638:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3607:47:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2506,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3599:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2518,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3599:56:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2519,"nodeType":"ExpressionStatement","src":"3599:56:9"},{"assignments":[2521],"declarations":[{"constant":false,"id":2521,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2596,"src":"3665:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2520,"name":"uint8","nodeType":"ElementaryTypeName","src":"3665:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2525,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2522,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"3686:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2523,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"3686:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3686:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"3665:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2533,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2527,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3735:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2528,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3756:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3735:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2532,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2530,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3761:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2531,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3781:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"3761:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3735:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2526,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3727:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2534,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3727:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2535,"nodeType":"ExpressionStatement","src":"3727:67:9"},{"assignments":[2539],"declarations":[{"constant":false,"id":2539,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2596,"src":"3804:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2537,"name":"int","nodeType":"ElementaryTypeName","src":"3804:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2538,"length":null,"nodeType":"ArrayTypeName","src":"3804:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2545,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2543,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"3849:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2542,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"3839:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2540,"name":"int","nodeType":"ElementaryTypeName","src":"3843:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2541,"length":null,"nodeType":"ArrayTypeName","src":"3843:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3839:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"3804:58:9"},{"expression":{"argumentTypes":null,"id":2552,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2546,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"3872:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2548,"indexExpression":{"argumentTypes":null,"id":2547,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"3892:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3872:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2550,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"3917:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2549,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2551,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3913:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3872:63:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2553,"nodeType":"ExpressionStatement","src":"3872:63:9"},{"assignments":[2555,2557,2559],"declarations":[{"constant":false,"id":2555,"name":"netCost","nodeType":"VariableDeclaration","scope":2596,"src":"3946:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2554,"name":"int","nodeType":"ElementaryTypeName","src":"3946:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2557,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2596,"src":"3959:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2556,"name":"int","nodeType":"ElementaryTypeName","src":"3959:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2559,"name":"fees","nodeType":"VariableDeclaration","scope":2596,"src":"3984:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2558,"name":"uint","nodeType":"ElementaryTypeName","src":"3984:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2567,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2561,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2521,"src":"4007:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2562,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2539,"src":"4021:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2564,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2497,"src":"4046:7:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2563,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4042:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2565,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4042:12:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2560,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"3997:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2566,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3997:58:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"3945:110:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2575,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2571,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2569,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4073:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2570,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4084:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4073:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2572,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4089:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2573,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4112:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4089:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4073:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2568,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4065:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2576,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4065:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2577,"nodeType":"ExpressionStatement","src":"4065:49:9"},{"expression":{"argumentTypes":null,"id":2582,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2578,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2504,"src":"4124:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2580,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2555,"src":"4136:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2579,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4131:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2581,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4131:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4124:20:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2583,"nodeType":"ExpressionStatement","src":"4124:20:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2585,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4180:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2586,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4180:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2587,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2493,"src":"4192:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2588,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2495,"src":"4211:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2590,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2557,"src":"4235:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2589,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4230:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2591,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4230:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2592,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2559,"src":"4257:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2584,"name":"OutcomeTokenPurchase","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2117,"src":"4159:20:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2593,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4159:103:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2594,"nodeType":"EmitStatement","src":"4154:108:9"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":2596,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2500,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"3536:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2501,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3536:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2502,"modifierName":{"argumentTypes":null,"id":2499,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"3528:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"3528:28:9"}],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":2498,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2493,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2596,"src":"3442:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2492,"name":"uint8","nodeType":"ElementaryTypeName","src":"3442:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2495,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2596,"src":"3467:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2494,"name":"uint","nodeType":"ElementaryTypeName","src":"3467:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2497,"name":"maxCost","nodeType":"VariableDeclaration","scope":2596,"src":"3491:12:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2496,"name":"uint","nodeType":"ElementaryTypeName","src":"3491:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3441:63:9"},"payable":false,"returnParameters":{"id":2505,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2504,"name":"cost","nodeType":"VariableDeclaration","scope":2596,"src":"3574:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2503,"name":"uint","nodeType":"ElementaryTypeName","src":"3574:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3573:11:9"},"scope":3112,"src":"3429:840:9","stateMutability":"nonpayable","superFunction":2198,"visibility":"public"},{"body":{"id":2706,"nodeType":"Block","src":"4769:688:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2624,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2617,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2615,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4787:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2613,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"4792:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2612,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4788:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2614,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4788:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2616,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4814:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4787:28:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2623,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2621,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"4819:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2619,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"4824:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2618,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4820:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2620,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4820:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2622,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4837:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4819:19:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4787:51:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2611,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2625,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4779:60:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2626,"nodeType":"ExpressionStatement","src":"4779:60:9"},{"assignments":[2628],"declarations":[{"constant":false,"id":2628,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2707,"src":"4849:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2627,"name":"uint8","nodeType":"ElementaryTypeName","src":"4849:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2632,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2629,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"4870:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2630,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"4870:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2631,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"4849:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2636,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2634,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4919:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2635,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4940:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4919:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2639,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2637,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"4945:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2638,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"4965:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"4945:32:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4919:58:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2633,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4911:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2641,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4911:67:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2642,"nodeType":"ExpressionStatement","src":"4911:67:9"},{"assignments":[2646],"declarations":[{"constant":false,"id":2646,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2707,"src":"4988:32:9","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2644,"name":"int","nodeType":"ElementaryTypeName","src":"4988:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2645,"length":null,"nodeType":"ArrayTypeName","src":"4988:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"}],"id":2652,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2650,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5033:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"id":2649,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"5023:9:9","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$","typeString":"function (uint256) pure returns (int256[] memory)"},"typeName":{"baseType":{"id":2647,"name":"int","nodeType":"ElementaryTypeName","src":"5027:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2648,"length":null,"nodeType":"ArrayTypeName","src":"5027:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}}},"id":2651,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5023:23:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory","typeString":"int256[] memory"}},"nodeType":"VariableDeclarationStatement","src":"4988:58:9"},{"expression":{"argumentTypes":null,"id":2660,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2653,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5056:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2655,"indexExpression":{"argumentTypes":null,"id":2654,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5076:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5056:38:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":2659,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5097:23:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2657,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5102:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2656,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5098:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2658,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5098:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5056:64:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2661,"nodeType":"ExpressionStatement","src":"5056:64:9"},{"assignments":[2663,2665,2667],"declarations":[{"constant":false,"id":2663,"name":"netCost","nodeType":"VariableDeclaration","scope":2707,"src":"5131:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2662,"name":"int","nodeType":"ElementaryTypeName","src":"5131:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2665,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2707,"src":"5144:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2664,"name":"int","nodeType":"ElementaryTypeName","src":"5144:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2667,"name":"fees","nodeType":"VariableDeclaration","scope":2707,"src":"5169:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2666,"name":"uint","nodeType":"ElementaryTypeName","src":"5169:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2676,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2669,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2628,"src":"5192:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2670,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2646,"src":"5206:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2674,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5227:15:9","subExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2672,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2602,"src":"5232:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2671,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5228:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2673,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5228:14:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2668,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"5182:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2675,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5182:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"VariableDeclarationStatement","src":"5130:113:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2684,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2680,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2678,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5261:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2679,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5272:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5261:12:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2683,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2681,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5277:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2682,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5300:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5277:24:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5261:40:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2677,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5253:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2685,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5253:49:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2686,"nodeType":"ExpressionStatement","src":"5253:49:9"},{"expression":{"argumentTypes":null,"id":2692,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2687,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2609,"src":"5312:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2690,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5326:8:9","subExpression":{"argumentTypes":null,"id":2689,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2663,"src":"5327:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2688,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5321:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2691,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5321:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5312:23:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2693,"nodeType":"ExpressionStatement","src":"5312:23:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2695,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5367:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2696,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5367:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2697,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2598,"src":"5379:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2698,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2600,"src":"5398:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2701,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"5422:20:9","subExpression":{"argumentTypes":null,"id":2700,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2665,"src":"5423:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2699,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"5417:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2702,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5417:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2703,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2667,"src":"5445:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2694,"name":"OutcomeTokenSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2129,"src":"5350:16:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256,uint256)"}},"id":2704,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5350:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2705,"nodeType":"EmitStatement","src":"5345:105:9"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":2707,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2605,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"4714:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2606,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4714:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2607,"modifierName":{"argumentTypes":null,"id":2604,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"4706:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"4706:28:9"}],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":2603,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2598,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2707,"src":"4618:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2597,"name":"uint8","nodeType":"ElementaryTypeName","src":"4618:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2600,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2707,"src":"4643:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2599,"name":"uint","nodeType":"ElementaryTypeName","src":"4643:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2602,"name":"minProfit","nodeType":"VariableDeclaration","scope":2707,"src":"4667:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2601,"name":"uint","nodeType":"ElementaryTypeName","src":"4667:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4617:65:9"},"payable":false,"returnParameters":{"id":2610,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2609,"name":"profit","nodeType":"VariableDeclaration","scope":2707,"src":"4752:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2608,"name":"uint","nodeType":"ElementaryTypeName","src":"4752:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4751:13:9"},"scope":3112,"src":"4604:853:9","stateMutability":"nonpayable","superFunction":2209,"visibility":"public"},{"body":{"id":2821,"nodeType":"Block","src":"6057:1041:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2735,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2723,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6151:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2724,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6151:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2725,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6163:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2726,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6169:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2719,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6106:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2720,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6106:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2721,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2722,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"6106:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2727,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6106:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2732,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6247:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":2733,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6262:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2728,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6207:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2729,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6207:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2730,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2731,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"6207:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2734,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6207:73:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6106:174:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2718,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6095:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2736,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6095:186:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2737,"nodeType":"ExpressionStatement","src":"6095:186:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2741,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6320:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2738,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6291:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2740,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"6291:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2742,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6291:47:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2743,"nodeType":"ExpressionStatement","src":"6291:47:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2750,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6442:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2751,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6448:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2747,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6415:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2744,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2746,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6387:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2748,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:46:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2749,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7488,"src":"6387:54:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2752,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6387:79:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2753,"nodeType":"ExpressionStatement","src":"6387:79:9"},{"assignments":[2755],"declarations":[{"constant":false,"id":2755,"name":"profit","nodeType":"VariableDeclaration","scope":2822,"src":"6476:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2754,"name":"uint","nodeType":"ElementaryTypeName","src":"6476:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2762,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2758,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6500:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2759,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6519:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2760,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2713,"src":"6538:9:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2756,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"6490:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":2757,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"6490:9:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) external returns (uint256)"}},"id":2761,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6490:58:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"6476:72:9"},{"expression":{"argumentTypes":null,"id":2767,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2763,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"6558:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2766,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2764,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6565:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":2765,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6585:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6565:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6558:33:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2768,"nodeType":"ExpressionStatement","src":"6558:33:9"},{"assignments":[2770],"declarations":[{"constant":false,"id":2770,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2822,"src":"6645:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2769,"name":"uint8","nodeType":"ElementaryTypeName","src":"6645:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2774,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2771,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6666:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2772,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"6666:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2773,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6666:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"6645:52:9"},{"body":{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2785,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6764:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":2786,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"6769:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6764:22:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2800,"nodeType":"IfStatement","src":"6760:123:9","trueBody":{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2794,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6852:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2795,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6852:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2796,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"6864:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2791,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6840:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":2789,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6812:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2790,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"6812:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":2792,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":2793,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"6812:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2797,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6812:70:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2788,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6804:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2798,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6804:79:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2799,"nodeType":"ExpressionStatement","src":"6804:79:9"}},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2781,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2779,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6725:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2780,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2770,"src":"6729:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"6725:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":2801,"initializationExpression":{"assignments":[2776],"declarations":[{"constant":false,"id":2776,"name":"i","nodeType":"VariableDeclaration","scope":2822,"src":"6712:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2775,"name":"uint8","nodeType":"ElementaryTypeName","src":"6712:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2778,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2777,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6722:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"6712:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2783,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"6743:3:9","subExpression":{"argumentTypes":null,"id":2782,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2776,"src":"6743:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2784,"nodeType":"ExpressionStatement","src":"6743:3:9"},"nodeType":"ForStatement","src":"6707:176:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2807,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"6979:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2808,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"6979:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2809,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2755,"src":"6991:6:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2803,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"6938:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2804,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"6938:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2805,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2806,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"6938:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2810,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6938:60:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2802,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"6930:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2811,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6930:69:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2812,"nodeType":"ExpressionStatement","src":"6930:69:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2814,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"7036:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2815,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7036:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2816,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2709,"src":"7048:17:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2817,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2711,"src":"7067:17:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":2818,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2716,"src":"7086:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2813,"name":"OutcomeTokenShortSale","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2139,"src":"7014:21:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,uint8,uint256,uint256)"}},"id":2819,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7014:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2820,"nodeType":"EmitStatement","src":"7009:82:9"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":2822,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":2714,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2709,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":2822,"src":"5945:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2708,"name":"uint8","nodeType":"ElementaryTypeName","src":"5945:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2711,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":2822,"src":"5970:22:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2710,"name":"uint","nodeType":"ElementaryTypeName","src":"5970:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2713,"name":"minProfit","nodeType":"VariableDeclaration","scope":2822,"src":"5994:14:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2712,"name":"uint","nodeType":"ElementaryTypeName","src":"5994:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5944:65:9"},"payable":false,"returnParameters":{"id":2717,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2716,"name":"cost","nodeType":"VariableDeclaration","scope":2822,"src":"6042:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2715,"name":"uint","nodeType":"ElementaryTypeName","src":"6042:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"6041:11:9"},"scope":3112,"src":"5926:1172:9","stateMutability":"nonpayable","superFunction":2220,"visibility":"public"},{"body":{"id":2874,"nodeType":"Block","src":"8025:386:9","statements":[{"assignments":[2837],"declarations":[{"constant":false,"id":2837,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":2875,"src":"8035:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2836,"name":"uint8","nodeType":"ElementaryTypeName","src":"8035:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2841,"initialValue":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2838,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"8056:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2839,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"8056:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":2840,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8056:31:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"VariableDeclarationStatement","src":"8035:52:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":2846,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2843,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8105:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":2844,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8105:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":2845,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8135:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"8105:42:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2842,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8097:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2847,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8097:51:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2848,"nodeType":"ExpressionStatement","src":"8097:51:9"},{"assignments":[],"declarations":[{"constant":false,"id":2850,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":2875,"src":"8159:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2849,"name":"int","nodeType":"ElementaryTypeName","src":"8159:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"id":2851,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8159:23:9"},{"assignments":[],"declarations":[{"constant":false,"id":2853,"name":"fees","nodeType":"VariableDeclaration","scope":2875,"src":"8192:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2852,"name":"uint","nodeType":"ElementaryTypeName","src":"8192:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":2854,"initialValue":null,"nodeType":"VariableDeclarationStatement","src":"8192:9:9"},{"expression":{"argumentTypes":null,"id":2864,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"components":[{"argumentTypes":null,"id":2855,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2834,"src":"8212:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2856,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8221:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2857,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8242:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":2858,"isConstant":false,"isInlineArray":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"TupleExpression","src":"8211:36:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2860,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2837,"src":"8260:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":2861,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8274:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2862,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2827,"src":"8295:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2859,"name":"tradeImpl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3097,"src":"8250:9:9","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$","typeString":"function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"}},"id":2863,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8250:61:9","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int256_$_t_int256_$_t_uint256_$","typeString":"tuple(int256,int256,uint256)"}},"src":"8211:100:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2865,"nodeType":"ExpressionStatement","src":"8211:100:9"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2867,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"8345:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2868,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"8345:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2869,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2825,"src":"8357:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":2870,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2850,"src":"8378:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":2871,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2853,"src":"8399:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2866,"name":"OutcomeTokenTrade","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2150,"src":"8327:17:9","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256[] memory,int256,uint256)"}},"id":2872,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8327:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2873,"nodeType":"EmitStatement","src":"8322:82:9"}]},"documentation":"@dev Allows to trade outcome tokens and collateral with the market maker\n @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.","id":2875,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2830,"name":"Stages","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2171,"src":"7970:6:9","typeDescriptions":{"typeIdentifier":"t_type$_t_enum$_Stages_$2171_$","typeString":"type(enum MarketData.Stages)"}},"id":2831,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberName":"MarketFunded","nodeType":"MemberAccess","referencedDeclaration":null,"src":"7970:19:9","typeDescriptions":{"typeIdentifier":"t_enum$_Stages_$2171","typeString":"enum MarketData.Stages"}}],"id":2832,"modifierName":{"argumentTypes":null,"id":2829,"name":"atStage","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2357,"src":"7962:7:9","typeDescriptions":{"typeIdentifier":"t_modifier$_t_enum$_Stages_$2171_$","typeString":"modifier (enum MarketData.Stages)"}},"nodeType":"ModifierInvocation","src":"7962:28:9"}],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":2828,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2825,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":2875,"src":"7891:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2823,"name":"int","nodeType":"ElementaryTypeName","src":"7891:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2824,"length":null,"nodeType":"ArrayTypeName","src":"7891:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2827,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":2875,"src":"7918:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2826,"name":"int","nodeType":"ElementaryTypeName","src":"7918:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7890:48:9"},"payable":false,"returnParameters":{"id":2835,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2834,"name":"netCost","nodeType":"VariableDeclaration","scope":2875,"src":"8008:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2833,"name":"int","nodeType":"ElementaryTypeName","src":"8008:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8007:13:9"},"scope":3112,"src":"7876:535:9","stateMutability":"nonpayable","superFunction":2230,"visibility":"public"},{"body":{"id":3096,"nodeType":"Block","src":"8590:1897:9","statements":[{"expression":{"argumentTypes":null,"id":2897,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2891,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8650:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2894,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"8696:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"id":2895,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"8702:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}],"expression":{"argumentTypes":null,"id":2892,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"8672:11:9","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":2893,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcNetCost","nodeType":"MemberAccess","referencedDeclaration":1561,"src":"8672:23:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$","typeString":"function (contract Market,int256[] memory) view external returns (int256)"}},"id":2896,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8672:50:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8650:72:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2898,"nodeType":"ExpressionStatement","src":"8650:72:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2901,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2899,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8735:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2900,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8757:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8735:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":2917,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2911,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8847:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2914,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8873:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2913,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8868:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2915,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8868:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2912,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8854:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2916,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8854:40:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8847:47:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2918,"nodeType":"ExpressionStatement","src":"8847:47:9"},"id":2919,"nodeType":"IfStatement","src":"8732:162:9","trueBody":{"expression":{"argumentTypes":null,"id":2909,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2902,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8772:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2906,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"8798:20:9","subExpression":{"argumentTypes":null,"id":2905,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8799:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2904,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8793:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2907,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8793:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2903,"name":"calcMarketFee","nodeType":"Identifier","overloadedDeclarations":[3111],"referencedDeclaration":3111,"src":"8779:13:9","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256) view returns (uint256)"}},"id":2908,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8779:41:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8772:48:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":2910,"nodeType":"ExpressionStatement","src":"8772:48:9"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2925,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2922,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8917:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2921,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8913:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2923,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8913:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2924,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8926:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"8913:14:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2920,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8905:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2926,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8905:23:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2927,"nodeType":"ExpressionStatement","src":"8905:23:9"},{"expression":{"argumentTypes":null,"id":2935,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":2928,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"8938:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2932,"name":"fees","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2889,"src":"8976:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":2931,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"8972:3:9","typeDescriptions":{"typeIdentifier":"t_type$_t_int256_$","typeString":"type(int256)"},"typeName":"int"},"id":2933,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8972:9:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":2929,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"8948:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2930,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"8948:23:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":2934,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8948:34:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"8938:44:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2936,"nodeType":"ExpressionStatement","src":"8938:44:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2949,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2944,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2940,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2938,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9015:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2939,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9034:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9015:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2943,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2941,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9039:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":2942,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9050:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9039:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9015:50:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":2945,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"9014:52:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2948,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2946,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2882,"src":"9082:15:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2947,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9101:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9082:20:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9014:88:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2937,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"8993:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2950,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8993:119:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2951,"nodeType":"ExpressionStatement","src":"8993:119:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":2954,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2952,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9126:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":2953,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9148:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9126:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":2988,"nodeType":"IfStatement","src":"9123:340:9","trueBody":{"id":2987,"nodeType":"Block","src":"9151:312:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":2976,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":2960,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9235:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":2961,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9235:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":2962,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9247:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2964,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"9258:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2963,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9253:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2965,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9253:13:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2956,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9190:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2957,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9190:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2958,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2959,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"9190:44:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":2966,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9190:77:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2971,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9327:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2973,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9347:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2972,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9342:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2974,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9342:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":2967,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9287:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2968,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"9287:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":2969,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":2970,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"approve","nodeType":"MemberAccess","referencedDeclaration":7319,"src":"9287:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":2975,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9287:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"9190:178:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":2955,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9165:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":2977,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9165:217:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2978,"nodeType":"ExpressionStatement","src":"9165:217:9"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":2983,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"9431:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":2982,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9426:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":2984,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9426:25:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":2979,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9397:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":2981,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buyAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":243,"src":"9397:28:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":2985,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9397:55:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":2986,"nodeType":"ExpressionStatement","src":"9397:55:9"}]}},{"body":{"id":3061,"nodeType":"Block","src":"9514:494:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3003,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":2999,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9531:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3001,"indexExpression":{"argumentTypes":null,"id":3000,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9551:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9531:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3002,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9557:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9531:27:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3060,"nodeType":"IfStatement","src":"9528:470:9","trueBody":{"id":3059,"nodeType":"Block","src":"9560:438:9","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3008,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3004,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9581:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3006,"indexExpression":{"argumentTypes":null,"id":3005,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9601:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9581:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3007,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9606:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"9581:26:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3044,"nodeType":"Block","src":"9757:131:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3034,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9827:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3035,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9827:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3037,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9844:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3039,"indexExpression":{"argumentTypes":null,"id":3038,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9864:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9844:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3036,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9839:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3040,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9839:28:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3031,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9815:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3029,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9787:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3030,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9787:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3032,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3033,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7272,"src":"9787:39:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3041,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9787:81:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3028,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9779:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3042,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9779:90:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3043,"nodeType":"ExpressionStatement","src":"9779:90:9"}]},"id":3045,"nodeType":"IfStatement","src":"9578:310:9","trueBody":{"id":3027,"nodeType":"Block","src":"9609:142:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3015,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"9683:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3016,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"9683:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3017,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7685,"src":"9695:4:9","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3022,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"9706:23:9","subExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3019,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9707:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3021,"indexExpression":{"argumentTypes":null,"id":3020,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9727:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9707:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3018,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"9701:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3023,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9701:29:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3012,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9667:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3010,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"9639:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3011,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"outcomeTokens","nodeType":"MemberAccess","referencedDeclaration":197,"src":"9639:27:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5674_$","typeString":"function (uint256) view external returns (contract OutcomeToken)"}},"id":3013,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:30:9","typeDescriptions":{"typeIdentifier":"t_contract$_OutcomeToken_$5674","typeString":"contract OutcomeToken"}},"id":3014,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7460,"src":"9639:43:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":3024,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9639:92:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3009,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"9631:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3025,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9631:101:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3026,"nodeType":"ExpressionStatement","src":"9631:101:9"}]}},{"expression":{"argumentTypes":null,"id":3057,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3046,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9906:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3048,"indexExpression":{"argumentTypes":null,"id":3047,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9927:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"9906:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3053,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2880,"src":"9960:19:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},"id":3055,"indexExpression":{"argumentTypes":null,"id":3054,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9980:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9960:22:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":3049,"name":"netOutcomeTokensSold","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2165,"src":"9932:20:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage","typeString":"int256[] storage ref"}},"id":3051,"indexExpression":{"argumentTypes":null,"id":3050,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9953:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"9932:23:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3052,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7188,"src":"9932:27:9","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$","typeString":"function (int256,int256) pure returns (int256)"}},"id":3056,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"9932:51:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"9906:77:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3058,"nodeType":"ExpressionStatement","src":"9906:77:9"}]}}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":2995,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":2993,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9491:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":2994,"name":"outcomeCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2877,"src":"9495:12:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"9491:16:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":3062,"initializationExpression":{"assignments":[2990],"declarations":[{"constant":false,"id":2990,"name":"i","nodeType":"VariableDeclaration","scope":3097,"src":"9478:7:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2989,"name":"uint8","nodeType":"ElementaryTypeName","src":"9478:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"}],"id":2992,"initialValue":{"argumentTypes":null,"hexValue":"30","id":2991,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9488:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"9478:11:9"},"loopExpression":{"expression":{"argumentTypes":null,"id":2997,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"9509:3:9","subExpression":{"argumentTypes":null,"id":2996,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2990,"src":"9509:1:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":2998,"nodeType":"ExpressionStatement","src":"9509:3:9"},"nodeType":"ForStatement","src":"9473:535:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3063,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10021:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10043:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10021:23:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3095,"nodeType":"IfStatement","src":"10018:463:9","trueBody":{"id":3094,"nodeType":"Block","src":"10046:435:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10309:20:9","subExpression":{"argumentTypes":null,"id":3070,"name":"outcomeTokenNetCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2887,"src":"10310:19:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3069,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10304:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3072,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10304:26:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3066,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10274:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3068,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sellAllOutcomes","nodeType":"MemberAccess","referencedDeclaration":285,"src":"10274:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256) external"}},"id":3073,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10274:57:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3074,"nodeType":"ExpressionStatement","src":"10274:57:9"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":3077,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3075,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10348:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3076,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10358:1:9","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"10348:11:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3093,"nodeType":"IfStatement","src":"10345:126:9","trueBody":{"id":3092,"nodeType":"Block","src":"10361:110:9","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3083,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"10428:3:9","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3084,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"10428:10:9","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"10445:8:9","subExpression":{"argumentTypes":null,"id":3086,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2885,"src":"10446:7:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":3085,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"10440:4:9","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":3088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10440:14:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3079,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"10387:13:9","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3080,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"collateralToken","nodeType":"MemberAccess","referencedDeclaration":188,"src":"10387:29:9","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_contract$_ERC20_$7328_$","typeString":"function () view external returns (contract ERC20)"}},"id":3081,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:31:9","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":3082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"10387:40:9","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":3089,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10387:68:9","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3078,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"10379:7:9","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3090,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10379:77:9","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3091,"nodeType":"ExpressionStatement","src":"10379:77:9"}]}}]}}]},"documentation":null,"id":3097,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"tradeImpl","nodeType":"FunctionDefinition","parameters":{"id":2883,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2877,"name":"outcomeCount","nodeType":"VariableDeclaration","scope":3097,"src":"8436:18:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":2876,"name":"uint8","nodeType":"ElementaryTypeName","src":"8436:5:9","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":2880,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3097,"src":"8456:25:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":2878,"name":"int","nodeType":"ElementaryTypeName","src":"8456:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":2879,"length":null,"nodeType":"ArrayTypeName","src":"8456:5:9","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":2882,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3097,"src":"8483:19:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2881,"name":"int","nodeType":"ElementaryTypeName","src":"8483:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"8435:68:9"},"payable":false,"returnParameters":{"id":2890,"nodeType":"ParameterList","parameters":[{"constant":false,"id":2885,"name":"netCost","nodeType":"VariableDeclaration","scope":3097,"src":"8537:11:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2884,"name":"int","nodeType":"ElementaryTypeName","src":"8537:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2887,"name":"outcomeTokenNetCost","nodeType":"VariableDeclaration","scope":3097,"src":"8550:23:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":2886,"name":"int","nodeType":"ElementaryTypeName","src":"8550:3:9","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":2889,"name":"fees","nodeType":"VariableDeclaration","scope":3097,"src":"8575:9:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2888,"name":"uint","nodeType":"ElementaryTypeName","src":"8575:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"8536:49:9"},"scope":3112,"src":"8417:2070:9","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3110,"nodeType":"Block","src":"10742:58:9","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3104,"name":"outcomeTokenCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3099,"src":"10759:16:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":3105,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2160,"src":"10778:3:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:22:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"id":3107,"name":"FEE_RANGE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2247,"src":"10784:9:9","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"src":"10759:34:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3103,"id":3109,"nodeType":"Return","src":"10752:41:9"}]},"documentation":"@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade","id":3111,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"calcMarketFee","nodeType":"FunctionDefinition","parameters":{"id":3100,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3099,"name":"outcomeTokenCost","nodeType":"VariableDeclaration","scope":3111,"src":"10664:21:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3098,"name":"uint","nodeType":"ElementaryTypeName","src":"10664:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10663:23:9"},"payable":false,"returnParameters":{"id":3103,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3102,"name":"","nodeType":"VariableDeclaration","scope":3111,"src":"10732:4:9","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3101,"name":"uint","nodeType":"ElementaryTypeName","src":"10732:4:9","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"10731:6:9"},"scope":3112,"src":"10641:159:9","stateMutability":"view","superFunction":2237,"visibility":"public"}],"scope":3113,"src":"1077:9725:9"}],"src":"0:10803:9"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.009Z"}; /***/ }), @@ -440,10 +769,21 @@ module.exports = {"contract_name":"StandardMarketFactory","abi":[{"constant":fal /*!*************************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLogger.json ***! \*************************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"StandardMarketWithPriceLogger","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"startDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"shortSell","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"sell","outputs":[{"name":"profit","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdrawFees","outputs":[{"name":"fees","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"lastTradeDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"priceIntegral","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"outcomeTokenCost","type":"uint256"}],"name":"calcMarketFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"endDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_funding","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"lastTradePrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"getAvgPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"maxCost","type":"uint256"}],"name":"buy","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"type":"function"},{"inputs":[{"name":"_creator","type":"address"},{"name":"_eventContract","type":"address"},{"name":"_marketMaker","type":"address"},{"name":"_fee","type":"uint24"},{"name":"_startDate","type":"uint256"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263315}; +module.exports = {"contractName":"StandardMarketWithPriceLogger","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"startDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFees","outputs":[{"name":"fees","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTradeDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"priceIntegral","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"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":"outcomeTokenCost","type":"uint256"}],"name":"calcMarketFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_funding","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTradePrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"transactor","type":"address"},{"indexed":false,"name":"outcomeTokenAmounts","type":"int256[]"},{"indexed":false,"name":"outcomeTokenNetCost","type":"int256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenTrade","type":"event"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"maxCost","type":"uint256"}],"name":"buy","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"sell","outputs":[{"name":"profit","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenIndex","type":"uint8"},{"name":"outcomeTokenCount","type":"uint256"},{"name":"minProfit","type":"uint256"}],"name":"shortSell","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"outcomeTokenAmounts","type":"int256[]"},{"name":"collateralLimit","type":"int256"}],"name":"trade","outputs":[{"name":"netCost","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getAvgPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506138f2806100206000396000f300608060405260043610610149576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461014e5780630b97bc86146101a557806315bd7611146101d05780631f21f9af1461025457806328c05d32146102ab57806343d726d61461030357806346280a801461031a578063476343ee14610372578063561cce0a1461039d57806359acb42c146103ce57806368b586d5146103f95780638b797a0c14610424578063a157979c1461044f578063a619486e14610490578063b0011509146104e7578063c040e6b814610528578063c24a0f8b14610561578063ca1d209d1461058c578063cb4c86b7146105b9578063ddca3f43146105e4578063df449cb814610619578063e274fd2414610644578063f01e66ec1461069b578063f6d956df146106c6578063fbde47f61461071e575b600080fd5b34801561015a57600080fd5b50610163610753565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101b157600080fd5b506101ba610779565b6040518082815260200191505060405180910390f35b3480156101dc57600080fd5b5061023e600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019092919050505061077f565b6040518082815260200191505060405180910390f35b34801561026057600080fd5b506102696107a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102b757600080fd5b506102ed600480360381019080803560ff16906020019092919080359060200190929190803590602001909291905050506107c9565b6040518082815260200191505060405180910390f35b34801561030f57600080fd5b506103186107ef565b005b34801561032657600080fd5b5061035c600480360381019080803560ff1690602001909291908035906020019092919080359060200190929190505050610800565b6040518082815260200191505060405180910390f35b34801561037e57600080fd5b50610387610826565b6040518082815260200191505060405180910390f35b3480156103a957600080fd5b506103b2610c21565b604051808260ff1660ff16815260200191505060405180910390f35b3480156103da57600080fd5b506103e3610c26565b6040518082815260200191505060405180910390f35b34801561040557600080fd5b5061040e610c2c565b6040518082815260200191505060405180910390f35b34801561043057600080fd5b50610439610c32565b6040518082815260200191505060405180910390f35b34801561045b57600080fd5b5061047a60048036038101908080359060200190929190505050610c38565b6040518082815260200191505060405180910390f35b34801561049c57600080fd5b506104a5610c5b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104f357600080fd5b5061051260048036038101908080359060200190929190505050610c80565b6040518082815260200191505060405180910390f35b34801561053457600080fd5b5061053d610cb5565b6040518082600281111561054d57fe5b60ff16815260200191505060405180910390f35b34801561056d57600080fd5b50610576610cc8565b6040518082815260200191505060405180910390f35b34801561059857600080fd5b506105b760048036038101908080359060200190929190505050610cce565b005b3480156105c557600080fd5b506105ce611215565b6040518082815260200191505060405180910390f35b3480156105f057600080fd5b506105f961121b565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561062557600080fd5b5061062e611230565b6040518082815260200191505060405180910390f35b34801561065057600080fd5b50610659611236565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106a757600080fd5b506106b061125c565b6040518082815260200191505060405180910390f35b3480156106d257600080fd5b50610708600480360381019080803560ff16906020019092919080359060200190929190803590602001909291905050506112b1565b6040518082815260200191505060405180910390f35b34801561072a57600080fd5b506107336112d7565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60006107896112de565b6107938383611304565b905061079d6114d4565b92915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006107d36112de565b6107de8484846115ea565b90506107e86114d4565b9392505050565b426009819055506107fe612173565b565b600061080a6112de565b6108158484846126bb565b905061081f6114d4565b9392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561088457600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561090a57600080fd5b505af115801561091e573d6000803e3d6000fd5b505050506040513d602081101561093457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156109df57600080fd5b505af11580156109f3573d6000803e3d6000fd5b505050506040513d6020811015610a0957600080fd5b81019080805190602001909291905050509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610aa257600080fd5b505af1158015610ab6573d6000803e3d6000fd5b505050506040513d6020811015610acc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ba157600080fd5b505af1158015610bb5573d6000803e3d6000fd5b505050506040513d6020811015610bcb57600080fd5b81019080805190602001909291905050501515610be757600080fd5b7f706d7f48c702007c2fb0881cea5759732e64f52faee427d5ab030787cfb7d787816040518082815260200191505060405180910390a190565b600181565b60025481565b600a5481565b600c5481565b600681815481101515610c4757fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620f424062ffffff16600460149054906101000a900462ffffff1662ffffff168302811515610cad57fe5b049050919050565b600760009054906101000a900460ff1681565b60095481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d2a57600080fd5b6000806002811115610d3857fe5b600760009054906101000a900460ff166002811115610d5357fe5b141515610d5f57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610de557600080fd5b505af1158015610df9573d6000803e3d6000fd5b505050506040513d6020811015610e0f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610ef657600080fd5b505af1158015610f0a573d6000803e3d6000fd5b505050506040513d6020811015610f2057600080fd5b810190808051906020019092919050505080156110f95750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610fbe57600080fd5b505af1158015610fd2573d6000803e3d6000fd5b505050506040513d6020811015610fe857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156110bd57600080fd5b505af11580156110d1573d6000803e3d6000fd5b505050506040513d60208110156110e757600080fd5b81019080805190602001909291905050505b151561110457600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561119557600080fd5b505af11580156111a9573d6000803e3d6000fd5b50505050816005819055506001600760006101000a81548160ff021916908360028111156111d357fe5b02179055507f8a2fe22ce705a4ac9c189969cef327affbdc477afdae4ae274c2f8ad021f91636005546040518082815260200191505060405180910390a15050565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600954111561128f5760085460095403600a5460095403600b5402600c540181151561128757fe5b0490506112ae565b6008544203600a544203600b5402600c54018115156112aa57fe5b0490505b90565b60006112bb6112de565b6112c684848461290e565b90506112d06114d4565b9392505050565b620f424081565b6008544210151561130257600a544203600b5402600c600082825401925050819055505b565b600080600080600180600281111561131857fe5b600760009054906101000a900460ff16600281111561133357fe5b14151561133f57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156113c557600080fd5b505af11580156113d9573d6000803e3d6000fd5b505050506040513d60208110156113ef57600080fd5b810190808051906020019092919050505093508360ff16875114151561141457600080fd5b61141f848888612b4f565b8094508195508297505050503373ffffffffffffffffffffffffffffffffffffffff167fa66fcf59f5b6e4cb46e5745fd40c7dfac01b0a81b2b5e55038d9ec959adf7eaa8885856040518080602001848152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156114b557808201518184015260208101905061149a565b5050505090500194505050505060405180910390a25050505092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d812d3463060016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff16815260200192505050602060405180830381600087803b1580156115a057600080fd5b505af11580156115b4573d6000803e3d6000fd5b505050506040513d60208110156115ca57600080fd5b8101908080519060200190929190505050600b8190555042600a81905550565b600080600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561167657600080fd5b505af115801561168a573d6000803e3d6000fd5b505050506040513d60208110156116a057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561178757600080fd5b505af115801561179b573d6000803e3d6000fd5b505050506040513d60208110156117b157600080fd5b8101908080519060200190929190505050801561198a5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561184f57600080fd5b505af1158015611863573d6000803e3d6000fd5b505050506040513d602081101561187957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561194e57600080fd5b505af1158015611962573d6000803e3d6000fd5b505050506040513d602081101561197857600080fd5b81019080805190602001909291905050505b151561199557600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b876040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015611a2657600080fd5b505af1158015611a3a573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea886040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b158015611ad257600080fd5b505af1158015611ae6573d6000803e3d6000fd5b505050506040513d6020811015611afc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b330886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611baf57600080fd5b505af1158015611bc3573d6000803e3d6000fd5b505050506040513d6020811015611bd957600080fd5b8101908080519060200190929190505050503073ffffffffffffffffffffffffffffffffffffffff166346280a808888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808460ff1660ff1681526020018381526020018281526020019350505050602060405180830381600087803b158015611c7057600080fd5b505af1158015611c84573d6000803e3d6000fd5b505050506040513d6020811015611c9a57600080fd5b810190808051906020019092919050505092508286039350600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d3857600080fd5b505af1158015611d4c573d6000803e3d6000fd5b505050506040513d6020811015611d6257600080fd5b81019080805190602001909291905050509150600090505b8160ff168160ff161015611f5c578660ff168160ff16141515611f4f57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b158015611e2b57600080fd5b505af1158015611e3f573d6000803e3d6000fd5b505050506040513d6020811015611e5557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611f0857600080fd5b505af1158015611f1c573d6000803e3d6000fd5b505050506040513d6020811015611f3257600080fd5b81019080805190602001909291905050501515611f4e57600080fd5b5b8080600101915050611d7a565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611fe257600080fd5b505af1158015611ff6573d6000803e3d6000fd5b505050506040513d602081101561200c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156120bf57600080fd5b505af11580156120d3573d6000803e3d6000fd5b505050506040513d60208110156120e957600080fd5b8101908080519060200190929190505050151561210557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f1dbdc4ff4d51949738d56e120b2be4edecc55d8d2150f1616ec5802abaae3f88888887604051808460ff1660ff168152602001838152602001828152602001935050505060405180910390a25050509392505050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156121d257600080fd5b60018060028111156121e057fe5b600760009054906101000a900460ff1660028111156121fb57fe5b14151561220757600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561228d57600080fd5b505af11580156122a1573d6000803e3d6000fd5b505050506040513d60208110156122b757600080fd5b81019080805190602001909291905050509250600091505b8260ff168260ff16101561266657600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561237157600080fd5b505af1158015612385573d6000803e3d6000fd5b505050506040513d602081101561239b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561247e57600080fd5b505af1158015612492573d6000803e3d6000fd5b505050506040513d60208110156124a857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561255357600080fd5b505af1158015612567573d6000803e3d6000fd5b505050506040513d602081101561257d57600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561261357600080fd5b505af1158015612627573d6000803e3d6000fd5b505050506040513d602081101561263d57600080fd5b8101908080519060200190929190505050151561265957600080fd5b81806001019250506122cf565b6002600760006101000a81548160ff0219169083600281111561268557fe5b02179055507fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0760405160405180910390a1505050565b6000806060600080600060018060028111156126d357fe5b600760009054906101000a900460ff1660028111156126ee57fe5b1415156126fa57600080fd5b600089600003131580156127115750600088600003125b151561271c57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127a257600080fd5b505af11580156127b6573d6000803e3d6000fd5b505050506040513d60208110156127cc57600080fd5b8101908080519060200190929190505050955060008a60ff16101580156127f857508560ff168a60ff16105b151561280357600080fd5b8560ff166040519080825280602002602001820160405280156128355781602001602082028038833980820191505090505b50945088600003858b60ff1681518110151561284d57fe5b906020019060200201818152505061286986868a600003612b4f565b93509350935060008413158015612881575060008313155b151561288c57600080fd5b8360000396503373ffffffffffffffffffffffffffffffffffffffff167fab24ef3371efb2e0e3b02955e33b8ef03c14523e71f3bda87878a2386cc17b698b8b8660000386604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b60008060606000806000600180600281111561292657fe5b600760009054906101000a900460ff16600281111561294157fe5b14151561294d57600080fd5b6000891215801561295e5750600088135b151561296957600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156129ef57600080fd5b505af1158015612a03573d6000803e3d6000fd5b505050506040513d6020811015612a1957600080fd5b8101908080519060200190929190505050955060008a60ff1610158015612a4557508560ff168a60ff16105b1515612a5057600080fd5b8560ff16604051908082528060200260200182016040528015612a825781602001602082028038833980820191505090505b50945088858b60ff16815181101515612a9757fe5b9060200190602002018181525050612ab086868a612b4f565b93509350935060008412158015612ac8575060008312155b1515612ad357600080fd5b8396503373ffffffffffffffffffffffffffffffffffffffff167f7caea4a19892ce49b4daa2014d5599eed561dcd16ffabfac851a9737217ae4108b8b8686604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b600080600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338bf045230886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015612c35578082015181840152602081019050612c1a565b505050509050019350505050602060405180830381600087803b158015612c5b57600080fd5b505af1158015612c6f573d6000803e3d6000fd5b505050506040513d6020811015612c8557600080fd5b810190808051906020019092919050505092506000831215612cb457612cad83600003610c80565b9150612cc0565b612cbd83610c80565b91505b60008212151515612cd057600080fd5b612ce3828461388a90919063ffffffff16565b935060008514158015612cf65750848413155b80612d015750600085145b1515612d0c57600080fd5b600083131561316457600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612d9b57600080fd5b505af1158015612daf573d6000803e3d6000fd5b505050506040513d6020811015612dc557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612eac57600080fd5b505af1158015612ec0573d6000803e3d6000fd5b505050506040513d6020811015612ed657600080fd5b810190808051906020019092919050505080156130af5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612f7457600080fd5b505af1158015612f88573d6000803e3d6000fd5b505050506040513d6020811015612f9e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561307357600080fd5b505af1158015613087573d6000803e3d6000fd5b505050506040513d602081101561309d57600080fd5b81019080805190602001909291905050505b15156130ba57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561314b57600080fd5b505af115801561315f573d6000803e3d6000fd5b505050505b600090505b8660ff168160ff161015613614576000868260ff1681518110151561318a57fe5b90602001906020020151141515613607576000868260ff168151811015156131ae57fe5b9060200190602002015112156133cb57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561325257600080fd5b505af1158015613266573d6000803e3d6000fd5b505050506040513d602081101561327c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330898560ff168151811015156132bb57fe5b906020019060200201516000036040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561338057600080fd5b505af1158015613394573d6000803e3d6000fd5b505050506040513d60208110156133aa57600080fd5b810190808051906020019092919050505015156133c657600080fd5b61359d565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561345f57600080fd5b505af1158015613473573d6000803e3d6000fd5b505050506040513d602081101561348957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33888460ff168151811015156134c757fe5b906020019060200201516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561355657600080fd5b505af115801561356a573d6000803e3d6000fd5b505050506040513d602081101561358057600080fd5b8101908080519060200190929190505050151561359c57600080fd5b5b6135e6868260ff168151811015156135b157fe5b9060200190602002015160068360ff168154811015156135cd57fe5b906000526020600020015461388a90919063ffffffff16565b60068260ff168154811015156135f857fe5b90600052602060002001819055505b8080600101915050613169565b600083121561388057600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636fb1edcd846000036040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156136b157600080fd5b505af11580156136c5573d6000803e3d6000fd5b50505050600084121561387f57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561375857600080fd5b505af115801561376c573d6000803e3d6000fd5b505050506040513d602081101561378257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866000036040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561383857600080fd5b505af115801561384c573d6000803e3d6000fd5b505050506040513d602081101561386257600080fd5b8101908080519060200190929190505050151561387e57600080fd5b5b5b5093509350939050565b60008183019050600082121580156138a25750828112155b806138b857506000821280156138b757508281125b5b15156138c057fe5b929150505600a165627a7a72305820cb29367c6f9c616f039be1d9f6a40db01c854da48eac100202669edc2620bdb00029","deployedBytecode":"0x608060405260043610610149576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461014e5780630b97bc86146101a557806315bd7611146101d05780631f21f9af1461025457806328c05d32146102ab57806343d726d61461030357806346280a801461031a578063476343ee14610372578063561cce0a1461039d57806359acb42c146103ce57806368b586d5146103f95780638b797a0c14610424578063a157979c1461044f578063a619486e14610490578063b0011509146104e7578063c040e6b814610528578063c24a0f8b14610561578063ca1d209d1461058c578063cb4c86b7146105b9578063ddca3f43146105e4578063df449cb814610619578063e274fd2414610644578063f01e66ec1461069b578063f6d956df146106c6578063fbde47f61461071e575b600080fd5b34801561015a57600080fd5b50610163610753565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101b157600080fd5b506101ba610779565b6040518082815260200191505060405180910390f35b3480156101dc57600080fd5b5061023e600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019092919050505061077f565b6040518082815260200191505060405180910390f35b34801561026057600080fd5b506102696107a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102b757600080fd5b506102ed600480360381019080803560ff16906020019092919080359060200190929190803590602001909291905050506107c9565b6040518082815260200191505060405180910390f35b34801561030f57600080fd5b506103186107ef565b005b34801561032657600080fd5b5061035c600480360381019080803560ff1690602001909291908035906020019092919080359060200190929190505050610800565b6040518082815260200191505060405180910390f35b34801561037e57600080fd5b50610387610826565b6040518082815260200191505060405180910390f35b3480156103a957600080fd5b506103b2610c21565b604051808260ff1660ff16815260200191505060405180910390f35b3480156103da57600080fd5b506103e3610c26565b6040518082815260200191505060405180910390f35b34801561040557600080fd5b5061040e610c2c565b6040518082815260200191505060405180910390f35b34801561043057600080fd5b50610439610c32565b6040518082815260200191505060405180910390f35b34801561045b57600080fd5b5061047a60048036038101908080359060200190929190505050610c38565b6040518082815260200191505060405180910390f35b34801561049c57600080fd5b506104a5610c5b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104f357600080fd5b5061051260048036038101908080359060200190929190505050610c80565b6040518082815260200191505060405180910390f35b34801561053457600080fd5b5061053d610cb5565b6040518082600281111561054d57fe5b60ff16815260200191505060405180910390f35b34801561056d57600080fd5b50610576610cc8565b6040518082815260200191505060405180910390f35b34801561059857600080fd5b506105b760048036038101908080359060200190929190505050610cce565b005b3480156105c557600080fd5b506105ce611215565b6040518082815260200191505060405180910390f35b3480156105f057600080fd5b506105f961121b565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561062557600080fd5b5061062e611230565b6040518082815260200191505060405180910390f35b34801561065057600080fd5b50610659611236565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106a757600080fd5b506106b061125c565b6040518082815260200191505060405180910390f35b3480156106d257600080fd5b50610708600480360381019080803560ff16906020019092919080359060200190929190803590602001909291905050506112b1565b6040518082815260200191505060405180910390f35b34801561072a57600080fd5b506107336112d7565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60006107896112de565b6107938383611304565b905061079d6114d4565b92915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006107d36112de565b6107de8484846115ea565b90506107e86114d4565b9392505050565b426009819055506107fe612173565b565b600061080a6112de565b6108158484846126bb565b905061081f6114d4565b9392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561088457600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561090a57600080fd5b505af115801561091e573d6000803e3d6000fd5b505050506040513d602081101561093457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156109df57600080fd5b505af11580156109f3573d6000803e3d6000fd5b505050506040513d6020811015610a0957600080fd5b81019080805190602001909291905050509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610aa257600080fd5b505af1158015610ab6573d6000803e3d6000fd5b505050506040513d6020811015610acc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ba157600080fd5b505af1158015610bb5573d6000803e3d6000fd5b505050506040513d6020811015610bcb57600080fd5b81019080805190602001909291905050501515610be757600080fd5b7f706d7f48c702007c2fb0881cea5759732e64f52faee427d5ab030787cfb7d787816040518082815260200191505060405180910390a190565b600181565b60025481565b600a5481565b600c5481565b600681815481101515610c4757fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620f424062ffffff16600460149054906101000a900462ffffff1662ffffff168302811515610cad57fe5b049050919050565b600760009054906101000a900460ff1681565b60095481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d2a57600080fd5b6000806002811115610d3857fe5b600760009054906101000a900460ff166002811115610d5357fe5b141515610d5f57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610de557600080fd5b505af1158015610df9573d6000803e3d6000fd5b505050506040513d6020811015610e0f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610ef657600080fd5b505af1158015610f0a573d6000803e3d6000fd5b505050506040513d6020811015610f2057600080fd5b810190808051906020019092919050505080156110f95750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610fbe57600080fd5b505af1158015610fd2573d6000803e3d6000fd5b505050506040513d6020811015610fe857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156110bd57600080fd5b505af11580156110d1573d6000803e3d6000fd5b505050506040513d60208110156110e757600080fd5b81019080805190602001909291905050505b151561110457600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561119557600080fd5b505af11580156111a9573d6000803e3d6000fd5b50505050816005819055506001600760006101000a81548160ff021916908360028111156111d357fe5b02179055507f8a2fe22ce705a4ac9c189969cef327affbdc477afdae4ae274c2f8ad021f91636005546040518082815260200191505060405180910390a15050565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600954111561128f5760085460095403600a5460095403600b5402600c540181151561128757fe5b0490506112ae565b6008544203600a544203600b5402600c54018115156112aa57fe5b0490505b90565b60006112bb6112de565b6112c684848461290e565b90506112d06114d4565b9392505050565b620f424081565b6008544210151561130257600a544203600b5402600c600082825401925050819055505b565b600080600080600180600281111561131857fe5b600760009054906101000a900460ff16600281111561133357fe5b14151561133f57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156113c557600080fd5b505af11580156113d9573d6000803e3d6000fd5b505050506040513d60208110156113ef57600080fd5b810190808051906020019092919050505093508360ff16875114151561141457600080fd5b61141f848888612b4f565b8094508195508297505050503373ffffffffffffffffffffffffffffffffffffffff167fa66fcf59f5b6e4cb46e5745fd40c7dfac01b0a81b2b5e55038d9ec959adf7eaa8885856040518080602001848152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156114b557808201518184015260208101905061149a565b5050505090500194505050505060405180910390a25050505092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d812d3463060016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260ff1660ff16815260200192505050602060405180830381600087803b1580156115a057600080fd5b505af11580156115b4573d6000803e3d6000fd5b505050506040513d60208110156115ca57600080fd5b8101908080519060200190929190505050600b8190555042600a81905550565b600080600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561167657600080fd5b505af115801561168a573d6000803e3d6000fd5b505050506040513d60208110156116a057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561178757600080fd5b505af115801561179b573d6000803e3d6000fd5b505050506040513d60208110156117b157600080fd5b8101908080519060200190929190505050801561198a5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561184f57600080fd5b505af1158015611863573d6000803e3d6000fd5b505050506040513d602081101561187957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561194e57600080fd5b505af1158015611962573d6000803e3d6000fd5b505050506040513d602081101561197857600080fd5b81019080805190602001909291905050505b151561199557600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b876040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015611a2657600080fd5b505af1158015611a3a573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea886040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b158015611ad257600080fd5b505af1158015611ae6573d6000803e3d6000fd5b505050506040513d6020811015611afc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b330886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611baf57600080fd5b505af1158015611bc3573d6000803e3d6000fd5b505050506040513d6020811015611bd957600080fd5b8101908080519060200190929190505050503073ffffffffffffffffffffffffffffffffffffffff166346280a808888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808460ff1660ff1681526020018381526020018281526020019350505050602060405180830381600087803b158015611c7057600080fd5b505af1158015611c84573d6000803e3d6000fd5b505050506040513d6020811015611c9a57600080fd5b810190808051906020019092919050505092508286039350600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d3857600080fd5b505af1158015611d4c573d6000803e3d6000fd5b505050506040513d6020811015611d6257600080fd5b81019080805190602001909291905050509150600090505b8160ff168160ff161015611f5c578660ff168160ff16141515611f4f57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b158015611e2b57600080fd5b505af1158015611e3f573d6000803e3d6000fd5b505050506040513d6020811015611e5557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611f0857600080fd5b505af1158015611f1c573d6000803e3d6000fd5b505050506040513d6020811015611f3257600080fd5b81019080805190602001909291905050501515611f4e57600080fd5b5b8080600101915050611d7a565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611fe257600080fd5b505af1158015611ff6573d6000803e3d6000fd5b505050506040513d602081101561200c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156120bf57600080fd5b505af11580156120d3573d6000803e3d6000fd5b505050506040513d60208110156120e957600080fd5b8101908080519060200190929190505050151561210557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f1dbdc4ff4d51949738d56e120b2be4edecc55d8d2150f1616ec5802abaae3f88888887604051808460ff1660ff168152602001838152602001828152602001935050505060405180910390a25050509392505050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156121d257600080fd5b60018060028111156121e057fe5b600760009054906101000a900460ff1660028111156121fb57fe5b14151561220757600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561228d57600080fd5b505af11580156122a1573d6000803e3d6000fd5b505050506040513d60208110156122b757600080fd5b81019080805190602001909291905050509250600091505b8260ff168260ff16101561266657600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561237157600080fd5b505af1158015612385573d6000803e3d6000fd5b505050506040513d602081101561239b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561247e57600080fd5b505af1158015612492573d6000803e3d6000fd5b505050506040513d60208110156124a857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561255357600080fd5b505af1158015612567573d6000803e3d6000fd5b505050506040513d602081101561257d57600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561261357600080fd5b505af1158015612627573d6000803e3d6000fd5b505050506040513d602081101561263d57600080fd5b8101908080519060200190929190505050151561265957600080fd5b81806001019250506122cf565b6002600760006101000a81548160ff0219169083600281111561268557fe5b02179055507fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0760405160405180910390a1505050565b6000806060600080600060018060028111156126d357fe5b600760009054906101000a900460ff1660028111156126ee57fe5b1415156126fa57600080fd5b600089600003131580156127115750600088600003125b151561271c57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127a257600080fd5b505af11580156127b6573d6000803e3d6000fd5b505050506040513d60208110156127cc57600080fd5b8101908080519060200190929190505050955060008a60ff16101580156127f857508560ff168a60ff16105b151561280357600080fd5b8560ff166040519080825280602002602001820160405280156128355781602001602082028038833980820191505090505b50945088600003858b60ff1681518110151561284d57fe5b906020019060200201818152505061286986868a600003612b4f565b93509350935060008413158015612881575060008313155b151561288c57600080fd5b8360000396503373ffffffffffffffffffffffffffffffffffffffff167fab24ef3371efb2e0e3b02955e33b8ef03c14523e71f3bda87878a2386cc17b698b8b8660000386604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b60008060606000806000600180600281111561292657fe5b600760009054906101000a900460ff16600281111561294157fe5b14151561294d57600080fd5b6000891215801561295e5750600088135b151561296957600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156129ef57600080fd5b505af1158015612a03573d6000803e3d6000fd5b505050506040513d6020811015612a1957600080fd5b8101908080519060200190929190505050955060008a60ff1610158015612a4557508560ff168a60ff16105b1515612a5057600080fd5b8560ff16604051908082528060200260200182016040528015612a825781602001602082028038833980820191505090505b50945088858b60ff16815181101515612a9757fe5b9060200190602002018181525050612ab086868a612b4f565b93509350935060008412158015612ac8575060008312155b1515612ad357600080fd5b8396503373ffffffffffffffffffffffffffffffffffffffff167f7caea4a19892ce49b4daa2014d5599eed561dcd16ffabfac851a9737217ae4108b8b8686604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b600080600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338bf045230886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015612c35578082015181840152602081019050612c1a565b505050509050019350505050602060405180830381600087803b158015612c5b57600080fd5b505af1158015612c6f573d6000803e3d6000fd5b505050506040513d6020811015612c8557600080fd5b810190808051906020019092919050505092506000831215612cb457612cad83600003610c80565b9150612cc0565b612cbd83610c80565b91505b60008212151515612cd057600080fd5b612ce3828461388a90919063ffffffff16565b935060008514158015612cf65750848413155b80612d015750600085145b1515612d0c57600080fd5b600083131561316457600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612d9b57600080fd5b505af1158015612daf573d6000803e3d6000fd5b505050506040513d6020811015612dc557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612eac57600080fd5b505af1158015612ec0573d6000803e3d6000fd5b505050506040513d6020811015612ed657600080fd5b810190808051906020019092919050505080156130af5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612f7457600080fd5b505af1158015612f88573d6000803e3d6000fd5b505050506040513d6020811015612f9e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561307357600080fd5b505af1158015613087573d6000803e3d6000fd5b505050506040513d602081101561309d57600080fd5b81019080805190602001909291905050505b15156130ba57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561314b57600080fd5b505af115801561315f573d6000803e3d6000fd5b505050505b600090505b8660ff168160ff161015613614576000868260ff1681518110151561318a57fe5b90602001906020020151141515613607576000868260ff168151811015156131ae57fe5b9060200190602002015112156133cb57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561325257600080fd5b505af1158015613266573d6000803e3d6000fd5b505050506040513d602081101561327c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330898560ff168151811015156132bb57fe5b906020019060200201516000036040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561338057600080fd5b505af1158015613394573d6000803e3d6000fd5b505050506040513d60208110156133aa57600080fd5b810190808051906020019092919050505015156133c657600080fd5b61359d565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff168152602001915050602060405180830381600087803b15801561345f57600080fd5b505af1158015613473573d6000803e3d6000fd5b505050506040513d602081101561348957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33888460ff168151811015156134c757fe5b906020019060200201516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561355657600080fd5b505af115801561356a573d6000803e3d6000fd5b505050506040513d602081101561358057600080fd5b8101908080519060200190929190505050151561359c57600080fd5b5b6135e6868260ff168151811015156135b157fe5b9060200190602002015160068360ff168154811015156135cd57fe5b906000526020600020015461388a90919063ffffffff16565b60068260ff168154811015156135f857fe5b90600052602060002001819055505b8080600101915050613169565b600083121561388057600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636fb1edcd846000036040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156136b157600080fd5b505af11580156136c5573d6000803e3d6000fd5b50505050600084121561387f57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561375857600080fd5b505af115801561376c573d6000803e3d6000fd5b505050506040513d602081101561378257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866000036040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561383857600080fd5b505af115801561384c573d6000803e3d6000fd5b505050506040513d602081101561386257600080fd5b8101908080519060200190929190505050151561387e57600080fd5b5b5b5093509350939050565b60008183019050600082121580156138a25750828112155b806138b857506000821280156138b757508281125b5b15156138c057fe5b929150505600a165627a7a72305820cb29367c6f9c616f039be1d9f6a40db01c854da48eac100202669edc2620bdb00029","sourceMap":"1471:3945:11:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1471:3945:11;;;;;;;","deployedSourceMap":"1471:3945:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;874:22:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;874:22:8;;;;;;;;;;;;;;;;;;;;;;;;;;;262:21:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:21:11;;;;;;;;;;;;;;;;;;;;;;;3796:239;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3796:239:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;966:30:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;966:30:8;;;;;;;;;;;;;;;;;;;;;;;;;;;3252:270:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3252:270:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4158:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4158:89:11;;;;;;2519:264;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2519:264:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2809:293:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2809:293:9;;;;;;;;;;;;;;;;;;;;;;;194:30:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;194:30:11;;;;;;;;;;;;;;;;;;;;;;;;;;;902:26:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;902:26:8;;;;;;;;;;;;;;;;;;;;;;;314:25:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;314:25:11;;;;;;;;;;;;;;;;;;;;;;;377;;8:9:-1;5:2;;;30:1;27;20:12;5:2;377:25:11;;;;;;;;;;;;;;;;;;;;;;;1050:33:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1050:33:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;10641:159:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10641:159:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1089:19:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:19:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;289::11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;289:19:11;;;;;;;;;;;;;;;;;;;;;;;1649:538:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1649:538:9;;;;;;;;;;;;;;;;;;;;;;;;;;1025:19:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1025:19:8;;;;;;;;;;;;;;;;;;;;;;;1002:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1002:17:8;;;;;;;;;;;;;;;;;;;;;;;;;;;345:26:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;345:26:11;;;;;;;;;;;;;;;;;;;;;;;934::8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;934:26:8;;;;;;;;;;;;;;;;;;;;;;;;;;;4387:307:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4387:307:11;;;;;;;;;;;;;;;;;;;;;;;1930:254;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1930:254:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;262:42:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:42:9;;;;;;;;;;;;;;;;;;;;;;;;;;;874:22:8;;;;;;;;;;;;;:::o;262:21:11:-;;;;:::o;3796:239::-;3891:11;3918:16;:14;:16::i;:::-;3954:49;3966:19;3987:15;3954:11;:49::i;:::-;3944:59;;4013:15;:13;:15::i;:::-;3796:239;;;;:::o;966:30:8:-;;;;;;;;;;;;;:::o;3252:270:11:-;3368:9;3393:16;:14;:16::i;:::-;3426:64;3442:17;3461;3480:9;3426:15;:64::i;:::-;3419:71;;3500:15;:13;:15::i;:::-;3252:270;;;;;:::o;4158:89::-;4214:3;4204:7;:13;;;;4227;:11;:13::i;:::-;4158:89::o;2519:264::-;2630:11;2657:16;:14;:16::i;:::-;2692:59;2703:17;2722;2741:9;2692:10;:59::i;:::-;2683:68;;2761:15;:13;:15::i;:::-;2519:264;;;;;:::o;2809:293:9:-;2883:9;1305:7;;;;;;;;;;;1291:21;;:10;:21;;;1283:30;;;;;;;;2915:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2915:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2915:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2915:31:9;;;;;;;;;;;;;;;;:41;;;2957:4;2915:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2915:47:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2915:47:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2915:47:9;;;;;;;;;;;;;;;;2908:54;;3005:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3005:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3005:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3005:31:9;;;;;;;;;;;;;;;;:40;;;3046:7;;;;;;;;;;;3055:4;3005:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3005:55:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3005:55:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3005:55:9;;;;;;;;;;;;;;;;2997:64;;;;;;;;3076:19;3090:4;3076:19;;;;;;;;;;;;;;;;;;2809:293;:::o;194:30:11:-;223:1;194:30;:::o;902:26:8:-;;;;:::o;314:25:11:-;;;;:::o;377:::-;;;;:::o;1050:33:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;10641:159:9:-;10732:4;297:7;10759:34;;10778:3;;;;;;;;;;;10759:22;;:16;:22;:34;;;;;;;;10752:41;;10641:159;;;:::o;1089:19:8:-;;;;;;;;;;;;;:::o;289::11:-;;;;:::o;1649:538:9:-;1305:7;;;;;;;;;;;1291:21;;:10;:21;;;1283:30;;;;;;;;1727:20;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;1873:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1873:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1873:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1873:31:9;;;;;;;;;;;;;;;;:44;;;1918:10;1930:4;1936:8;1873:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1873:72:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1873:72:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1873:72:9;;;;;;;;;;;;;;;;:156;;;;;1965:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1965:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1965:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1965:31:9;;;;;;;;;;;;;;;;:39;;;2005:13;;;;;;;;;;;2020:8;1965:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1965:64:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1965:64:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1965:64:9;;;;;;;;;;;;;;;;1873:156;1862:168;;;;;;;;2040:13;;;;;;;;;;;:28;;;2069:8;2040:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2040:38:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2040:38:9;;;;2098:8;2088:7;:18;;;;2124:19;2116:5;;:27;;;;;;;;;;;;;;;;;;;;;;;;2158:22;2172:7;;2158:22;;;;;;;;;;;;;;;;;;1323:1;1649:538;:::o;1025:19:8:-;;;;:::o;1002:17::-;;;;;;;;;;;;;:::o;345:26:11:-;;;;:::o;934::8:-;;;;;;;;;;;;;:::o;4387:307:11:-;4455:4;4488:1;4478:7;;:11;4475:119;;;4584:9;;4574:7;;:19;4555:13;;4545:7;;:23;4527:14;;:42;4511:13;;:58;4510:84;;;;;;;;4503:91;;;;4475:119;4677:9;;4671:3;:15;4652:13;;4646:3;:19;4628:14;;:38;4612:13;;:54;4611:76;;;;;;;;4604:83;;4387:307;;:::o;1930:254::-;2038:9;2063:16;:14;:16::i;:::-;2096:56;2106:17;2125;2144:7;2096:9;:56::i;:::-;2089:63;;2162:15;:13;:15::i;:::-;1930:254;;;;;:::o;262:42:9:-;297:7;262:42;:::o;4823:231:11:-;4890:9;;4883:3;:16;;4879:169;;;5023:13;;5017:3;:19;4999:14;;:38;4982:13;;:55;;;;;;;;;;;4879:169;4823:231::o;7876:535:9:-;8008:11;8035:18;8159:23;8192:9;7970:19;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;8056:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8056:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8056:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8056:31:9;;;;;;;;;;;;;;;;8035:52;;8135:12;8105:42;;:19;:26;:42;8097:51;;;;;;;;8250:61;8260:12;8274:19;8295:15;8250:9;:61::i;:::-;8211:100;;;;;;;;;;;;8345:10;8327:77;;;8357:19;8378;8399:4;8327:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;8327:77:9;;;;;;;;;;;;;;;;;;;7876:535;;;;;;;;:::o;5112:302:11:-;5337:11;;;;;;;;;;;:29;;;5367:4;223:1;5337:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5337:41:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5337:41:11;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5337:41:11;;;;;;;;;;;;;;;;5320:14;:58;;;;5404:3;5388:13;:19;;;;5112:302::o;5926:1172:9:-;6042:9;6476:11;6645:18;6712:7;6106:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6106:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6106:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6106:31:9;;;;;;;;;;;;;;;;:44;;;6151:10;6163:4;6169:17;6106:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6106:81:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6106:81:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6106:81:9;;;;;;;;;;;;;;;;:174;;;;;6207:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6207:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6207:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6207:31:9;;;;;;;;;;;;;;;;:39;;;6247:13;;;;;;;;;;;6262:17;6207:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6207:73:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6207:73:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6207:73:9;;;;;;;;;;;;;;;;6106:174;6095:186;;;;;;;;6291:13;;;;;;;;;;;:28;;;6320:17;6291:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6291:47:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6291:47:9;;;;6387:13;;;;;;;;;;;:27;;;6415:17;6387:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6387:46:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6387:46:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6387:46:9;;;;;;;;;;;;;;;;:54;;;6442:4;6448:17;6387:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6387:79:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6387:79:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6387:79:9;;;;;;;;;;;;;;;;;6490:4;:9;;;6500:17;6519;6538:9;6490:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6490:58:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6490:58:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6490:58:9;;;;;;;;;;;;;;;;6476:72;;6585:6;6565:17;:26;6558:33;;6666:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6666:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6666:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6666:31:9;;;;;;;;;;;;;;;;6645:52;;6722:1;6712:11;;6707:176;6729:12;6725:16;;:1;:16;;;6707:176;;;6769:17;6764:22;;:1;:22;;;;6760:123;;;6812:13;;;;;;;;;;;:27;;;6840:1;6812:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6812:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6812:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6812:30:9;;;;;;;;;;;;;;;;:39;;;6852:10;6864:17;6812:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6812:70:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6812:70:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6812:70:9;;;;;;;;;;;;;;;;6804:79;;;;;;;;6760:123;6743:3;;;;;;;6707:176;;;6938:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6938:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6938:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6938:31:9;;;;;;;;;;;;;;;;:40;;;6979:10;6991:6;6938:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6938:60:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6938:60:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6938:60:9;;;;;;;;;;;;;;;;6930:69;;;;;;;;7036:10;7014:77;;;7048:17;7067;7086:4;7014:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5926:1172;;;;;;;;:::o;2309:395::-;2410:18;2477:7;1305;;;;;;;;;;;1291:21;;:10;:21;;;1283:30;;;;;;;;2375:19;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;2431:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2431:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2431:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2431:31:9;;;;;;;;;;;;;;;;2410:52;;2487:1;2477:11;;2472:158;2494:12;2490:16;;:1;:16;;;2472:158;;;2533:13;;;;;;;;;;;:27;;;2561:1;2533:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2533:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2533:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2533:30:9;;;;;;;;;;;;;;;;:39;;;2573:7;;;;;;;;;;;2582:13;;;;;;;;;;;:27;;;2610:1;2582:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2582:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2582:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2582:30:9;;;;;;;;;;;;;;;;:40;;;2623:4;2582:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2582:46:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2582:46:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2582:46:9;;;;;;;;;;;;;;;;2533:96;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2533:96:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2533:96:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2533:96:9;;;;;;;;;;;;;;;;2525:105;;;;;;;;2508:3;;;;;;;2472:158;;;2648:19;2640:5;;:27;;;;;;;;;;;;;;;;;;;;;;;;2682:15;;;;;;;;;;1323:1;2309:395;;:::o;4604:853::-;4752:11;4849:18;4988:32;5131:11;5144:23;5169:9;4714:19;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;4814:1;4792:17;4787:23;;:28;;:51;;;;;4837:1;4824:9;4819:15;;:19;4787:51;4779:60;;;;;;;;4870:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4870:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4870:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4870:31:9;;;;;;;;;;;;;;;;4849:52;;4940:1;4919:17;:22;;;;:58;;;;;4965:12;4945:32;;:17;:32;;;4919:58;4911:67;;;;;;;;5033:12;5023:23;;;;;;;;;;;;;;;;;;;;;;;;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;5023:23:9;;;;4988:58;;5102:17;5097:23;;5056:19;5076:17;5056:38;;;;;;;;;;;;;;;;;;;:64;;;;;5182:61;5192:12;5206:19;5232:9;5227:15;;5182:9;:61::i;:::-;5130:113;;;;;;5272:1;5261:7;:12;;:40;;;;;5300:1;5277:19;:24;;5261:40;5253:49;;;;;;;;5327:7;5326:8;;5312:23;;5367:10;5350:100;;;5379:17;5398;5423:19;5422:20;;5445:4;5350:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4604:853;;;;;;;;;;;:::o;3429:840::-;3574:9;3665:18;3804:32;3946:11;3959:23;3984:9;3536:19;1441:6;1432:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1424:24;;;;;;;;3633:1;3611:17;3607:27;;:47;;;;;3653:1;3642:7;3638:16;3607:47;3599:56;;;;;;;;3686:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3686:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3686:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3686:31:9;;;;;;;;;;;;;;;;3665:52;;3756:1;3735:17;:22;;;;:58;;;;;3781:12;3761:32;;:17;:32;;;3735:58;3727:67;;;;;;;;3849:12;3839:23;;;;;;;;;;;;;;;;;;;;;;;;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;3839:23:9;;;;3804:58;;3917:17;3872:19;3892:17;3872:38;;;;;;;;;;;;;;;;;;;:63;;;;;3997:58;4007:12;4021:19;4046:7;3997:9;:58::i;:::-;3945:110;;;;;;4084:1;4073:7;:12;;:40;;;;;4112:1;4089:19;:24;;4073:40;4065:49;;;;;;;;4136:7;4124:20;;4180:10;4159:103;;;4192:17;4211;4235:19;4257:4;4159:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3429:840;;;;;;;;;;;:::o;8417:2070::-;8537:11;8550:23;8575:9;9478:7;8672:11;;;;;;;;;;;:23;;;8696:4;8702:19;8672:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;8672:50:9;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8672:50:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8672:50:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8672:50:9;;;;;;;;;;;;;;;;8650:72;;8757:1;8735:19;:23;8732:162;;;8779:41;8799:19;8798:20;;8779:13;:41::i;:::-;8772:48;;8732:162;;;8854:40;8873:19;8854:13;:40::i;:::-;8847:47;;8732:162;8926:1;8917:4;8913:14;;8905:23;;;;;;;;8948:34;8976:4;8948:19;:23;;:34;;;;:::i;:::-;8938:44;;9034:1;9015:15;:20;;:50;;;;;9050:15;9039:7;:26;;9015:50;9014:88;;;;9101:1;9082:15;:20;9014:88;8993:119;;;;;;;;9148:1;9126:19;:23;9123:340;;;9190:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9190:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9190:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9190:31:9;;;;;;;;;;;;;;;;:44;;;9235:10;9247:4;9258:7;9190:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9190:77:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9190:77:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9190:77:9;;;;;;;;;;;;;;;;:178;;;;;9287:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9287:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9287:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9287:31:9;;;;;;;;;;;;;;;;:39;;;9327:13;;;;;;;;;;;9347:19;9287:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9287:81:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9287:81:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9287:81:9;;;;;;;;;;;;;;;;9190:178;9165:217;;;;;;;;9397:13;;;;;;;;;;;:28;;;9431:19;9397:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9397:55:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9397:55:9;;;;9123:340;9488:1;9478:11;;9473:535;9495:12;9491:16;;:1;:16;;;9473:535;;;9557:1;9531:19;9551:1;9531:22;;;;;;;;;;;;;;;;;;;;:27;;9528:470;;;9606:1;9581:19;9601:1;9581:22;;;;;;;;;;;;;;;;;;;;:26;9578:310;;;9639:13;;;;;;;;;;;:27;;;9667:1;9639:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9639:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9639:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9639:30:9;;;;;;;;;;;;;;;;:43;;;9683:10;9695:4;9707:19;9727:1;9707:22;;;;;;;;;;;;;;;;;;;;9706:23;;9639:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9639:92:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9639:92:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9639:92:9;;;;;;;;;;;;;;;;9631:101;;;;;;;;9578:310;;;9787:13;;;;;;;;;;;:27;;;9815:1;9787:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9787:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9787:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9787:30:9;;;;;;;;;;;;;;;;:39;;;9827:10;9844:19;9864:1;9844:22;;;;;;;;;;;;;;;;;;;;9787:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9787:81:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9787:81:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9787:81:9;;;;;;;;;;;;;;;;9779:90;;;;;;;;9578:310;9932:51;9960:19;9980:1;9960:22;;;;;;;;;;;;;;;;;;;;9932:20;9953:1;9932:23;;;;;;;;;;;;;;;;;;;;:27;;:51;;;;:::i;:::-;9906:20;9927:1;9906:23;;;;;;;;;;;;;;;;;;;:77;;;;9528:470;9509:3;;;;;;;9473:535;;;10043:1;10021:19;:23;10018:463;;;10274:13;;;;;;;;;;;:29;;;10310:19;10309:20;;10274:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10274:57:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10274:57:9;;;;10358:1;10348:7;:11;10345:126;;;10387:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10387:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10387:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10387:31:9;;;;;;;;;;;;;;;;:40;;;10428:10;10446:7;10445:8;;10387:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10387:68:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10387:68:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10387:68:9;;;;;;;;;;;;;;;;10379:77;;;;;;;;10345:126;10018:463;8417:2070;;;;;;;;:::o;2556:138:31:-;2612:8;2636:1;2632;:5;2628:9;;2656:1;2651;:6;;:16;;;;;2666:1;2661;:6;;2651:16;2650:38;;;;2677:1;2673;:5;:14;;;;;2686:1;2682;:5;2673:14;2650:38;2643:46;;;;;;2556:138;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/StandardMarket.sol\";\n\ncontract StandardMarketWithPriceLoggerData {\n\n /*\n * Constants\n */\n uint constant ONE = 0x10000000000000000;\n uint8 public constant LONG = 1;\n\n /*\n * Storage\n */\n uint public startDate;\n uint public endDate;\n uint public lastTradeDate;\n uint public lastTradePrice;\n uint public priceIntegral;\n}\n\ncontract StandardMarketWithPriceLoggerProxy is StandardMarketProxy, StandardMarketWithPriceLoggerData {\n\n /// @dev Constructor validates and sets market properties\n /// @param _creator Market creator\n /// @param _eventContract Event contract\n /// @param _marketMaker Market maker contract\n /// @param _fee Market fee\n /// @param _startDate Start date for price logging\n constructor(address proxied, address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee, uint _startDate)\n public\n StandardMarketProxy(proxied, _creator, _eventContract, _marketMaker, _fee)\n {\n require(eventContract.getOutcomeCount() == 2);\n\n if (_startDate == 0)\n startDate = now;\n else {\n // The earliest start date is the market creation date\n require(_startDate >= now);\n startDate = _startDate;\n }\n\n lastTradeDate = startDate;\n // initialize lastTradePrice to assuming uniform probabilities of outcomes\n lastTradePrice = ONE / 2;\n }\n}\n\ncontract StandardMarketWithPriceLogger is StandardMarket, StandardMarketWithPriceLoggerData {\n /*\n * Public functions\n */\n /// @dev Allows to buy outcome tokens from market maker\n /// @param outcomeTokenIndex Index of the outcome token to buy\n /// @param outcomeTokenCount Amount of outcome tokens to buy\n /// @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n /// @return Cost in collateral tokens\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost)\n public\n returns (uint cost)\n {\n logPriceBefore();\n cost = super.buy(outcomeTokenIndex, outcomeTokenCount, maxCost);\n logPriceAfter();\n }\n\n /// @dev Allows to sell outcome tokens to market maker\n /// @param outcomeTokenIndex Index of the outcome token to sell\n /// @param outcomeTokenCount Amount of outcome tokens to sell\n /// @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n /// @return Profit in collateral tokens\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint profit)\n {\n logPriceBefore();\n profit = super.sell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n logPriceAfter();\n }\n\n /// @dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n /// shares of all other outcome tokens.\n /// @param outcomeTokenIndex Index of the outcome token to short sell\n /// @param outcomeTokenCount Amount of outcome tokens to short sell\n /// @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n /// @return Cost to short sell outcome in collateral tokens\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint cost)\n {\n logPriceBefore();\n cost = super.shortSell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n logPriceAfter();\n }\n\n /// @dev Allows to trade outcome tokens with market maker\n /// @param outcomeTokenAmounts Amounts of outcome tokens to trade\n /// @param collateralLimit The maximum cost or minimum profit in collateral tokens\n /// @return Cost/profit in collateral tokens\n function trade(int[] outcomeTokenAmounts, int collateralLimit)\n public\n returns (int netCost)\n {\n logPriceBefore();\n netCost = super.trade(outcomeTokenAmounts, collateralLimit);\n logPriceAfter();\n }\n\n\n /// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator\n function close()\n public\n {\n endDate = now;\n super.close();\n }\n\n /// @dev Calculates average price for long tokens based on price integral\n /// @return Average price for long tokens over time\n function getAvgPrice()\n public\n view\n returns (uint)\n {\n if(endDate > 0)\n return (priceIntegral + lastTradePrice * (endDate - lastTradeDate)) / (endDate - startDate);\n return (priceIntegral + lastTradePrice * (now - lastTradeDate)) / (now - startDate);\n }\n\n /*\n * Private functions\n */\n /// @dev Adds price integral since the last trade to the total price integral\n function logPriceBefore()\n private\n {\n if (now >= startDate) {\n // Accumulate price integral only if logging has begun\n priceIntegral += lastTradePrice * (now - lastTradeDate);\n }\n }\n\n /// @dev Updates last trade timestamp and price\n function logPriceAfter()\n private\n {\n // Refresh lastTradePrice after every transactions as we don't know if\n // this will be the last transaction before logging period starts\n lastTradePrice = marketMaker.calcMarginalPrice(this, LONG);\n lastTradeDate = now;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","exportedSymbols":{"StandardMarketWithPriceLogger":[3458],"StandardMarketWithPriceLoggerData":[3195],"StandardMarketWithPriceLoggerProxy":[3260]},"id":3459,"nodeType":"SourceUnit","nodes":[{"id":3177,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:11"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","file":"../Markets/StandardMarket.sol","id":3178,"nodeType":"ImportDirective","scope":3459,"sourceUnit":3113,"src":"25:39:11","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3195,"linearizedBaseContracts":[3195],"name":"StandardMarketWithPriceLoggerData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":3181,"name":"ONE","nodeType":"VariableDeclaration","scope":3195,"src":"149:39:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3179,"name":"uint","nodeType":"ElementaryTypeName","src":"149:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":3180,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"169:19:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"internal"},{"constant":true,"id":3184,"name":"LONG","nodeType":"VariableDeclaration","scope":3195,"src":"194:30:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3182,"name":"uint8","nodeType":"ElementaryTypeName","src":"194:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3183,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"223:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3186,"name":"startDate","nodeType":"VariableDeclaration","scope":3195,"src":"262:21:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3185,"name":"uint","nodeType":"ElementaryTypeName","src":"262:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3188,"name":"endDate","nodeType":"VariableDeclaration","scope":3195,"src":"289:19:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3187,"name":"uint","nodeType":"ElementaryTypeName","src":"289:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3190,"name":"lastTradeDate","nodeType":"VariableDeclaration","scope":3195,"src":"314:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3189,"name":"uint","nodeType":"ElementaryTypeName","src":"314:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3192,"name":"lastTradePrice","nodeType":"VariableDeclaration","scope":3195,"src":"345:26:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3191,"name":"uint","nodeType":"ElementaryTypeName","src":"345:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3194,"name":"priceIntegral","nodeType":"VariableDeclaration","scope":3195,"src":"377:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3193,"name":"uint","nodeType":"ElementaryTypeName","src":"377:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"}],"scope":3459,"src":"66:339:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3196,"name":"StandardMarketProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":2326,"src":"454:19:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}},"id":3197,"nodeType":"InheritanceSpecifier","src":"454:19:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3198,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"475:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3199,"nodeType":"InheritanceSpecifier","src":"475:33:11"}],"contractDependencies":[2172,2248,2326,3195,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3260,"linearizedBaseContracts":[3260,3195,2326,2248,2172,6701,6673],"name":"StandardMarketWithPriceLoggerProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3258,"nodeType":"Block","src":"1025:442:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3222,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1043:13:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"1043:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3224,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1043:31:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1078:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1043:36:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3221,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1035:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3227,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1035:45:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3228,"nodeType":"ExpressionStatement","src":"1035:45:11"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3229,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1095:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3230,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1109:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1095:15:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3246,"nodeType":"Block","src":"1154:154:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3237,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1243:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3238,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1257:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1243:17:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1235:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1235:26:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3241,"nodeType":"ExpressionStatement","src":"1235:26:11"},{"expression":{"argumentTypes":null,"id":3244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3242,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1275:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3243,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1287:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1275:22:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3245,"nodeType":"ExpressionStatement","src":"1275:22:11"}]},"id":3247,"nodeType":"IfStatement","src":"1091:217:11","trueBody":{"expression":{"argumentTypes":null,"id":3234,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3232,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1124:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3233,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1136:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1124:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3235,"nodeType":"ExpressionStatement","src":"1124:15:11"}},{"expression":{"argumentTypes":null,"id":3250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3248,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"1318:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3249,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1334:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1318:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3251,"nodeType":"ExpressionStatement","src":"1318:25:11"},{"expression":{"argumentTypes":null,"id":3256,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3252,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"1436:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3255,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3253,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3181,"src":"1453:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3254,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1459:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1453:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1436:24:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3257,"nodeType":"ExpressionStatement","src":"1436:24:11"}]},"documentation":"@dev Constructor validates and sets market properties\n @param _creator Market creator\n @param _eventContract Event contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _startDate Start date for price logging","id":3259,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3214,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3201,"src":"966:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3215,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3203,"src":"975:8:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3216,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3205,"src":"985:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3217,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3207,"src":"1001:12:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3218,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3209,"src":"1015:4:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"id":3219,"modifierName":{"argumentTypes":null,"id":3213,"name":"StandardMarketProxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2326,"src":"946:19:11","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarketProxy_$2326_$","typeString":"type(contract StandardMarketProxy)"}},"nodeType":"ModifierInvocation","src":"946:74:11"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3212,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3201,"name":"proxied","nodeType":"VariableDeclaration","scope":3259,"src":"810:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3200,"name":"address","nodeType":"ElementaryTypeName","src":"810:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3203,"name":"_creator","nodeType":"VariableDeclaration","scope":3259,"src":"827:16:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3202,"name":"address","nodeType":"ElementaryTypeName","src":"827:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3205,"name":"_eventContract","nodeType":"VariableDeclaration","scope":3259,"src":"845:20:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3204,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"845:5:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3207,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":3259,"src":"867:24:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3206,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"867:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3209,"name":"_fee","nodeType":"VariableDeclaration","scope":3259,"src":"893:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3208,"name":"uint24","nodeType":"ElementaryTypeName","src":"893:6:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3211,"name":"_startDate","nodeType":"VariableDeclaration","scope":3259,"src":"906:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3210,"name":"uint","nodeType":"ElementaryTypeName","src":"906:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"809:113:11"},"payable":false,"returnParameters":{"id":3220,"nodeType":"ParameterList","parameters":[],"src":"1025:0:11"},"scope":3260,"src":"798:669:11","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3459,"src":"407:1062:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3261,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"1513:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3262,"nodeType":"InheritanceSpecifier","src":"1513:14:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3263,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"1529:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3264,"nodeType":"InheritanceSpecifier","src":"1529:33:11"}],"contractDependencies":[2172,2238,2248,3112,3195,6673],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3458,"linearizedBaseContracts":[3458,3195,3112,2248,2238,2172,6673],"name":"StandardMarketWithPriceLogger","nodeType":"ContractDefinition","nodes":[{"body":{"id":3290,"nodeType":"Block","src":"2053:131:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3275,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2063:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2063:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3277,"nodeType":"ExpressionStatement","src":"2063:16:11"},{"expression":{"argumentTypes":null,"id":3285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3278,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3273,"src":"2089:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3281,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3266,"src":"2106:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3282,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3268,"src":"2125:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3283,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3270,"src":"2144:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3279,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2096:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buy","nodeType":"MemberAccess","referencedDeclaration":2596,"src":"2096:9:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3284,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2096:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2089:63:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3286,"nodeType":"ExpressionStatement","src":"2089:63:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3287,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2162:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3288,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2162:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3289,"nodeType":"ExpressionStatement","src":"2162:15:11"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":3291,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":3271,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3266,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3291,"src":"1943:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3265,"name":"uint8","nodeType":"ElementaryTypeName","src":"1943:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3268,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3291,"src":"1968:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3267,"name":"uint","nodeType":"ElementaryTypeName","src":"1968:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3270,"name":"maxCost","nodeType":"VariableDeclaration","scope":3291,"src":"1992:12:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3269,"name":"uint","nodeType":"ElementaryTypeName","src":"1992:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1942:63:11"},"payable":false,"returnParameters":{"id":3274,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3273,"name":"cost","nodeType":"VariableDeclaration","scope":3291,"src":"2038:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3272,"name":"uint","nodeType":"ElementaryTypeName","src":"2038:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2037:11:11"},"scope":3458,"src":"1930:254:11","stateMutability":"nonpayable","superFunction":2596,"visibility":"public"},{"body":{"id":3317,"nodeType":"Block","src":"2647:136:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3302,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2657:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3303,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2657:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3304,"nodeType":"ExpressionStatement","src":"2657:16:11"},{"expression":{"argumentTypes":null,"id":3312,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3305,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3300,"src":"2683:6:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3308,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3293,"src":"2703:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3309,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3295,"src":"2722:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3310,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3297,"src":"2741:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3306,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2692:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3307,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"2692:10:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3311,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2692:59:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2683:68:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3313,"nodeType":"ExpressionStatement","src":"2683:68:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3314,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2761:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2761:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3316,"nodeType":"ExpressionStatement","src":"2761:15:11"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":3318,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":3298,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3293,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3318,"src":"2533:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3292,"name":"uint8","nodeType":"ElementaryTypeName","src":"2533:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3295,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3318,"src":"2558:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3294,"name":"uint","nodeType":"ElementaryTypeName","src":"2558:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3297,"name":"minProfit","nodeType":"VariableDeclaration","scope":3318,"src":"2582:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3296,"name":"uint","nodeType":"ElementaryTypeName","src":"2582:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2532:65:11"},"payable":false,"returnParameters":{"id":3301,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3300,"name":"profit","nodeType":"VariableDeclaration","scope":3318,"src":"2630:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3299,"name":"uint","nodeType":"ElementaryTypeName","src":"2630:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2629:13:11"},"scope":3458,"src":"2519:264:11","stateMutability":"nonpayable","superFunction":2707,"visibility":"public"},{"body":{"id":3344,"nodeType":"Block","src":"3383:139:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3329,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3393:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3330,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3393:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3331,"nodeType":"ExpressionStatement","src":"3393:16:11"},{"expression":{"argumentTypes":null,"id":3339,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3332,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3327,"src":"3419:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3335,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3320,"src":"3442:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3336,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3322,"src":"3461:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3337,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3324,"src":"3480:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3333,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3426:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"shortSell","nodeType":"MemberAccess","referencedDeclaration":2822,"src":"3426:15:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3426:64:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3419:71:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3340,"nodeType":"ExpressionStatement","src":"3419:71:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3341,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"3500:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3342,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3500:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3343,"nodeType":"ExpressionStatement","src":"3500:15:11"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":3345,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":3325,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3320,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3345,"src":"3271:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3319,"name":"uint8","nodeType":"ElementaryTypeName","src":"3271:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3322,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3345,"src":"3296:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3321,"name":"uint","nodeType":"ElementaryTypeName","src":"3296:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3324,"name":"minProfit","nodeType":"VariableDeclaration","scope":3345,"src":"3320:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3323,"name":"uint","nodeType":"ElementaryTypeName","src":"3320:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3270:65:11"},"payable":false,"returnParameters":{"id":3328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3327,"name":"cost","nodeType":"VariableDeclaration","scope":3345,"src":"3368:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3326,"name":"uint","nodeType":"ElementaryTypeName","src":"3368:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3367:11:11"},"scope":3458,"src":"3252:270:11","stateMutability":"nonpayable","superFunction":2822,"visibility":"public"},{"body":{"id":3369,"nodeType":"Block","src":"3908:127:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3355,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3918:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3918:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3357,"nodeType":"ExpressionStatement","src":"3918:16:11"},{"expression":{"argumentTypes":null,"id":3364,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3358,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3353,"src":"3944:7:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3361,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3348,"src":"3966:19:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":3362,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3350,"src":"3987:15:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3359,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3954:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"trade","nodeType":"MemberAccess","referencedDeclaration":2875,"src":"3954:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$","typeString":"function (int256[] memory,int256) returns (int256)"}},"id":3363,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3954:49:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3944:59:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3365,"nodeType":"ExpressionStatement","src":"3944:59:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3366,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"4013:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3367,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4013:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3368,"nodeType":"ExpressionStatement","src":"4013:15:11"}]},"documentation":"@dev Allows to trade outcome tokens with market maker\n @param outcomeTokenAmounts Amounts of outcome tokens to trade\n @param collateralLimit The maximum cost or minimum profit in collateral tokens\n @return Cost/profit in collateral tokens","id":3370,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":3351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3348,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3370,"src":"3811:25:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":3346,"name":"int","nodeType":"ElementaryTypeName","src":"3811:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3347,"length":null,"nodeType":"ArrayTypeName","src":"3811:5:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":3350,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3370,"src":"3838:19:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3349,"name":"int","nodeType":"ElementaryTypeName","src":"3838:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3810:48:11"},"payable":false,"returnParameters":{"id":3354,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3353,"name":"netCost","nodeType":"VariableDeclaration","scope":3370,"src":"3891:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3352,"name":"int","nodeType":"ElementaryTypeName","src":"3891:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3890:13:11"},"scope":3458,"src":"3796:239:11","stateMutability":"nonpayable","superFunction":2875,"visibility":"public"},{"body":{"id":3382,"nodeType":"Block","src":"4194:53:11","statements":[{"expression":{"argumentTypes":null,"id":3375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3373,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4204:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3374,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4214:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4204:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3376,"nodeType":"ExpressionStatement","src":"4204:13:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3377,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"4227:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2460,"src":"4227:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:13:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3381,"nodeType":"ExpressionStatement","src":"4227:13:11"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":3383,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":3371,"nodeType":"ParameterList","parameters":[],"src":"4172:2:11"},"payable":false,"returnParameters":{"id":3372,"nodeType":"ParameterList","parameters":[],"src":"4194:0:11"},"scope":3458,"src":"4158:89:11","stateMutability":"nonpayable","superFunction":2460,"visibility":"public"},{"body":{"id":3422,"nodeType":"Block","src":"4465:229:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3388,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4478:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3389,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4488:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4478:11:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3406,"nodeType":"IfStatement","src":"4475:119:11","trueBody":{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3404,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3398,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3391,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4511:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3392,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4527:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3393,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4545:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3394,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4555:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4545:23:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3396,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4544:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4527:42:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4511:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3399,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4510:60:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3400,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4574:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3401,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4584:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4574:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3403,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4573:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4510:84:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3405,"nodeType":"Return","src":"4503:91:11"}},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3407,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4612:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3413,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3408,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4628:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3411,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3409,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4646:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3410,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4652:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4646:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3412,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4645:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4628:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4612:54:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3415,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4611:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3416,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4671:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3417,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4677:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4671:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3419,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4670:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4611:76:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3421,"nodeType":"Return","src":"4604:83:11"}]},"documentation":"@dev Calculates average price for long tokens based on price integral\n @return Average price for long tokens over time","id":3423,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getAvgPrice","nodeType":"FunctionDefinition","parameters":{"id":3384,"nodeType":"ParameterList","parameters":[],"src":"4407:2:11"},"payable":false,"returnParameters":{"id":3387,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3386,"name":"","nodeType":"VariableDeclaration","scope":3423,"src":"4455:4:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3385,"name":"uint","nodeType":"ElementaryTypeName","src":"4455:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4454:6:11"},"scope":3458,"src":"4387:307:11","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":3440,"nodeType":"Block","src":"4869:185:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3426,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4883:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3427,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4890:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4883:16:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3439,"nodeType":"IfStatement","src":"4879:169:11","trueBody":{"id":3438,"nodeType":"Block","src":"4901:147:11","statements":[{"expression":{"argumentTypes":null,"id":3436,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3429,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4982:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3430,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4999:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3431,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5017:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3432,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5023:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5017:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3434,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5016:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4982:55:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3437,"nodeType":"ExpressionStatement","src":"4982:55:11"}]}}]},"documentation":"@dev Adds price integral since the last trade to the total price integral","id":3441,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceBefore","nodeType":"FunctionDefinition","parameters":{"id":3424,"nodeType":"ParameterList","parameters":[],"src":"4846:2:11"},"payable":false,"returnParameters":{"id":3425,"nodeType":"ParameterList","parameters":[],"src":"4869:0:11"},"scope":3458,"src":"4823:231:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3456,"nodeType":"Block","src":"5157:257:11","statements":[{"expression":{"argumentTypes":null,"id":3450,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3444,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"5320:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3447,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7701,"src":"5367:4:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"id":3448,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3184,"src":"5373:4:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3445,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"5337:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":3446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcMarginalPrice","nodeType":"MemberAccess","referencedDeclaration":1570,"src":"5337:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_uint8_$returns$_t_uint256_$","typeString":"function (contract Market,uint8) view external returns (uint256)"}},"id":3449,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5337:41:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5320:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3451,"nodeType":"ExpressionStatement","src":"5320:58:11"},{"expression":{"argumentTypes":null,"id":3454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3452,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5388:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3453,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5404:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5388:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3455,"nodeType":"ExpressionStatement","src":"5388:19:11"}]},"documentation":"@dev Updates last trade timestamp and price","id":3457,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceAfter","nodeType":"FunctionDefinition","parameters":{"id":3442,"nodeType":"ParameterList","parameters":[],"src":"5134:2:11"},"payable":false,"returnParameters":{"id":3443,"nodeType":"ParameterList","parameters":[],"src":"5157:0:11"},"scope":3458,"src":"5112:302:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"}],"scope":3459,"src":"1471:3945:11"}],"src":"0:5417:11"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","exportedSymbols":{"StandardMarketWithPriceLogger":[3458],"StandardMarketWithPriceLoggerData":[3195],"StandardMarketWithPriceLoggerProxy":[3260]},"id":3459,"nodeType":"SourceUnit","nodes":[{"id":3177,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:11"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","file":"../Markets/StandardMarket.sol","id":3178,"nodeType":"ImportDirective","scope":3459,"sourceUnit":3113,"src":"25:39:11","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3195,"linearizedBaseContracts":[3195],"name":"StandardMarketWithPriceLoggerData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":3181,"name":"ONE","nodeType":"VariableDeclaration","scope":3195,"src":"149:39:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3179,"name":"uint","nodeType":"ElementaryTypeName","src":"149:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":3180,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"169:19:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"internal"},{"constant":true,"id":3184,"name":"LONG","nodeType":"VariableDeclaration","scope":3195,"src":"194:30:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3182,"name":"uint8","nodeType":"ElementaryTypeName","src":"194:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3183,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"223:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3186,"name":"startDate","nodeType":"VariableDeclaration","scope":3195,"src":"262:21:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3185,"name":"uint","nodeType":"ElementaryTypeName","src":"262:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3188,"name":"endDate","nodeType":"VariableDeclaration","scope":3195,"src":"289:19:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3187,"name":"uint","nodeType":"ElementaryTypeName","src":"289:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3190,"name":"lastTradeDate","nodeType":"VariableDeclaration","scope":3195,"src":"314:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3189,"name":"uint","nodeType":"ElementaryTypeName","src":"314:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3192,"name":"lastTradePrice","nodeType":"VariableDeclaration","scope":3195,"src":"345:26:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3191,"name":"uint","nodeType":"ElementaryTypeName","src":"345:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3194,"name":"priceIntegral","nodeType":"VariableDeclaration","scope":3195,"src":"377:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3193,"name":"uint","nodeType":"ElementaryTypeName","src":"377:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"}],"scope":3459,"src":"66:339:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3196,"name":"StandardMarketProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":2326,"src":"454:19:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}},"id":3197,"nodeType":"InheritanceSpecifier","src":"454:19:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3198,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"475:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3199,"nodeType":"InheritanceSpecifier","src":"475:33:11"}],"contractDependencies":[2172,2248,2326,3195,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3260,"linearizedBaseContracts":[3260,3195,2326,2248,2172,6701,6673],"name":"StandardMarketWithPriceLoggerProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3258,"nodeType":"Block","src":"1025:442:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3222,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1043:13:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"1043:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3224,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1043:31:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1078:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1043:36:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3221,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1035:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3227,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1035:45:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3228,"nodeType":"ExpressionStatement","src":"1035:45:11"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3229,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1095:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3230,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1109:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1095:15:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3246,"nodeType":"Block","src":"1154:154:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3237,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1243:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3238,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1257:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1243:17:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1235:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1235:26:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3241,"nodeType":"ExpressionStatement","src":"1235:26:11"},{"expression":{"argumentTypes":null,"id":3244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3242,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1275:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3243,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1287:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1275:22:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3245,"nodeType":"ExpressionStatement","src":"1275:22:11"}]},"id":3247,"nodeType":"IfStatement","src":"1091:217:11","trueBody":{"expression":{"argumentTypes":null,"id":3234,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3232,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1124:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3233,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1136:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1124:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3235,"nodeType":"ExpressionStatement","src":"1124:15:11"}},{"expression":{"argumentTypes":null,"id":3250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3248,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"1318:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3249,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1334:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1318:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3251,"nodeType":"ExpressionStatement","src":"1318:25:11"},{"expression":{"argumentTypes":null,"id":3256,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3252,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"1436:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3255,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3253,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3181,"src":"1453:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3254,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1459:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1453:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1436:24:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3257,"nodeType":"ExpressionStatement","src":"1436:24:11"}]},"documentation":"@dev Constructor validates and sets market properties\n @param _creator Market creator\n @param _eventContract Event contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _startDate Start date for price logging","id":3259,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3214,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3201,"src":"966:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3215,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3203,"src":"975:8:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3216,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3205,"src":"985:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3217,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3207,"src":"1001:12:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3218,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3209,"src":"1015:4:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"id":3219,"modifierName":{"argumentTypes":null,"id":3213,"name":"StandardMarketProxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2326,"src":"946:19:11","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarketProxy_$2326_$","typeString":"type(contract StandardMarketProxy)"}},"nodeType":"ModifierInvocation","src":"946:74:11"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3212,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3201,"name":"proxied","nodeType":"VariableDeclaration","scope":3259,"src":"810:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3200,"name":"address","nodeType":"ElementaryTypeName","src":"810:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3203,"name":"_creator","nodeType":"VariableDeclaration","scope":3259,"src":"827:16:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3202,"name":"address","nodeType":"ElementaryTypeName","src":"827:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3205,"name":"_eventContract","nodeType":"VariableDeclaration","scope":3259,"src":"845:20:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3204,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"845:5:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3207,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":3259,"src":"867:24:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3206,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"867:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3209,"name":"_fee","nodeType":"VariableDeclaration","scope":3259,"src":"893:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3208,"name":"uint24","nodeType":"ElementaryTypeName","src":"893:6:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3211,"name":"_startDate","nodeType":"VariableDeclaration","scope":3259,"src":"906:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3210,"name":"uint","nodeType":"ElementaryTypeName","src":"906:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"809:113:11"},"payable":false,"returnParameters":{"id":3220,"nodeType":"ParameterList","parameters":[],"src":"1025:0:11"},"scope":3260,"src":"798:669:11","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3459,"src":"407:1062:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3261,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"1513:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3262,"nodeType":"InheritanceSpecifier","src":"1513:14:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3263,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"1529:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3264,"nodeType":"InheritanceSpecifier","src":"1529:33:11"}],"contractDependencies":[2172,2238,2248,3112,3195,6673],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3458,"linearizedBaseContracts":[3458,3195,3112,2248,2238,2172,6673],"name":"StandardMarketWithPriceLogger","nodeType":"ContractDefinition","nodes":[{"body":{"id":3290,"nodeType":"Block","src":"2053:131:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3275,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2063:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2063:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3277,"nodeType":"ExpressionStatement","src":"2063:16:11"},{"expression":{"argumentTypes":null,"id":3285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3278,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3273,"src":"2089:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3281,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3266,"src":"2106:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3282,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3268,"src":"2125:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3283,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3270,"src":"2144:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3279,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2096:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buy","nodeType":"MemberAccess","referencedDeclaration":2596,"src":"2096:9:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3284,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2096:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2089:63:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3286,"nodeType":"ExpressionStatement","src":"2089:63:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3287,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2162:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3288,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2162:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3289,"nodeType":"ExpressionStatement","src":"2162:15:11"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":3291,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":3271,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3266,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3291,"src":"1943:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3265,"name":"uint8","nodeType":"ElementaryTypeName","src":"1943:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3268,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3291,"src":"1968:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3267,"name":"uint","nodeType":"ElementaryTypeName","src":"1968:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3270,"name":"maxCost","nodeType":"VariableDeclaration","scope":3291,"src":"1992:12:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3269,"name":"uint","nodeType":"ElementaryTypeName","src":"1992:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1942:63:11"},"payable":false,"returnParameters":{"id":3274,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3273,"name":"cost","nodeType":"VariableDeclaration","scope":3291,"src":"2038:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3272,"name":"uint","nodeType":"ElementaryTypeName","src":"2038:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2037:11:11"},"scope":3458,"src":"1930:254:11","stateMutability":"nonpayable","superFunction":2596,"visibility":"public"},{"body":{"id":3317,"nodeType":"Block","src":"2647:136:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3302,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2657:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3303,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2657:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3304,"nodeType":"ExpressionStatement","src":"2657:16:11"},{"expression":{"argumentTypes":null,"id":3312,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3305,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3300,"src":"2683:6:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3308,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3293,"src":"2703:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3309,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3295,"src":"2722:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3310,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3297,"src":"2741:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3306,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2692:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3307,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"2692:10:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3311,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2692:59:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2683:68:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3313,"nodeType":"ExpressionStatement","src":"2683:68:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3314,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2761:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2761:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3316,"nodeType":"ExpressionStatement","src":"2761:15:11"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":3318,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":3298,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3293,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3318,"src":"2533:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3292,"name":"uint8","nodeType":"ElementaryTypeName","src":"2533:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3295,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3318,"src":"2558:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3294,"name":"uint","nodeType":"ElementaryTypeName","src":"2558:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3297,"name":"minProfit","nodeType":"VariableDeclaration","scope":3318,"src":"2582:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3296,"name":"uint","nodeType":"ElementaryTypeName","src":"2582:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2532:65:11"},"payable":false,"returnParameters":{"id":3301,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3300,"name":"profit","nodeType":"VariableDeclaration","scope":3318,"src":"2630:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3299,"name":"uint","nodeType":"ElementaryTypeName","src":"2630:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2629:13:11"},"scope":3458,"src":"2519:264:11","stateMutability":"nonpayable","superFunction":2707,"visibility":"public"},{"body":{"id":3344,"nodeType":"Block","src":"3383:139:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3329,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3393:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3330,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3393:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3331,"nodeType":"ExpressionStatement","src":"3393:16:11"},{"expression":{"argumentTypes":null,"id":3339,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3332,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3327,"src":"3419:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3335,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3320,"src":"3442:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3336,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3322,"src":"3461:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3337,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3324,"src":"3480:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3333,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3426:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"shortSell","nodeType":"MemberAccess","referencedDeclaration":2822,"src":"3426:15:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3426:64:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3419:71:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3340,"nodeType":"ExpressionStatement","src":"3419:71:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3341,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"3500:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3342,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3500:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3343,"nodeType":"ExpressionStatement","src":"3500:15:11"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":3345,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":3325,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3320,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3345,"src":"3271:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3319,"name":"uint8","nodeType":"ElementaryTypeName","src":"3271:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3322,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3345,"src":"3296:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3321,"name":"uint","nodeType":"ElementaryTypeName","src":"3296:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3324,"name":"minProfit","nodeType":"VariableDeclaration","scope":3345,"src":"3320:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3323,"name":"uint","nodeType":"ElementaryTypeName","src":"3320:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3270:65:11"},"payable":false,"returnParameters":{"id":3328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3327,"name":"cost","nodeType":"VariableDeclaration","scope":3345,"src":"3368:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3326,"name":"uint","nodeType":"ElementaryTypeName","src":"3368:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3367:11:11"},"scope":3458,"src":"3252:270:11","stateMutability":"nonpayable","superFunction":2822,"visibility":"public"},{"body":{"id":3369,"nodeType":"Block","src":"3908:127:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3355,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3918:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3918:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3357,"nodeType":"ExpressionStatement","src":"3918:16:11"},{"expression":{"argumentTypes":null,"id":3364,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3358,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3353,"src":"3944:7:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3361,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3348,"src":"3966:19:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":3362,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3350,"src":"3987:15:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3359,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3954:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"trade","nodeType":"MemberAccess","referencedDeclaration":2875,"src":"3954:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$","typeString":"function (int256[] memory,int256) returns (int256)"}},"id":3363,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3954:49:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3944:59:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3365,"nodeType":"ExpressionStatement","src":"3944:59:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3366,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"4013:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3367,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4013:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3368,"nodeType":"ExpressionStatement","src":"4013:15:11"}]},"documentation":"@dev Allows to trade outcome tokens with market maker\n @param outcomeTokenAmounts Amounts of outcome tokens to trade\n @param collateralLimit The maximum cost or minimum profit in collateral tokens\n @return Cost/profit in collateral tokens","id":3370,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":3351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3348,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3370,"src":"3811:25:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":3346,"name":"int","nodeType":"ElementaryTypeName","src":"3811:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3347,"length":null,"nodeType":"ArrayTypeName","src":"3811:5:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":3350,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3370,"src":"3838:19:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3349,"name":"int","nodeType":"ElementaryTypeName","src":"3838:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3810:48:11"},"payable":false,"returnParameters":{"id":3354,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3353,"name":"netCost","nodeType":"VariableDeclaration","scope":3370,"src":"3891:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3352,"name":"int","nodeType":"ElementaryTypeName","src":"3891:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3890:13:11"},"scope":3458,"src":"3796:239:11","stateMutability":"nonpayable","superFunction":2875,"visibility":"public"},{"body":{"id":3382,"nodeType":"Block","src":"4194:53:11","statements":[{"expression":{"argumentTypes":null,"id":3375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3373,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4204:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3374,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4214:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4204:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3376,"nodeType":"ExpressionStatement","src":"4204:13:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3377,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"4227:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2460,"src":"4227:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:13:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3381,"nodeType":"ExpressionStatement","src":"4227:13:11"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":3383,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":3371,"nodeType":"ParameterList","parameters":[],"src":"4172:2:11"},"payable":false,"returnParameters":{"id":3372,"nodeType":"ParameterList","parameters":[],"src":"4194:0:11"},"scope":3458,"src":"4158:89:11","stateMutability":"nonpayable","superFunction":2460,"visibility":"public"},{"body":{"id":3422,"nodeType":"Block","src":"4465:229:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3388,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4478:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3389,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4488:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4478:11:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3406,"nodeType":"IfStatement","src":"4475:119:11","trueBody":{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3404,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3398,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3391,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4511:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3392,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4527:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3393,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4545:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3394,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4555:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4545:23:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3396,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4544:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4527:42:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4511:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3399,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4510:60:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3400,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4574:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3401,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4584:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4574:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3403,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4573:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4510:84:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3405,"nodeType":"Return","src":"4503:91:11"}},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3407,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4612:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3413,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3408,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4628:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3411,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3409,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4646:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3410,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4652:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4646:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3412,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4645:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4628:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4612:54:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3415,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4611:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3416,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4671:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3417,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4677:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4671:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3419,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4670:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4611:76:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3421,"nodeType":"Return","src":"4604:83:11"}]},"documentation":"@dev Calculates average price for long tokens based on price integral\n @return Average price for long tokens over time","id":3423,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getAvgPrice","nodeType":"FunctionDefinition","parameters":{"id":3384,"nodeType":"ParameterList","parameters":[],"src":"4407:2:11"},"payable":false,"returnParameters":{"id":3387,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3386,"name":"","nodeType":"VariableDeclaration","scope":3423,"src":"4455:4:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3385,"name":"uint","nodeType":"ElementaryTypeName","src":"4455:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4454:6:11"},"scope":3458,"src":"4387:307:11","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":3440,"nodeType":"Block","src":"4869:185:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3426,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4883:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3427,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4890:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4883:16:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3439,"nodeType":"IfStatement","src":"4879:169:11","trueBody":{"id":3438,"nodeType":"Block","src":"4901:147:11","statements":[{"expression":{"argumentTypes":null,"id":3436,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3429,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4982:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3430,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4999:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3431,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5017:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3432,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5023:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5017:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3434,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5016:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4982:55:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3437,"nodeType":"ExpressionStatement","src":"4982:55:11"}]}}]},"documentation":"@dev Adds price integral since the last trade to the total price integral","id":3441,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceBefore","nodeType":"FunctionDefinition","parameters":{"id":3424,"nodeType":"ParameterList","parameters":[],"src":"4846:2:11"},"payable":false,"returnParameters":{"id":3425,"nodeType":"ParameterList","parameters":[],"src":"4869:0:11"},"scope":3458,"src":"4823:231:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3456,"nodeType":"Block","src":"5157:257:11","statements":[{"expression":{"argumentTypes":null,"id":3450,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3444,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"5320:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3447,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7701,"src":"5367:4:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"id":3448,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3184,"src":"5373:4:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3445,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"5337:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":3446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcMarginalPrice","nodeType":"MemberAccess","referencedDeclaration":1570,"src":"5337:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_uint8_$returns$_t_uint256_$","typeString":"function (contract Market,uint8) view external returns (uint256)"}},"id":3449,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5337:41:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5320:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3451,"nodeType":"ExpressionStatement","src":"5320:58:11"},{"expression":{"argumentTypes":null,"id":3454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3452,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5388:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3453,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5404:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5388:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3455,"nodeType":"ExpressionStatement","src":"5388:19:11"}]},"documentation":"@dev Updates last trade timestamp and price","id":3457,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceAfter","nodeType":"FunctionDefinition","parameters":{"id":3442,"nodeType":"ParameterList","parameters":[],"src":"5134:2:11"},"payable":false,"returnParameters":{"id":3443,"nodeType":"ParameterList","parameters":[],"src":"5157:0:11"},"scope":3458,"src":"5112:302:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"}],"scope":3459,"src":"1471:3945:11"}],"src":"0:5417:11"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0xbd3bb2927651b4bfb01190928bf98d43906a44a9","transactionHash":"0x89519491f99cb3bb1d072c8e3e7d8df3427ce3594a04f030a1b8d3bb656179b6"},"4":{"address":"0xf31bc1efacd625234e7bd718ba082815e3d86e47","transactionHash":"0xc9286faa389c137fe84dcf31c32ae84f89fe5f6b0f9cd8e0b56307fdbd461b48"},"42":{"address":"0x6737a27096b11ba15272a50225f026c8a39faba6","transactionHash":"0xedc8558085a6936287618b7b4bfe95a8a03f4c45dc41d748b79b0d177439c7cd"},"437894314312":{"address":"0xa57b8a5584442b467b4689f1144d269d096a3daf","transactionHash":"0x37d08ecef39b9649f55de8a35212d237e57222a7cbcd29b04bb34f50b3f7483b"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:48.280Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLoggerData.json": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLoggerData.json ***! + \*****************************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"StandardMarketWithPriceLoggerData","abi":[{"constant":true,"inputs":[],"name":"startDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTradeDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"priceIntegral","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTradePrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506101d4806100206000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b97bc861461007d578063561cce0a146100a857806368b586d5146100d95780638b797a0c14610104578063c24a0f8b1461012f578063df449cb81461015a575b600080fd5b34801561008957600080fd5b50610092610185565b6040518082815260200191505060405180910390f35b3480156100b457600080fd5b506100bd61018b565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100e557600080fd5b506100ee610190565b6040518082815260200191505060405180910390f35b34801561011057600080fd5b50610119610196565b6040518082815260200191505060405180910390f35b34801561013b57600080fd5b5061014461019c565b6040518082815260200191505060405180910390f35b34801561016657600080fd5b5061016f6101a2565b6040518082815260200191505060405180910390f35b60005481565b600181565b60025481565b60045481565b60015481565b600354815600a165627a7a72305820945b08eb1d423abb1b3636ab862e68dec5a976937c0d5cce0e09aa74fc0bf4200029","deployedBytecode":"0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b97bc861461007d578063561cce0a146100a857806368b586d5146100d95780638b797a0c14610104578063c24a0f8b1461012f578063df449cb81461015a575b600080fd5b34801561008957600080fd5b50610092610185565b6040518082815260200191505060405180910390f35b3480156100b457600080fd5b506100bd61018b565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100e557600080fd5b506100ee610190565b6040518082815260200191505060405180910390f35b34801561011057600080fd5b50610119610196565b6040518082815260200191505060405180910390f35b34801561013b57600080fd5b5061014461019c565b6040518082815260200191505060405180910390f35b34801561016657600080fd5b5061016f6101a2565b6040518082815260200191505060405180910390f35b60005481565b600181565b60025481565b60045481565b60015481565b600354815600a165627a7a72305820945b08eb1d423abb1b3636ab862e68dec5a976937c0d5cce0e09aa74fc0bf4200029","sourceMap":"66:339:11:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;66:339:11;;;;;;;","deployedSourceMap":"66:339:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;262:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:21:11;;;;;;;;;;;;;;;;;;;;;;;194:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;194:30:11;;;;;;;;;;;;;;;;;;;;;;;;;;;314:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;314:25:11;;;;;;;;;;;;;;;;;;;;;;;377;;8:9:-1;5:2;;;30:1;27;20:12;5:2;377:25:11;;;;;;;;;;;;;;;;;;;;;;;289:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;289:19:11;;;;;;;;;;;;;;;;;;;;;;;345:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;345:26:11;;;;;;;;;;;;;;;;;;;;;;;262:21;;;;:::o;194:30::-;223:1;194:30;:::o;314:25::-;;;;:::o;377:::-;;;;:::o;289:19::-;;;;:::o;345:26::-;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/StandardMarket.sol\";\n\ncontract StandardMarketWithPriceLoggerData {\n\n /*\n * Constants\n */\n uint constant ONE = 0x10000000000000000;\n uint8 public constant LONG = 1;\n\n /*\n * Storage\n */\n uint public startDate;\n uint public endDate;\n uint public lastTradeDate;\n uint public lastTradePrice;\n uint public priceIntegral;\n}\n\ncontract StandardMarketWithPriceLoggerProxy is StandardMarketProxy, StandardMarketWithPriceLoggerData {\n\n /// @dev Constructor validates and sets market properties\n /// @param _creator Market creator\n /// @param _eventContract Event contract\n /// @param _marketMaker Market maker contract\n /// @param _fee Market fee\n /// @param _startDate Start date for price logging\n constructor(address proxied, address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee, uint _startDate)\n public\n StandardMarketProxy(proxied, _creator, _eventContract, _marketMaker, _fee)\n {\n require(eventContract.getOutcomeCount() == 2);\n\n if (_startDate == 0)\n startDate = now;\n else {\n // The earliest start date is the market creation date\n require(_startDate >= now);\n startDate = _startDate;\n }\n\n lastTradeDate = startDate;\n // initialize lastTradePrice to assuming uniform probabilities of outcomes\n lastTradePrice = ONE / 2;\n }\n}\n\ncontract StandardMarketWithPriceLogger is StandardMarket, StandardMarketWithPriceLoggerData {\n /*\n * Public functions\n */\n /// @dev Allows to buy outcome tokens from market maker\n /// @param outcomeTokenIndex Index of the outcome token to buy\n /// @param outcomeTokenCount Amount of outcome tokens to buy\n /// @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n /// @return Cost in collateral tokens\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost)\n public\n returns (uint cost)\n {\n logPriceBefore();\n cost = super.buy(outcomeTokenIndex, outcomeTokenCount, maxCost);\n logPriceAfter();\n }\n\n /// @dev Allows to sell outcome tokens to market maker\n /// @param outcomeTokenIndex Index of the outcome token to sell\n /// @param outcomeTokenCount Amount of outcome tokens to sell\n /// @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n /// @return Profit in collateral tokens\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint profit)\n {\n logPriceBefore();\n profit = super.sell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n logPriceAfter();\n }\n\n /// @dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n /// shares of all other outcome tokens.\n /// @param outcomeTokenIndex Index of the outcome token to short sell\n /// @param outcomeTokenCount Amount of outcome tokens to short sell\n /// @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n /// @return Cost to short sell outcome in collateral tokens\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint cost)\n {\n logPriceBefore();\n cost = super.shortSell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n logPriceAfter();\n }\n\n /// @dev Allows to trade outcome tokens with market maker\n /// @param outcomeTokenAmounts Amounts of outcome tokens to trade\n /// @param collateralLimit The maximum cost or minimum profit in collateral tokens\n /// @return Cost/profit in collateral tokens\n function trade(int[] outcomeTokenAmounts, int collateralLimit)\n public\n returns (int netCost)\n {\n logPriceBefore();\n netCost = super.trade(outcomeTokenAmounts, collateralLimit);\n logPriceAfter();\n }\n\n\n /// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator\n function close()\n public\n {\n endDate = now;\n super.close();\n }\n\n /// @dev Calculates average price for long tokens based on price integral\n /// @return Average price for long tokens over time\n function getAvgPrice()\n public\n view\n returns (uint)\n {\n if(endDate > 0)\n return (priceIntegral + lastTradePrice * (endDate - lastTradeDate)) / (endDate - startDate);\n return (priceIntegral + lastTradePrice * (now - lastTradeDate)) / (now - startDate);\n }\n\n /*\n * Private functions\n */\n /// @dev Adds price integral since the last trade to the total price integral\n function logPriceBefore()\n private\n {\n if (now >= startDate) {\n // Accumulate price integral only if logging has begun\n priceIntegral += lastTradePrice * (now - lastTradeDate);\n }\n }\n\n /// @dev Updates last trade timestamp and price\n function logPriceAfter()\n private\n {\n // Refresh lastTradePrice after every transactions as we don't know if\n // this will be the last transaction before logging period starts\n lastTradePrice = marketMaker.calcMarginalPrice(this, LONG);\n lastTradeDate = now;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","exportedSymbols":{"StandardMarketWithPriceLogger":[3458],"StandardMarketWithPriceLoggerData":[3195],"StandardMarketWithPriceLoggerProxy":[3260]},"id":3459,"nodeType":"SourceUnit","nodes":[{"id":3177,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:11"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","file":"../Markets/StandardMarket.sol","id":3178,"nodeType":"ImportDirective","scope":3459,"sourceUnit":3113,"src":"25:39:11","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3195,"linearizedBaseContracts":[3195],"name":"StandardMarketWithPriceLoggerData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":3181,"name":"ONE","nodeType":"VariableDeclaration","scope":3195,"src":"149:39:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3179,"name":"uint","nodeType":"ElementaryTypeName","src":"149:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":3180,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"169:19:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"internal"},{"constant":true,"id":3184,"name":"LONG","nodeType":"VariableDeclaration","scope":3195,"src":"194:30:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3182,"name":"uint8","nodeType":"ElementaryTypeName","src":"194:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3183,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"223:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3186,"name":"startDate","nodeType":"VariableDeclaration","scope":3195,"src":"262:21:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3185,"name":"uint","nodeType":"ElementaryTypeName","src":"262:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3188,"name":"endDate","nodeType":"VariableDeclaration","scope":3195,"src":"289:19:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3187,"name":"uint","nodeType":"ElementaryTypeName","src":"289:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3190,"name":"lastTradeDate","nodeType":"VariableDeclaration","scope":3195,"src":"314:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3189,"name":"uint","nodeType":"ElementaryTypeName","src":"314:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3192,"name":"lastTradePrice","nodeType":"VariableDeclaration","scope":3195,"src":"345:26:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3191,"name":"uint","nodeType":"ElementaryTypeName","src":"345:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3194,"name":"priceIntegral","nodeType":"VariableDeclaration","scope":3195,"src":"377:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3193,"name":"uint","nodeType":"ElementaryTypeName","src":"377:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"}],"scope":3459,"src":"66:339:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3196,"name":"StandardMarketProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":2326,"src":"454:19:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}},"id":3197,"nodeType":"InheritanceSpecifier","src":"454:19:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3198,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"475:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3199,"nodeType":"InheritanceSpecifier","src":"475:33:11"}],"contractDependencies":[2172,2248,2326,3195,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3260,"linearizedBaseContracts":[3260,3195,2326,2248,2172,6701,6673],"name":"StandardMarketWithPriceLoggerProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3258,"nodeType":"Block","src":"1025:442:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3222,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1043:13:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"1043:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3224,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1043:31:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1078:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1043:36:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3221,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1035:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3227,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1035:45:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3228,"nodeType":"ExpressionStatement","src":"1035:45:11"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3229,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1095:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3230,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1109:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1095:15:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3246,"nodeType":"Block","src":"1154:154:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3237,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1243:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3238,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1257:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1243:17:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1235:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1235:26:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3241,"nodeType":"ExpressionStatement","src":"1235:26:11"},{"expression":{"argumentTypes":null,"id":3244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3242,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1275:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3243,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1287:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1275:22:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3245,"nodeType":"ExpressionStatement","src":"1275:22:11"}]},"id":3247,"nodeType":"IfStatement","src":"1091:217:11","trueBody":{"expression":{"argumentTypes":null,"id":3234,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3232,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1124:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3233,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1136:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1124:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3235,"nodeType":"ExpressionStatement","src":"1124:15:11"}},{"expression":{"argumentTypes":null,"id":3250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3248,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"1318:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3249,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1334:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1318:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3251,"nodeType":"ExpressionStatement","src":"1318:25:11"},{"expression":{"argumentTypes":null,"id":3256,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3252,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"1436:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3255,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3253,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3181,"src":"1453:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3254,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1459:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1453:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1436:24:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3257,"nodeType":"ExpressionStatement","src":"1436:24:11"}]},"documentation":"@dev Constructor validates and sets market properties\n @param _creator Market creator\n @param _eventContract Event contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _startDate Start date for price logging","id":3259,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3214,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3201,"src":"966:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3215,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3203,"src":"975:8:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3216,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3205,"src":"985:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3217,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3207,"src":"1001:12:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3218,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3209,"src":"1015:4:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"id":3219,"modifierName":{"argumentTypes":null,"id":3213,"name":"StandardMarketProxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2326,"src":"946:19:11","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarketProxy_$2326_$","typeString":"type(contract StandardMarketProxy)"}},"nodeType":"ModifierInvocation","src":"946:74:11"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3212,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3201,"name":"proxied","nodeType":"VariableDeclaration","scope":3259,"src":"810:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3200,"name":"address","nodeType":"ElementaryTypeName","src":"810:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3203,"name":"_creator","nodeType":"VariableDeclaration","scope":3259,"src":"827:16:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3202,"name":"address","nodeType":"ElementaryTypeName","src":"827:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3205,"name":"_eventContract","nodeType":"VariableDeclaration","scope":3259,"src":"845:20:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3204,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"845:5:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3207,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":3259,"src":"867:24:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3206,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"867:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3209,"name":"_fee","nodeType":"VariableDeclaration","scope":3259,"src":"893:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3208,"name":"uint24","nodeType":"ElementaryTypeName","src":"893:6:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3211,"name":"_startDate","nodeType":"VariableDeclaration","scope":3259,"src":"906:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3210,"name":"uint","nodeType":"ElementaryTypeName","src":"906:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"809:113:11"},"payable":false,"returnParameters":{"id":3220,"nodeType":"ParameterList","parameters":[],"src":"1025:0:11"},"scope":3260,"src":"798:669:11","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3459,"src":"407:1062:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3261,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"1513:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3262,"nodeType":"InheritanceSpecifier","src":"1513:14:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3263,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"1529:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3264,"nodeType":"InheritanceSpecifier","src":"1529:33:11"}],"contractDependencies":[2172,2238,2248,3112,3195,6673],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3458,"linearizedBaseContracts":[3458,3195,3112,2248,2238,2172,6673],"name":"StandardMarketWithPriceLogger","nodeType":"ContractDefinition","nodes":[{"body":{"id":3290,"nodeType":"Block","src":"2053:131:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3275,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2063:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2063:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3277,"nodeType":"ExpressionStatement","src":"2063:16:11"},{"expression":{"argumentTypes":null,"id":3285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3278,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3273,"src":"2089:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3281,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3266,"src":"2106:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3282,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3268,"src":"2125:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3283,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3270,"src":"2144:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3279,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2096:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buy","nodeType":"MemberAccess","referencedDeclaration":2596,"src":"2096:9:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3284,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2096:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2089:63:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3286,"nodeType":"ExpressionStatement","src":"2089:63:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3287,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2162:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3288,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2162:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3289,"nodeType":"ExpressionStatement","src":"2162:15:11"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":3291,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":3271,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3266,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3291,"src":"1943:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3265,"name":"uint8","nodeType":"ElementaryTypeName","src":"1943:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3268,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3291,"src":"1968:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3267,"name":"uint","nodeType":"ElementaryTypeName","src":"1968:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3270,"name":"maxCost","nodeType":"VariableDeclaration","scope":3291,"src":"1992:12:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3269,"name":"uint","nodeType":"ElementaryTypeName","src":"1992:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1942:63:11"},"payable":false,"returnParameters":{"id":3274,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3273,"name":"cost","nodeType":"VariableDeclaration","scope":3291,"src":"2038:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3272,"name":"uint","nodeType":"ElementaryTypeName","src":"2038:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2037:11:11"},"scope":3458,"src":"1930:254:11","stateMutability":"nonpayable","superFunction":2596,"visibility":"public"},{"body":{"id":3317,"nodeType":"Block","src":"2647:136:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3302,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2657:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3303,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2657:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3304,"nodeType":"ExpressionStatement","src":"2657:16:11"},{"expression":{"argumentTypes":null,"id":3312,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3305,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3300,"src":"2683:6:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3308,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3293,"src":"2703:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3309,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3295,"src":"2722:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3310,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3297,"src":"2741:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3306,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2692:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3307,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"2692:10:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3311,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2692:59:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2683:68:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3313,"nodeType":"ExpressionStatement","src":"2683:68:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3314,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2761:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2761:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3316,"nodeType":"ExpressionStatement","src":"2761:15:11"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":3318,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":3298,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3293,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3318,"src":"2533:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3292,"name":"uint8","nodeType":"ElementaryTypeName","src":"2533:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3295,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3318,"src":"2558:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3294,"name":"uint","nodeType":"ElementaryTypeName","src":"2558:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3297,"name":"minProfit","nodeType":"VariableDeclaration","scope":3318,"src":"2582:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3296,"name":"uint","nodeType":"ElementaryTypeName","src":"2582:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2532:65:11"},"payable":false,"returnParameters":{"id":3301,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3300,"name":"profit","nodeType":"VariableDeclaration","scope":3318,"src":"2630:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3299,"name":"uint","nodeType":"ElementaryTypeName","src":"2630:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2629:13:11"},"scope":3458,"src":"2519:264:11","stateMutability":"nonpayable","superFunction":2707,"visibility":"public"},{"body":{"id":3344,"nodeType":"Block","src":"3383:139:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3329,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3393:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3330,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3393:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3331,"nodeType":"ExpressionStatement","src":"3393:16:11"},{"expression":{"argumentTypes":null,"id":3339,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3332,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3327,"src":"3419:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3335,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3320,"src":"3442:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3336,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3322,"src":"3461:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3337,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3324,"src":"3480:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3333,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3426:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"shortSell","nodeType":"MemberAccess","referencedDeclaration":2822,"src":"3426:15:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3426:64:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3419:71:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3340,"nodeType":"ExpressionStatement","src":"3419:71:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3341,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"3500:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3342,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3500:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3343,"nodeType":"ExpressionStatement","src":"3500:15:11"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":3345,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":3325,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3320,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3345,"src":"3271:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3319,"name":"uint8","nodeType":"ElementaryTypeName","src":"3271:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3322,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3345,"src":"3296:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3321,"name":"uint","nodeType":"ElementaryTypeName","src":"3296:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3324,"name":"minProfit","nodeType":"VariableDeclaration","scope":3345,"src":"3320:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3323,"name":"uint","nodeType":"ElementaryTypeName","src":"3320:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3270:65:11"},"payable":false,"returnParameters":{"id":3328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3327,"name":"cost","nodeType":"VariableDeclaration","scope":3345,"src":"3368:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3326,"name":"uint","nodeType":"ElementaryTypeName","src":"3368:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3367:11:11"},"scope":3458,"src":"3252:270:11","stateMutability":"nonpayable","superFunction":2822,"visibility":"public"},{"body":{"id":3369,"nodeType":"Block","src":"3908:127:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3355,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3918:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3918:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3357,"nodeType":"ExpressionStatement","src":"3918:16:11"},{"expression":{"argumentTypes":null,"id":3364,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3358,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3353,"src":"3944:7:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3361,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3348,"src":"3966:19:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":3362,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3350,"src":"3987:15:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3359,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3954:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"trade","nodeType":"MemberAccess","referencedDeclaration":2875,"src":"3954:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$","typeString":"function (int256[] memory,int256) returns (int256)"}},"id":3363,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3954:49:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3944:59:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3365,"nodeType":"ExpressionStatement","src":"3944:59:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3366,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"4013:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3367,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4013:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3368,"nodeType":"ExpressionStatement","src":"4013:15:11"}]},"documentation":"@dev Allows to trade outcome tokens with market maker\n @param outcomeTokenAmounts Amounts of outcome tokens to trade\n @param collateralLimit The maximum cost or minimum profit in collateral tokens\n @return Cost/profit in collateral tokens","id":3370,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":3351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3348,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3370,"src":"3811:25:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":3346,"name":"int","nodeType":"ElementaryTypeName","src":"3811:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3347,"length":null,"nodeType":"ArrayTypeName","src":"3811:5:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":3350,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3370,"src":"3838:19:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3349,"name":"int","nodeType":"ElementaryTypeName","src":"3838:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3810:48:11"},"payable":false,"returnParameters":{"id":3354,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3353,"name":"netCost","nodeType":"VariableDeclaration","scope":3370,"src":"3891:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3352,"name":"int","nodeType":"ElementaryTypeName","src":"3891:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3890:13:11"},"scope":3458,"src":"3796:239:11","stateMutability":"nonpayable","superFunction":2875,"visibility":"public"},{"body":{"id":3382,"nodeType":"Block","src":"4194:53:11","statements":[{"expression":{"argumentTypes":null,"id":3375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3373,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4204:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3374,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4214:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4204:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3376,"nodeType":"ExpressionStatement","src":"4204:13:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3377,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"4227:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2460,"src":"4227:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:13:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3381,"nodeType":"ExpressionStatement","src":"4227:13:11"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":3383,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":3371,"nodeType":"ParameterList","parameters":[],"src":"4172:2:11"},"payable":false,"returnParameters":{"id":3372,"nodeType":"ParameterList","parameters":[],"src":"4194:0:11"},"scope":3458,"src":"4158:89:11","stateMutability":"nonpayable","superFunction":2460,"visibility":"public"},{"body":{"id":3422,"nodeType":"Block","src":"4465:229:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3388,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4478:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3389,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4488:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4478:11:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3406,"nodeType":"IfStatement","src":"4475:119:11","trueBody":{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3404,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3398,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3391,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4511:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3392,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4527:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3393,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4545:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3394,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4555:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4545:23:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3396,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4544:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4527:42:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4511:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3399,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4510:60:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3400,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4574:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3401,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4584:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4574:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3403,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4573:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4510:84:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3405,"nodeType":"Return","src":"4503:91:11"}},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3407,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4612:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3413,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3408,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4628:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3411,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3409,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4646:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3410,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4652:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4646:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3412,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4645:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4628:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4612:54:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3415,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4611:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3416,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4671:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3417,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4677:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4671:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3419,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4670:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4611:76:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3421,"nodeType":"Return","src":"4604:83:11"}]},"documentation":"@dev Calculates average price for long tokens based on price integral\n @return Average price for long tokens over time","id":3423,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getAvgPrice","nodeType":"FunctionDefinition","parameters":{"id":3384,"nodeType":"ParameterList","parameters":[],"src":"4407:2:11"},"payable":false,"returnParameters":{"id":3387,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3386,"name":"","nodeType":"VariableDeclaration","scope":3423,"src":"4455:4:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3385,"name":"uint","nodeType":"ElementaryTypeName","src":"4455:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4454:6:11"},"scope":3458,"src":"4387:307:11","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":3440,"nodeType":"Block","src":"4869:185:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3426,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4883:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3427,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4890:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4883:16:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3439,"nodeType":"IfStatement","src":"4879:169:11","trueBody":{"id":3438,"nodeType":"Block","src":"4901:147:11","statements":[{"expression":{"argumentTypes":null,"id":3436,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3429,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4982:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3430,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4999:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3431,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5017:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3432,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5023:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5017:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3434,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5016:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4982:55:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3437,"nodeType":"ExpressionStatement","src":"4982:55:11"}]}}]},"documentation":"@dev Adds price integral since the last trade to the total price integral","id":3441,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceBefore","nodeType":"FunctionDefinition","parameters":{"id":3424,"nodeType":"ParameterList","parameters":[],"src":"4846:2:11"},"payable":false,"returnParameters":{"id":3425,"nodeType":"ParameterList","parameters":[],"src":"4869:0:11"},"scope":3458,"src":"4823:231:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3456,"nodeType":"Block","src":"5157:257:11","statements":[{"expression":{"argumentTypes":null,"id":3450,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3444,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"5320:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3447,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7701,"src":"5367:4:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"id":3448,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3184,"src":"5373:4:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3445,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"5337:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":3446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcMarginalPrice","nodeType":"MemberAccess","referencedDeclaration":1570,"src":"5337:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_uint8_$returns$_t_uint256_$","typeString":"function (contract Market,uint8) view external returns (uint256)"}},"id":3449,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5337:41:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5320:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3451,"nodeType":"ExpressionStatement","src":"5320:58:11"},{"expression":{"argumentTypes":null,"id":3454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3452,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5388:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3453,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5404:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5388:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3455,"nodeType":"ExpressionStatement","src":"5388:19:11"}]},"documentation":"@dev Updates last trade timestamp and price","id":3457,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceAfter","nodeType":"FunctionDefinition","parameters":{"id":3442,"nodeType":"ParameterList","parameters":[],"src":"5134:2:11"},"payable":false,"returnParameters":{"id":3443,"nodeType":"ParameterList","parameters":[],"src":"5157:0:11"},"scope":3458,"src":"5112:302:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"}],"scope":3459,"src":"1471:3945:11"}],"src":"0:5417:11"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","exportedSymbols":{"StandardMarketWithPriceLogger":[3458],"StandardMarketWithPriceLoggerData":[3195],"StandardMarketWithPriceLoggerProxy":[3260]},"id":3459,"nodeType":"SourceUnit","nodes":[{"id":3177,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:11"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","file":"../Markets/StandardMarket.sol","id":3178,"nodeType":"ImportDirective","scope":3459,"sourceUnit":3113,"src":"25:39:11","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3195,"linearizedBaseContracts":[3195],"name":"StandardMarketWithPriceLoggerData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":3181,"name":"ONE","nodeType":"VariableDeclaration","scope":3195,"src":"149:39:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3179,"name":"uint","nodeType":"ElementaryTypeName","src":"149:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":3180,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"169:19:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"internal"},{"constant":true,"id":3184,"name":"LONG","nodeType":"VariableDeclaration","scope":3195,"src":"194:30:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3182,"name":"uint8","nodeType":"ElementaryTypeName","src":"194:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3183,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"223:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3186,"name":"startDate","nodeType":"VariableDeclaration","scope":3195,"src":"262:21:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3185,"name":"uint","nodeType":"ElementaryTypeName","src":"262:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3188,"name":"endDate","nodeType":"VariableDeclaration","scope":3195,"src":"289:19:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3187,"name":"uint","nodeType":"ElementaryTypeName","src":"289:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3190,"name":"lastTradeDate","nodeType":"VariableDeclaration","scope":3195,"src":"314:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3189,"name":"uint","nodeType":"ElementaryTypeName","src":"314:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3192,"name":"lastTradePrice","nodeType":"VariableDeclaration","scope":3195,"src":"345:26:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3191,"name":"uint","nodeType":"ElementaryTypeName","src":"345:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3194,"name":"priceIntegral","nodeType":"VariableDeclaration","scope":3195,"src":"377:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3193,"name":"uint","nodeType":"ElementaryTypeName","src":"377:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"}],"scope":3459,"src":"66:339:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3196,"name":"StandardMarketProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":2326,"src":"454:19:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}},"id":3197,"nodeType":"InheritanceSpecifier","src":"454:19:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3198,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"475:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3199,"nodeType":"InheritanceSpecifier","src":"475:33:11"}],"contractDependencies":[2172,2248,2326,3195,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3260,"linearizedBaseContracts":[3260,3195,2326,2248,2172,6701,6673],"name":"StandardMarketWithPriceLoggerProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3258,"nodeType":"Block","src":"1025:442:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3222,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1043:13:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"1043:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3224,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1043:31:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1078:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1043:36:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3221,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1035:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3227,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1035:45:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3228,"nodeType":"ExpressionStatement","src":"1035:45:11"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3229,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1095:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3230,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1109:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1095:15:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3246,"nodeType":"Block","src":"1154:154:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3237,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1243:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3238,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1257:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1243:17:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1235:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1235:26:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3241,"nodeType":"ExpressionStatement","src":"1235:26:11"},{"expression":{"argumentTypes":null,"id":3244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3242,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1275:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3243,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1287:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1275:22:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3245,"nodeType":"ExpressionStatement","src":"1275:22:11"}]},"id":3247,"nodeType":"IfStatement","src":"1091:217:11","trueBody":{"expression":{"argumentTypes":null,"id":3234,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3232,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1124:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3233,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1136:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1124:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3235,"nodeType":"ExpressionStatement","src":"1124:15:11"}},{"expression":{"argumentTypes":null,"id":3250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3248,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"1318:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3249,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1334:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1318:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3251,"nodeType":"ExpressionStatement","src":"1318:25:11"},{"expression":{"argumentTypes":null,"id":3256,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3252,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"1436:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3255,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3253,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3181,"src":"1453:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3254,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1459:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1453:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1436:24:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3257,"nodeType":"ExpressionStatement","src":"1436:24:11"}]},"documentation":"@dev Constructor validates and sets market properties\n @param _creator Market creator\n @param _eventContract Event contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _startDate Start date for price logging","id":3259,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3214,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3201,"src":"966:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3215,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3203,"src":"975:8:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3216,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3205,"src":"985:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3217,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3207,"src":"1001:12:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3218,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3209,"src":"1015:4:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"id":3219,"modifierName":{"argumentTypes":null,"id":3213,"name":"StandardMarketProxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2326,"src":"946:19:11","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarketProxy_$2326_$","typeString":"type(contract StandardMarketProxy)"}},"nodeType":"ModifierInvocation","src":"946:74:11"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3212,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3201,"name":"proxied","nodeType":"VariableDeclaration","scope":3259,"src":"810:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3200,"name":"address","nodeType":"ElementaryTypeName","src":"810:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3203,"name":"_creator","nodeType":"VariableDeclaration","scope":3259,"src":"827:16:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3202,"name":"address","nodeType":"ElementaryTypeName","src":"827:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3205,"name":"_eventContract","nodeType":"VariableDeclaration","scope":3259,"src":"845:20:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3204,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"845:5:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3207,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":3259,"src":"867:24:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3206,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"867:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3209,"name":"_fee","nodeType":"VariableDeclaration","scope":3259,"src":"893:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3208,"name":"uint24","nodeType":"ElementaryTypeName","src":"893:6:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3211,"name":"_startDate","nodeType":"VariableDeclaration","scope":3259,"src":"906:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3210,"name":"uint","nodeType":"ElementaryTypeName","src":"906:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"809:113:11"},"payable":false,"returnParameters":{"id":3220,"nodeType":"ParameterList","parameters":[],"src":"1025:0:11"},"scope":3260,"src":"798:669:11","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3459,"src":"407:1062:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3261,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"1513:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3262,"nodeType":"InheritanceSpecifier","src":"1513:14:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3263,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"1529:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3264,"nodeType":"InheritanceSpecifier","src":"1529:33:11"}],"contractDependencies":[2172,2238,2248,3112,3195,6673],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3458,"linearizedBaseContracts":[3458,3195,3112,2248,2238,2172,6673],"name":"StandardMarketWithPriceLogger","nodeType":"ContractDefinition","nodes":[{"body":{"id":3290,"nodeType":"Block","src":"2053:131:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3275,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2063:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2063:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3277,"nodeType":"ExpressionStatement","src":"2063:16:11"},{"expression":{"argumentTypes":null,"id":3285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3278,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3273,"src":"2089:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3281,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3266,"src":"2106:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3282,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3268,"src":"2125:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3283,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3270,"src":"2144:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3279,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2096:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buy","nodeType":"MemberAccess","referencedDeclaration":2596,"src":"2096:9:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3284,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2096:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2089:63:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3286,"nodeType":"ExpressionStatement","src":"2089:63:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3287,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2162:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3288,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2162:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3289,"nodeType":"ExpressionStatement","src":"2162:15:11"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":3291,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":3271,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3266,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3291,"src":"1943:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3265,"name":"uint8","nodeType":"ElementaryTypeName","src":"1943:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3268,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3291,"src":"1968:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3267,"name":"uint","nodeType":"ElementaryTypeName","src":"1968:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3270,"name":"maxCost","nodeType":"VariableDeclaration","scope":3291,"src":"1992:12:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3269,"name":"uint","nodeType":"ElementaryTypeName","src":"1992:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1942:63:11"},"payable":false,"returnParameters":{"id":3274,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3273,"name":"cost","nodeType":"VariableDeclaration","scope":3291,"src":"2038:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3272,"name":"uint","nodeType":"ElementaryTypeName","src":"2038:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2037:11:11"},"scope":3458,"src":"1930:254:11","stateMutability":"nonpayable","superFunction":2596,"visibility":"public"},{"body":{"id":3317,"nodeType":"Block","src":"2647:136:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3302,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2657:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3303,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2657:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3304,"nodeType":"ExpressionStatement","src":"2657:16:11"},{"expression":{"argumentTypes":null,"id":3312,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3305,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3300,"src":"2683:6:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3308,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3293,"src":"2703:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3309,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3295,"src":"2722:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3310,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3297,"src":"2741:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3306,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2692:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3307,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"2692:10:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3311,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2692:59:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2683:68:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3313,"nodeType":"ExpressionStatement","src":"2683:68:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3314,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2761:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2761:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3316,"nodeType":"ExpressionStatement","src":"2761:15:11"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":3318,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":3298,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3293,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3318,"src":"2533:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3292,"name":"uint8","nodeType":"ElementaryTypeName","src":"2533:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3295,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3318,"src":"2558:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3294,"name":"uint","nodeType":"ElementaryTypeName","src":"2558:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3297,"name":"minProfit","nodeType":"VariableDeclaration","scope":3318,"src":"2582:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3296,"name":"uint","nodeType":"ElementaryTypeName","src":"2582:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2532:65:11"},"payable":false,"returnParameters":{"id":3301,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3300,"name":"profit","nodeType":"VariableDeclaration","scope":3318,"src":"2630:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3299,"name":"uint","nodeType":"ElementaryTypeName","src":"2630:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2629:13:11"},"scope":3458,"src":"2519:264:11","stateMutability":"nonpayable","superFunction":2707,"visibility":"public"},{"body":{"id":3344,"nodeType":"Block","src":"3383:139:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3329,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3393:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3330,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3393:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3331,"nodeType":"ExpressionStatement","src":"3393:16:11"},{"expression":{"argumentTypes":null,"id":3339,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3332,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3327,"src":"3419:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3335,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3320,"src":"3442:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3336,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3322,"src":"3461:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3337,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3324,"src":"3480:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3333,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3426:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"shortSell","nodeType":"MemberAccess","referencedDeclaration":2822,"src":"3426:15:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3426:64:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3419:71:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3340,"nodeType":"ExpressionStatement","src":"3419:71:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3341,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"3500:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3342,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3500:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3343,"nodeType":"ExpressionStatement","src":"3500:15:11"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":3345,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":3325,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3320,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3345,"src":"3271:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3319,"name":"uint8","nodeType":"ElementaryTypeName","src":"3271:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3322,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3345,"src":"3296:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3321,"name":"uint","nodeType":"ElementaryTypeName","src":"3296:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3324,"name":"minProfit","nodeType":"VariableDeclaration","scope":3345,"src":"3320:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3323,"name":"uint","nodeType":"ElementaryTypeName","src":"3320:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3270:65:11"},"payable":false,"returnParameters":{"id":3328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3327,"name":"cost","nodeType":"VariableDeclaration","scope":3345,"src":"3368:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3326,"name":"uint","nodeType":"ElementaryTypeName","src":"3368:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3367:11:11"},"scope":3458,"src":"3252:270:11","stateMutability":"nonpayable","superFunction":2822,"visibility":"public"},{"body":{"id":3369,"nodeType":"Block","src":"3908:127:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3355,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3918:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3918:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3357,"nodeType":"ExpressionStatement","src":"3918:16:11"},{"expression":{"argumentTypes":null,"id":3364,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3358,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3353,"src":"3944:7:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3361,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3348,"src":"3966:19:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":3362,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3350,"src":"3987:15:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3359,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3954:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"trade","nodeType":"MemberAccess","referencedDeclaration":2875,"src":"3954:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$","typeString":"function (int256[] memory,int256) returns (int256)"}},"id":3363,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3954:49:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3944:59:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3365,"nodeType":"ExpressionStatement","src":"3944:59:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3366,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"4013:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3367,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4013:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3368,"nodeType":"ExpressionStatement","src":"4013:15:11"}]},"documentation":"@dev Allows to trade outcome tokens with market maker\n @param outcomeTokenAmounts Amounts of outcome tokens to trade\n @param collateralLimit The maximum cost or minimum profit in collateral tokens\n @return Cost/profit in collateral tokens","id":3370,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":3351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3348,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3370,"src":"3811:25:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":3346,"name":"int","nodeType":"ElementaryTypeName","src":"3811:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3347,"length":null,"nodeType":"ArrayTypeName","src":"3811:5:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":3350,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3370,"src":"3838:19:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3349,"name":"int","nodeType":"ElementaryTypeName","src":"3838:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3810:48:11"},"payable":false,"returnParameters":{"id":3354,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3353,"name":"netCost","nodeType":"VariableDeclaration","scope":3370,"src":"3891:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3352,"name":"int","nodeType":"ElementaryTypeName","src":"3891:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3890:13:11"},"scope":3458,"src":"3796:239:11","stateMutability":"nonpayable","superFunction":2875,"visibility":"public"},{"body":{"id":3382,"nodeType":"Block","src":"4194:53:11","statements":[{"expression":{"argumentTypes":null,"id":3375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3373,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4204:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3374,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4214:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4204:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3376,"nodeType":"ExpressionStatement","src":"4204:13:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3377,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"4227:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2460,"src":"4227:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:13:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3381,"nodeType":"ExpressionStatement","src":"4227:13:11"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":3383,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":3371,"nodeType":"ParameterList","parameters":[],"src":"4172:2:11"},"payable":false,"returnParameters":{"id":3372,"nodeType":"ParameterList","parameters":[],"src":"4194:0:11"},"scope":3458,"src":"4158:89:11","stateMutability":"nonpayable","superFunction":2460,"visibility":"public"},{"body":{"id":3422,"nodeType":"Block","src":"4465:229:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3388,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4478:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3389,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4488:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4478:11:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3406,"nodeType":"IfStatement","src":"4475:119:11","trueBody":{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3404,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3398,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3391,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4511:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3392,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4527:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3393,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4545:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3394,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4555:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4545:23:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3396,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4544:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4527:42:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4511:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3399,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4510:60:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3400,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4574:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3401,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4584:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4574:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3403,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4573:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4510:84:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3405,"nodeType":"Return","src":"4503:91:11"}},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3407,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4612:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3413,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3408,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4628:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3411,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3409,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4646:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3410,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4652:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4646:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3412,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4645:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4628:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4612:54:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3415,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4611:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3416,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4671:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3417,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4677:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4671:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3419,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4670:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4611:76:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3421,"nodeType":"Return","src":"4604:83:11"}]},"documentation":"@dev Calculates average price for long tokens based on price integral\n @return Average price for long tokens over time","id":3423,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getAvgPrice","nodeType":"FunctionDefinition","parameters":{"id":3384,"nodeType":"ParameterList","parameters":[],"src":"4407:2:11"},"payable":false,"returnParameters":{"id":3387,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3386,"name":"","nodeType":"VariableDeclaration","scope":3423,"src":"4455:4:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3385,"name":"uint","nodeType":"ElementaryTypeName","src":"4455:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4454:6:11"},"scope":3458,"src":"4387:307:11","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":3440,"nodeType":"Block","src":"4869:185:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3426,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4883:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3427,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4890:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4883:16:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3439,"nodeType":"IfStatement","src":"4879:169:11","trueBody":{"id":3438,"nodeType":"Block","src":"4901:147:11","statements":[{"expression":{"argumentTypes":null,"id":3436,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3429,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4982:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3430,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4999:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3431,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5017:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3432,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5023:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5017:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3434,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5016:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4982:55:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3437,"nodeType":"ExpressionStatement","src":"4982:55:11"}]}}]},"documentation":"@dev Adds price integral since the last trade to the total price integral","id":3441,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceBefore","nodeType":"FunctionDefinition","parameters":{"id":3424,"nodeType":"ParameterList","parameters":[],"src":"4846:2:11"},"payable":false,"returnParameters":{"id":3425,"nodeType":"ParameterList","parameters":[],"src":"4869:0:11"},"scope":3458,"src":"4823:231:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3456,"nodeType":"Block","src":"5157:257:11","statements":[{"expression":{"argumentTypes":null,"id":3450,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3444,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"5320:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3447,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7701,"src":"5367:4:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"id":3448,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3184,"src":"5373:4:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3445,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"5337:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":3446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcMarginalPrice","nodeType":"MemberAccess","referencedDeclaration":1570,"src":"5337:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_uint8_$returns$_t_uint256_$","typeString":"function (contract Market,uint8) view external returns (uint256)"}},"id":3449,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5337:41:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5320:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3451,"nodeType":"ExpressionStatement","src":"5320:58:11"},{"expression":{"argumentTypes":null,"id":3454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3452,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5388:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3453,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5404:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5388:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3455,"nodeType":"ExpressionStatement","src":"5388:19:11"}]},"documentation":"@dev Updates last trade timestamp and price","id":3457,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceAfter","nodeType":"FunctionDefinition","parameters":{"id":3442,"nodeType":"ParameterList","parameters":[],"src":"5134:2:11"},"payable":false,"returnParameters":{"id":3443,"nodeType":"ParameterList","parameters":[],"src":"5157:0:11"},"scope":3458,"src":"5112:302:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"}],"scope":3459,"src":"1471:3945:11"}],"src":"0:5417:11"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.015Z"}; /***/ }), @@ -451,10 +791,21 @@ module.exports = {"contract_name":"StandardMarketWithPriceLogger","abi":[{"const /*!********************************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLoggerFactory.json ***! \********************************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"StandardMarketWithPriceLoggerFactory","abi":[{"constant":true,"inputs":[],"name":"standardMarketWithPriceLoggerMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_standardMarketWithPriceLoggerMasterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"market","type":"address"},{"indexed":false,"name":"eventContract","type":"address"},{"indexed":false,"name":"marketMaker","type":"address"},{"indexed":false,"name":"fee","type":"uint24"},{"indexed":false,"name":"startDate","type":"uint256"}],"name":"StandardMarketWithPriceLoggerCreation","type":"event"},{"constant":false,"inputs":[{"name":"eventContract","type":"address"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"},{"name":"startDate","type":"uint256"}],"name":"createMarket","outputs":[{"name":"market","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50604051602080610f9683398101806040528101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610f13806100836000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638e44df5314610051578063d82187441461010d575b600080fd5b34801561005d57600080fd5b506100cb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919080359060200190929190505050610164565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011957600080fd5b5061012261039f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633868686866101956103c4565b808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff1681526020018281526020019650505050505050604051809103906000f080158015610298573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f969b1ad77db8ae8298dedcdf1f2945322eaf681e1d56fcebfd4c23de996dc4848287878787604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff1681526020018281526020019550505050505060405180910390a2949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b604051610b13806103d5833901905600608060405234801561001057600080fd5b5060405160c080610b1383398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505085858585858460008173ffffffffffffffffffffffffffffffffffffffff161415151561009157600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008373ffffffffffffffffffffffffffffffffffffffff1614158015610110575060008273ffffffffffffffffffffffffffffffffffffffff1614155b80156101285750620f424062ffffff168162ffffff16105b151561013357600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561024257600080fd5b505af1158015610256573d6000803e3d6000fd5b505050506040513d602081101561026c57600080fd5b810190808051906020019092919050505060ff166040519080825280602002602001820160405280156102ae5781602001602082028038833980820191505090505b50600690805190602001906102c492919061047c565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561034457fe5b021790555050505050506002600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156103d657600080fd5b505af11580156103ea573d6000803e3d6000fd5b505050506040513d602081101561040057600080fd5b810190808051906020019092919050505060ff1614151561042057600080fd5b6000811415610435574260088190555061044c565b42811015151561044457600080fd5b806008819055505b600854600a8190555060026801000000000000000081151561046a57fe5b04600b819055505050505050506104ee565b8280548282559060005260206000209081019282156104b8579160200282015b828111156104b757825182559160200191906001019061049c565b5b5090506104c591906104c9565b5090565b6104eb91905b808211156104e75760008160009055506001016104cf565b5090565b90565b610616806104fd6000396000f3006080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146101345780630b97bc861461018b5780631f21f9af146101b6578063561cce0a1461020d57806359acb42c1461023e57806368b586d5146102695780638b797a0c14610294578063a157979c146102bf578063a619486e14610300578063c040e6b814610357578063c24a0f8b14610390578063cb4c86b7146103bb578063ddca3f43146103e6578063df449cb81461041b578063e274fd2414610446578063fbde47f61461049d575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461012f573d6000f35b3d6000fd5b34801561014057600080fd5b506101496104d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019757600080fd5b506101a06104f8565b6040518082815260200191505060405180910390f35b3480156101c257600080fd5b506101cb6104fe565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021957600080fd5b50610222610524565b604051808260ff1660ff16815260200191505060405180910390f35b34801561024a57600080fd5b50610253610529565b6040518082815260200191505060405180910390f35b34801561027557600080fd5b5061027e61052f565b6040518082815260200191505060405180910390f35b3480156102a057600080fd5b506102a9610535565b6040518082815260200191505060405180910390f35b3480156102cb57600080fd5b506102ea6004803603810190808035906020019092919050505061053b565b6040518082815260200191505060405180910390f35b34801561030c57600080fd5b5061031561055e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036357600080fd5b5061036c610583565b6040518082600281111561037c57fe5b60ff16815260200191505060405180910390f35b34801561039c57600080fd5b506103a5610596565b6040518082815260200191505060405180910390f35b3480156103c757600080fd5b506103d061059c565b6040518082815260200191505060405180910390f35b3480156103f257600080fd5b506103fb6105a2565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561042757600080fd5b506104306105b7565b6040518082815260200191505060405180910390f35b34801561045257600080fd5b5061045b6105bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104a957600080fd5b506104b26105e3565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600181565b60025481565b600a5481565b600c5481565b60068181548110151561054a57fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60095481565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a72305820c9312262b23a4b0fe0bd5290a576edfa6cb0bc011f21be0d8c12a3e2cf3227830029a165627a7a72305820bd1963bde425507a35035eb95845c485e98140a71f4a77fb85299f63fa0b3a3e0029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638e44df5314610051578063d82187441461010d575b600080fd5b34801561005d57600080fd5b506100cb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803562ffffff16906020019092919080359060200190929190505050610164565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011957600080fd5b5061012261039f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633868686866101956103c4565b808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff1681526020018281526020019650505050505050604051809103906000f080158015610298573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167f969b1ad77db8ae8298dedcdf1f2945322eaf681e1d56fcebfd4c23de996dc4848287878787604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1662ffffff1681526020018281526020019550505050505060405180910390a2949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b604051610b13806103d5833901905600608060405234801561001057600080fd5b5060405160c080610b1383398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505085858585858460008173ffffffffffffffffffffffffffffffffffffffff161415151561009157600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008373ffffffffffffffffffffffffffffffffffffffff1614158015610110575060008273ffffffffffffffffffffffffffffffffffffffff1614155b80156101285750620f424062ffffff168162ffffff16105b151561013357600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561024257600080fd5b505af1158015610256573d6000803e3d6000fd5b505050506040513d602081101561026c57600080fd5b810190808051906020019092919050505060ff166040519080825280602002602001820160405280156102ae5781602001602082028038833980820191505090505b50600690805190602001906102c492919061047c565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561034457fe5b021790555050505050506002600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156103d657600080fd5b505af11580156103ea573d6000803e3d6000fd5b505050506040513d602081101561040057600080fd5b810190808051906020019092919050505060ff1614151561042057600080fd5b6000811415610435574260088190555061044c565b42811015151561044457600080fd5b806008819055505b600854600a8190555060026801000000000000000081151561046a57fe5b04600b819055505050505050506104ee565b8280548282559060005260206000209081019282156104b8579160200282015b828111156104b757825182559160200191906001019061049c565b5b5090506104c591906104c9565b5090565b6104eb91905b808211156104e75760008160009055506001016104cf565b5090565b90565b610616806104fd6000396000f3006080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146101345780630b97bc861461018b5780631f21f9af146101b6578063561cce0a1461020d57806359acb42c1461023e57806368b586d5146102695780638b797a0c14610294578063a157979c146102bf578063a619486e14610300578063c040e6b814610357578063c24a0f8b14610390578063cb4c86b7146103bb578063ddca3f43146103e6578063df449cb81461041b578063e274fd2414610446578063fbde47f61461049d575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461012f573d6000f35b3d6000fd5b34801561014057600080fd5b506101496104d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019757600080fd5b506101a06104f8565b6040518082815260200191505060405180910390f35b3480156101c257600080fd5b506101cb6104fe565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021957600080fd5b50610222610524565b604051808260ff1660ff16815260200191505060405180910390f35b34801561024a57600080fd5b50610253610529565b6040518082815260200191505060405180910390f35b34801561027557600080fd5b5061027e61052f565b6040518082815260200191505060405180910390f35b3480156102a057600080fd5b506102a9610535565b6040518082815260200191505060405180910390f35b3480156102cb57600080fd5b506102ea6004803603810190808035906020019092919050505061053b565b6040518082815260200191505060405180910390f35b34801561030c57600080fd5b5061031561055e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036357600080fd5b5061036c610583565b6040518082600281111561037c57fe5b60ff16815260200191505060405180910390f35b34801561039c57600080fd5b506103a5610596565b6040518082815260200191505060405180910390f35b3480156103c757600080fd5b506103d061059c565b6040518082815260200191505060405180910390f35b3480156103f257600080fd5b506103fb6105a2565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561042757600080fd5b506104306105b7565b6040518082815260200191505060405180910390f35b34801561045257600080fd5b5061045b6105bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104a957600080fd5b506104b26105e3565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600181565b60025481565b600a5481565b600c5481565b60068181548110151561054a57fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60095481565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a72305820c9312262b23a4b0fe0bd5290a576edfa6cb0bc011f21be0d8c12a3e2cf3227830029a165627a7a72305820bd1963bde425507a35035eb95845c485e98140a71f4a77fb85299f63fa0b3a3e0029","sourceMap":"200:1354:12:-;;;601:202;8:9:-1;5:2;;;30:1;27;20:12;5:2;601:202:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;756:40;714:39;;:82;;;;;;;;;;;;;;;;;;601:202;200:1354;;;;;;","deployedSourceMap":"200:1354:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1061:491;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1061:491:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;478:76;;8:9:-1;5:2;;;30:1;27;20:12;5:2;478:76:12;;;;;;;;;;;;;;;;;;;;;;;;;;;1061:491;1189:36;1332:39;;;;;;;;;;;1373:10;1385:13;1400:11;1413:3;1418:9;1280:148;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1280:148:12;1241:188;;1482:10;1444:101;;;1494:6;1502:13;1517:11;1530:3;1535:9;1444:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1061:491;;;;;;:::o;478:76::-;;;;;;;;;;;;;:::o;200:1354::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/StandardMarketWithPriceLogger.sol\";\n\n\n/// @title Market factory contract - Allows to create market contracts\n/// @author Stefan George - \ncontract StandardMarketWithPriceLoggerFactory {\n\n /*\n * Events\n */\n event StandardMarketWithPriceLoggerCreation(address indexed creator, Market market, Event eventContract, MarketMaker marketMaker, uint24 fee, uint startDate);\n\n /*\n * Storage\n */\n StandardMarketWithPriceLogger public standardMarketWithPriceLoggerMasterCopy;\n\n /*\n * Public functions\n */\n constructor(StandardMarketWithPriceLogger _standardMarketWithPriceLoggerMasterCopy)\n public\n {\n standardMarketWithPriceLoggerMasterCopy = _standardMarketWithPriceLoggerMasterCopy;\n }\n\n /// @dev Creates a new market contract\n /// @param eventContract Event contract\n /// @param marketMaker Market maker contract\n /// @param fee Market fee\n /// @param startDate Start date for price logging\n /// @return Market contract\n function createMarket(Event eventContract, MarketMaker marketMaker, uint24 fee, uint startDate)\n public\n returns (StandardMarketWithPriceLogger market)\n {\n market = StandardMarketWithPriceLogger(new StandardMarketWithPriceLoggerProxy(\n standardMarketWithPriceLoggerMasterCopy, msg.sender, eventContract, marketMaker, fee, startDate));\n emit StandardMarketWithPriceLoggerCreation(msg.sender, market, eventContract, marketMaker, fee, startDate);\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","exportedSymbols":{"StandardMarketWithPriceLoggerFactory":[3527]},"id":3528,"nodeType":"SourceUnit","nodes":[{"id":3460,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:12"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","file":"../Markets/StandardMarketWithPriceLogger.sol","id":3461,"nodeType":"ImportDirective","scope":3528,"sourceUnit":3459,"src":"25:54:12","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[3260],"contractKind":"contract","documentation":"@title Market factory contract - Allows to create market contracts\n @author Stefan George - ","fullyImplemented":true,"id":3527,"linearizedBaseContracts":[3527],"name":"StandardMarketWithPriceLoggerFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3475,"name":"StandardMarketWithPriceLoggerCreation","nodeType":"EventDefinition","parameters":{"id":3474,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3463,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":3475,"src":"327:23:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3462,"name":"address","nodeType":"ElementaryTypeName","src":"327:7:12","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3465,"indexed":false,"name":"market","nodeType":"VariableDeclaration","scope":3475,"src":"352:13:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":3464,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"352:6:12","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":3467,"indexed":false,"name":"eventContract","nodeType":"VariableDeclaration","scope":3475,"src":"367:19:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3466,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"367:5:12","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3469,"indexed":false,"name":"marketMaker","nodeType":"VariableDeclaration","scope":3475,"src":"388:23:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3468,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"388:11:12","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3471,"indexed":false,"name":"fee","nodeType":"VariableDeclaration","scope":3475,"src":"413:10:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3470,"name":"uint24","nodeType":"ElementaryTypeName","src":"413:6:12","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3473,"indexed":false,"name":"startDate","nodeType":"VariableDeclaration","scope":3475,"src":"425:14:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3472,"name":"uint","nodeType":"ElementaryTypeName","src":"425:4:12","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"326:114:12"},"src":"283:158:12"},{"constant":false,"id":3477,"name":"standardMarketWithPriceLoggerMasterCopy","nodeType":"VariableDeclaration","scope":3527,"src":"478:76:12","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},"typeName":{"contractScope":null,"id":3476,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"478:29:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"value":null,"visibility":"public"},{"body":{"id":3486,"nodeType":"Block","src":"704:99:12","statements":[{"expression":{"argumentTypes":null,"id":3484,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3482,"name":"standardMarketWithPriceLoggerMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3477,"src":"714:39:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3483,"name":"_standardMarketWithPriceLoggerMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3479,"src":"756:40:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"src":"714:82:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3485,"nodeType":"ExpressionStatement","src":"714:82:12"}]},"documentation":null,"id":3487,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3480,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3479,"name":"_standardMarketWithPriceLoggerMasterCopy","nodeType":"VariableDeclaration","scope":3487,"src":"613:70:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},"typeName":{"contractScope":null,"id":3478,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"613:29:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"value":null,"visibility":"internal"}],"src":"612:72:12"},"payable":false,"returnParameters":{"id":3481,"nodeType":"ParameterList","parameters":[],"src":"704:0:12"},"scope":3527,"src":"601:202:12","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3525,"nodeType":"Block","src":"1231:321:12","statements":[{"expression":{"argumentTypes":null,"id":3513,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3500,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3498,"src":"1241:6:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3504,"name":"standardMarketWithPriceLoggerMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3477,"src":"1332:39:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3505,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1373:3:12","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3506,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1373:10:12","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3507,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3489,"src":"1385:13:12","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3508,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3491,"src":"1400:11:12","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3509,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3493,"src":"1413:3:12","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":3510,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3495,"src":"1418:9:12","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3503,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1280:38:12","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$_t_contract$_StandardMarketWithPriceLoggerProxy_$3260_$","typeString":"function (address,address,contract Event,contract MarketMaker,uint24,uint256) returns (contract StandardMarketWithPriceLoggerProxy)"},"typeName":{"contractScope":null,"id":3502,"name":"StandardMarketWithPriceLoggerProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":3260,"src":"1284:34:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerProxy_$3260","typeString":"contract StandardMarketWithPriceLoggerProxy"}}},"id":3511,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1280:148:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerProxy_$3260","typeString":"contract StandardMarketWithPriceLoggerProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerProxy_$3260","typeString":"contract StandardMarketWithPriceLoggerProxy"}],"id":3501,"name":"StandardMarketWithPriceLogger","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3458,"src":"1250:29:12","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarketWithPriceLogger_$3458_$","typeString":"type(contract StandardMarketWithPriceLogger)"}},"id":3512,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1250:179:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"src":"1241:188:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3514,"nodeType":"ExpressionStatement","src":"1241:188:12"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3516,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1482:3:12","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3517,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1482:10:12","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3518,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3498,"src":"1494:6:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"id":3519,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3489,"src":"1502:13:12","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3520,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3491,"src":"1517:11:12","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3521,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3493,"src":"1530:3:12","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":3522,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3495,"src":"1535:9:12","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3515,"name":"StandardMarketWithPriceLoggerCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3475,"src":"1444:37:12","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_Market_$2238_$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$__$","typeString":"function (address,contract Market,contract Event,contract MarketMaker,uint24,uint256)"}},"id":3523,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1444:101:12","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3524,"nodeType":"EmitStatement","src":"1439:106:12"}]},"documentation":"@dev Creates a new market contract\n @param eventContract Event contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param startDate Start date for price logging\n @return Market contract","id":3526,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":3496,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3489,"name":"eventContract","nodeType":"VariableDeclaration","scope":3526,"src":"1083:19:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3488,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1083:5:12","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3491,"name":"marketMaker","nodeType":"VariableDeclaration","scope":3526,"src":"1104:23:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3490,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1104:11:12","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3493,"name":"fee","nodeType":"VariableDeclaration","scope":3526,"src":"1129:10:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3492,"name":"uint24","nodeType":"ElementaryTypeName","src":"1129:6:12","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3495,"name":"startDate","nodeType":"VariableDeclaration","scope":3526,"src":"1141:14:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3494,"name":"uint","nodeType":"ElementaryTypeName","src":"1141:4:12","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1082:74:12"},"payable":false,"returnParameters":{"id":3499,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3498,"name":"market","nodeType":"VariableDeclaration","scope":3526,"src":"1189:36:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},"typeName":{"contractScope":null,"id":3497,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"1189:29:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"value":null,"visibility":"internal"}],"src":"1188:38:12"},"scope":3527,"src":"1061:491:12","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3528,"src":"200:1354:12"}],"src":"0:1555:12"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLoggerFactory.sol","exportedSymbols":{"StandardMarketWithPriceLoggerFactory":[3527]},"id":3528,"nodeType":"SourceUnit","nodes":[{"id":3460,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:12"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","file":"../Markets/StandardMarketWithPriceLogger.sol","id":3461,"nodeType":"ImportDirective","scope":3528,"sourceUnit":3459,"src":"25:54:12","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[3260],"contractKind":"contract","documentation":"@title Market factory contract - Allows to create market contracts\n @author Stefan George - ","fullyImplemented":true,"id":3527,"linearizedBaseContracts":[3527],"name":"StandardMarketWithPriceLoggerFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":3475,"name":"StandardMarketWithPriceLoggerCreation","nodeType":"EventDefinition","parameters":{"id":3474,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3463,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":3475,"src":"327:23:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3462,"name":"address","nodeType":"ElementaryTypeName","src":"327:7:12","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3465,"indexed":false,"name":"market","nodeType":"VariableDeclaration","scope":3475,"src":"352:13:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"},"typeName":{"contractScope":null,"id":3464,"name":"Market","nodeType":"UserDefinedTypeName","referencedDeclaration":2238,"src":"352:6:12","typeDescriptions":{"typeIdentifier":"t_contract$_Market_$2238","typeString":"contract Market"}},"value":null,"visibility":"internal"},{"constant":false,"id":3467,"indexed":false,"name":"eventContract","nodeType":"VariableDeclaration","scope":3475,"src":"367:19:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3466,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"367:5:12","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3469,"indexed":false,"name":"marketMaker","nodeType":"VariableDeclaration","scope":3475,"src":"388:23:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3468,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"388:11:12","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3471,"indexed":false,"name":"fee","nodeType":"VariableDeclaration","scope":3475,"src":"413:10:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3470,"name":"uint24","nodeType":"ElementaryTypeName","src":"413:6:12","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3473,"indexed":false,"name":"startDate","nodeType":"VariableDeclaration","scope":3475,"src":"425:14:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3472,"name":"uint","nodeType":"ElementaryTypeName","src":"425:4:12","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"326:114:12"},"src":"283:158:12"},{"constant":false,"id":3477,"name":"standardMarketWithPriceLoggerMasterCopy","nodeType":"VariableDeclaration","scope":3527,"src":"478:76:12","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},"typeName":{"contractScope":null,"id":3476,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"478:29:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"value":null,"visibility":"public"},{"body":{"id":3486,"nodeType":"Block","src":"704:99:12","statements":[{"expression":{"argumentTypes":null,"id":3484,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3482,"name":"standardMarketWithPriceLoggerMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3477,"src":"714:39:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3483,"name":"_standardMarketWithPriceLoggerMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3479,"src":"756:40:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"src":"714:82:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3485,"nodeType":"ExpressionStatement","src":"714:82:12"}]},"documentation":null,"id":3487,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3480,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3479,"name":"_standardMarketWithPriceLoggerMasterCopy","nodeType":"VariableDeclaration","scope":3487,"src":"613:70:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},"typeName":{"contractScope":null,"id":3478,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"613:29:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"value":null,"visibility":"internal"}],"src":"612:72:12"},"payable":false,"returnParameters":{"id":3481,"nodeType":"ParameterList","parameters":[],"src":"704:0:12"},"scope":3527,"src":"601:202:12","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":3525,"nodeType":"Block","src":"1231:321:12","statements":[{"expression":{"argumentTypes":null,"id":3513,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3500,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3498,"src":"1241:6:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3504,"name":"standardMarketWithPriceLoggerMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3477,"src":"1332:39:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3505,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1373:3:12","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3506,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1373:10:12","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3507,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3489,"src":"1385:13:12","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3508,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3491,"src":"1400:11:12","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3509,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3493,"src":"1413:3:12","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":3510,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3495,"src":"1418:9:12","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3503,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1280:38:12","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_address_$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$_t_contract$_StandardMarketWithPriceLoggerProxy_$3260_$","typeString":"function (address,address,contract Event,contract MarketMaker,uint24,uint256) returns (contract StandardMarketWithPriceLoggerProxy)"},"typeName":{"contractScope":null,"id":3502,"name":"StandardMarketWithPriceLoggerProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":3260,"src":"1284:34:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerProxy_$3260","typeString":"contract StandardMarketWithPriceLoggerProxy"}}},"id":3511,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1280:148:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerProxy_$3260","typeString":"contract StandardMarketWithPriceLoggerProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerProxy_$3260","typeString":"contract StandardMarketWithPriceLoggerProxy"}],"id":3501,"name":"StandardMarketWithPriceLogger","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3458,"src":"1250:29:12","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarketWithPriceLogger_$3458_$","typeString":"type(contract StandardMarketWithPriceLogger)"}},"id":3512,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1250:179:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"src":"1241:188:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"id":3514,"nodeType":"ExpressionStatement","src":"1241:188:12"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":3516,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1482:3:12","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":3517,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1482:10:12","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3518,"name":"market","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3498,"src":"1494:6:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"id":3519,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3489,"src":"1502:13:12","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3520,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3491,"src":"1517:11:12","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3521,"name":"fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3493,"src":"1530:3:12","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},{"argumentTypes":null,"id":3522,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3495,"src":"1535:9:12","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},{"typeIdentifier":"t_uint24","typeString":"uint24"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":3515,"name":"StandardMarketWithPriceLoggerCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3475,"src":"1444:37:12","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_Market_$2238_$_t_contract$_Event_$384_$_t_contract$_MarketMaker_$1571_$_t_uint24_$_t_uint256_$returns$__$","typeString":"function (address,contract Market,contract Event,contract MarketMaker,uint24,uint256)"}},"id":3523,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1444:101:12","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3524,"nodeType":"EmitStatement","src":"1439:106:12"}]},"documentation":"@dev Creates a new market contract\n @param eventContract Event contract\n @param marketMaker Market maker contract\n @param fee Market fee\n @param startDate Start date for price logging\n @return Market contract","id":3526,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createMarket","nodeType":"FunctionDefinition","parameters":{"id":3496,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3489,"name":"eventContract","nodeType":"VariableDeclaration","scope":3526,"src":"1083:19:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3488,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"1083:5:12","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3491,"name":"marketMaker","nodeType":"VariableDeclaration","scope":3526,"src":"1104:23:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3490,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"1104:11:12","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3493,"name":"fee","nodeType":"VariableDeclaration","scope":3526,"src":"1129:10:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3492,"name":"uint24","nodeType":"ElementaryTypeName","src":"1129:6:12","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3495,"name":"startDate","nodeType":"VariableDeclaration","scope":3526,"src":"1141:14:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3494,"name":"uint","nodeType":"ElementaryTypeName","src":"1141:4:12","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1082:74:12"},"payable":false,"returnParameters":{"id":3499,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3498,"name":"market","nodeType":"VariableDeclaration","scope":3526,"src":"1189:36:12","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},"typeName":{"contractScope":null,"id":3497,"name":"StandardMarketWithPriceLogger","nodeType":"UserDefinedTypeName","referencedDeclaration":3458,"src":"1189:29:12","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},"value":null,"visibility":"internal"}],"src":"1188:38:12"},"scope":3527,"src":"1061:491:12","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3528,"src":"200:1354:12"}],"src":"0:1555:12"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0x70f90213a94744735da323f05f0dea1dcdf0037a","transactionHash":"0xdf46474500d05f47b2f7df5e5552181f863ecf321eac375e36af3da761147f5e"},"4":{"address":"0xdc42443ed08af4a8adf34b74eef4c738ab51530e","transactionHash":"0x73393ad8eb787f8674398347575c703dea431046b7d12b6294b2fde51a7c9870"},"42":{"address":"0x7a1b0afb3180b5194032040898546f631b273585","transactionHash":"0x48b6c096c0ed175075cb00c2f04834c1490ebc59274c8d8d6e18de9a6554c651"},"437894314312":{"address":"0x5f8e26facc23fa4cbd87b8d9dbbd33d5047abde1","transactionHash":"0x49f1ef10d4880cd713c798b4e4d5509e4e1464ff05c7f0868fee739ef75bddb5"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:49.433Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLoggerProxy.json": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardMarketWithPriceLoggerProxy.json ***! + \******************************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"StandardMarketWithPriceLoggerFactory","abi":[{"constant":false,"inputs":[{"name":"eventContract","type":"address"},{"name":"marketMaker","type":"address"},{"name":"fee","type":"uint24"},{"name":"startDate","type":"uint256"}],"name":"createMarket","outputs":[{"name":"market","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"market","type":"address"},{"indexed":false,"name":"eventContract","type":"address"},{"indexed":false,"name":"marketMaker","type":"address"},{"indexed":false,"name":"fee","type":"uint24"},{"indexed":false,"name":"startDate","type":"uint256"}],"name":"StandardMarketWithPriceLoggerCreation","type":"event"}],"networks":{"3":{"address":"0x800820aeb972cb886fdd89d340dbe7b3f4769401","updated_at":1503605014193},"4":{"address":"0xc2803221bf9cb3a245a19bb46727f6d797556dfc","updated_at":1503603856239},"42":{"address":"0xd5daa4b168352ea239cab95cf68a7d4002a6153d","updated_at":1503602339891},"437894314312":{"address":"0x9b1f7f645351af3631a656421ed2e40f2802e6c0","updated_at":1507361155412}},"schema_version":"0.0.5","updated_at":1543915159058}; +module.exports = {"contractName":"StandardMarketWithPriceLoggerProxy","abi":[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"startDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LONG","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"createdAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTradeDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"priceIntegral","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"netOutcomeTokensSold","outputs":[{"name":"","type":"int256"}],"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":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTradePrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eventContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_RANGE","outputs":[{"name":"","type":"uint24"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"proxied","type":"address"},{"name":"_creator","type":"address"},{"name":"_eventContract","type":"address"},{"name":"_marketMaker","type":"address"},{"name":"_fee","type":"uint24"},{"name":"_startDate","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"funding","type":"uint256"}],"name":"MarketFunding","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketClosing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fees","type":"uint256"}],"name":"FeeWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenCost","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"outcomeTokenProfit","type":"uint256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"outcomeTokenIndex","type":"uint8"},{"indexed":false,"name":"outcomeTokenCount","type":"uint256"},{"indexed":false,"name":"cost","type":"uint256"}],"name":"OutcomeTokenShortSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"transactor","type":"address"},{"indexed":false,"name":"outcomeTokenAmounts","type":"int256[]"},{"indexed":false,"name":"outcomeTokenNetCost","type":"int256"},{"indexed":false,"name":"marketFees","type":"uint256"}],"name":"OutcomeTokenTrade","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160c080610b1383398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505085858585858460008173ffffffffffffffffffffffffffffffffffffffff161415151561009157600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008373ffffffffffffffffffffffffffffffffffffffff1614158015610110575060008273ffffffffffffffffffffffffffffffffffffffff1614155b80156101285750620f424062ffffff168162ffffff16105b151561013357600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561024257600080fd5b505af1158015610256573d6000803e3d6000fd5b505050506040513d602081101561026c57600080fd5b810190808051906020019092919050505060ff166040519080825280602002602001820160405280156102ae5781602001602082028038833980820191505090505b50600690805190602001906102c492919061047c565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561034457fe5b021790555050505050506002600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156103d657600080fd5b505af11580156103ea573d6000803e3d6000fd5b505050506040513d602081101561040057600080fd5b810190808051906020019092919050505060ff1614151561042057600080fd5b6000811415610435574260088190555061044c565b42811015151561044457600080fd5b806008819055505b600854600a8190555060026801000000000000000081151561046a57fe5b04600b819055505050505050506104ee565b8280548282559060005260206000209081019282156104b8579160200282015b828111156104b757825182559160200191906001019061049c565b5b5090506104c591906104c9565b5090565b6104eb91905b808211156104e75760008160009055506001016104cf565b5090565b90565b610616806104fd6000396000f3006080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146101345780630b97bc861461018b5780631f21f9af146101b6578063561cce0a1461020d57806359acb42c1461023e57806368b586d5146102695780638b797a0c14610294578063a157979c146102bf578063a619486e14610300578063c040e6b814610357578063c24a0f8b14610390578063cb4c86b7146103bb578063ddca3f43146103e6578063df449cb81461041b578063e274fd2414610446578063fbde47f61461049d575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461012f573d6000f35b3d6000fd5b34801561014057600080fd5b506101496104d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019757600080fd5b506101a06104f8565b6040518082815260200191505060405180910390f35b3480156101c257600080fd5b506101cb6104fe565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021957600080fd5b50610222610524565b604051808260ff1660ff16815260200191505060405180910390f35b34801561024a57600080fd5b50610253610529565b6040518082815260200191505060405180910390f35b34801561027557600080fd5b5061027e61052f565b6040518082815260200191505060405180910390f35b3480156102a057600080fd5b506102a9610535565b6040518082815260200191505060405180910390f35b3480156102cb57600080fd5b506102ea6004803603810190808035906020019092919050505061053b565b6040518082815260200191505060405180910390f35b34801561030c57600080fd5b5061031561055e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036357600080fd5b5061036c610583565b6040518082600281111561037c57fe5b60ff16815260200191505060405180910390f35b34801561039c57600080fd5b506103a5610596565b6040518082815260200191505060405180910390f35b3480156103c757600080fd5b506103d061059c565b6040518082815260200191505060405180910390f35b3480156103f257600080fd5b506103fb6105a2565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561042757600080fd5b506104306105b7565b6040518082815260200191505060405180910390f35b34801561045257600080fd5b5061045b6105bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104a957600080fd5b506104b26105e3565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600181565b60025481565b600a5481565b600c5481565b60068181548110151561054a57fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60095481565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a72305820c9312262b23a4b0fe0bd5290a576edfa6cb0bc011f21be0d8c12a3e2cf3227830029","deployedBytecode":"0x6080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146101345780630b97bc861461018b5780631f21f9af146101b6578063561cce0a1461020d57806359acb42c1461023e57806368b586d5146102695780638b797a0c14610294578063a157979c146102bf578063a619486e14610300578063c040e6b814610357578063c24a0f8b14610390578063cb4c86b7146103bb578063ddca3f43146103e6578063df449cb81461041b578063e274fd2414610446578063fbde47f61461049d575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461012f573d6000f35b3d6000fd5b34801561014057600080fd5b506101496104d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019757600080fd5b506101a06104f8565b6040518082815260200191505060405180910390f35b3480156101c257600080fd5b506101cb6104fe565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021957600080fd5b50610222610524565b604051808260ff1660ff16815260200191505060405180910390f35b34801561024a57600080fd5b50610253610529565b6040518082815260200191505060405180910390f35b34801561027557600080fd5b5061027e61052f565b6040518082815260200191505060405180910390f35b3480156102a057600080fd5b506102a9610535565b6040518082815260200191505060405180910390f35b3480156102cb57600080fd5b506102ea6004803603810190808035906020019092919050505061053b565b6040518082815260200191505060405180910390f35b34801561030c57600080fd5b5061031561055e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036357600080fd5b5061036c610583565b6040518082600281111561037c57fe5b60ff16815260200191505060405180910390f35b34801561039c57600080fd5b506103a5610596565b6040518082815260200191505060405180910390f35b3480156103c757600080fd5b506103d061059c565b6040518082815260200191505060405180910390f35b3480156103f257600080fd5b506103fb6105a2565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561042757600080fd5b506104306105b7565b6040518082815260200191505060405180910390f35b34801561045257600080fd5b5061045b6105bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104a957600080fd5b506104b26105e3565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600181565b60025481565b600a5481565b600c5481565b60068181548110151561054a57fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60095481565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f4240815600a165627a7a72305820c9312262b23a4b0fe0bd5290a576edfa6cb0bc011f21be0d8c12a3e2cf3227830029","sourceMap":"407:1062:11:-;;;798:669;8:9:-1;5:2;;;30:1;27;20:12;5:2;798:669:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;966:7;975:8;985:14;1001:12;1015:4;513:5:9;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;611:1:9;592:14;584:28;;;;:58;;;;;641:1;624:12;616:26;;;;584:58;:78;;;;;297:7;646:16;;:4;:16;;;584:78;576:87;;;;;;;;683:8;673:7;;:18;;;;;;;;;;;;;;;;;;718:12;701:14;:29;;;;756:14;740:13;;:30;;;;;;;;;;;;;;;;;;813:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;813:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;813:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;813:31:9;;;;;;;;;;;;;;;;803:42;;;;;;;;;;;;;;;;;;;;;;;;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;803:42:9;;;;780:20;:65;;;;;;;;;;;;:::i;:::-;;861:4;855:3;;:10;;;;;;;;;;;;;;;;;;889:12;875:11;;:26;;;;;;;;;;;;;;;;;;919:20;911:5;;:28;;;;;;;;;;;;;;;;;;;;;;;;393:553;;;;;1078:1:11;1043:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1043:31:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1043:31:11;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1043:31:11;;;;;;;;;;;;;;;;:36;;;1035:45;;;;;;;;1109:1;1095:10;:15;1091:217;;;1136:3;1124:9;:15;;;;1091:217;;;1257:3;1243:10;:17;;1235:26;;;;;;;;1287:10;1275:9;:22;;;;1091:217;1334:9;;1318:13;:25;;;;1459:1;169:19;1453:7;;;;;;;;1436:14;:24;;;;798:669;;;;;;407:1062;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;","deployedSourceMap":"407:1062:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;874:22:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;874:22:8;;;;;;;;;;;;;;;;;;;;;;;;;;;262:21:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:21:11;;;;;;;;;;;;;;;;;;;;;;;966:30:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;966:30:8;;;;;;;;;;;;;;;;;;;;;;;;;;;194::11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;194:30:11;;;;;;;;;;;;;;;;;;;;;;;;;;;902:26:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;902:26:8;;;;;;;;;;;;;;;;;;;;;;;314:25:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;314:25:11;;;;;;;;;;;;;;;;;;;;;;;377;;8:9:-1;5:2;;;30:1;27;20:12;5:2;377:25:11;;;;;;;;;;;;;;;;;;;;;;;1050:33:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1050:33:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;1089:19:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:19:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;289::11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;289:19:11;;;;;;;;;;;;;;;;;;;;;;;1025::8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1025:19:8;;;;;;;;;;;;;;;;;;;;;;;1002:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1002:17:8;;;;;;;;;;;;;;;;;;;;;;;;;;;345:26:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;345:26:11;;;;;;;;;;;;;;;;;;;;;;;934::8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;934:26:8;;;;;;;;;;;;;;;;;;;;;;;;;;;262:42:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:42:9;;;;;;;;;;;;;;;;;;;;;;;;;;;874:22:8;;;;;;;;;;;;;:::o;262:21:11:-;;;;:::o;966:30:8:-;;;;;;;;;;;;;:::o;194::11:-;223:1;194:30;:::o;902:26:8:-;;;;:::o;314:25:11:-;;;;:::o;377:::-;;;;:::o;1050:33:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;1089:19:8:-;;;;;;;;;;;;;:::o;289::11:-;;;;:::o;1025::8:-;;;;:::o;1002:17::-;;;;;;;;;;;;;:::o;345:26:11:-;;;;:::o;934::8:-;;;;;;;;;;;;;:::o;262:42:9:-;297:7;262:42;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Markets/StandardMarket.sol\";\n\ncontract StandardMarketWithPriceLoggerData {\n\n /*\n * Constants\n */\n uint constant ONE = 0x10000000000000000;\n uint8 public constant LONG = 1;\n\n /*\n * Storage\n */\n uint public startDate;\n uint public endDate;\n uint public lastTradeDate;\n uint public lastTradePrice;\n uint public priceIntegral;\n}\n\ncontract StandardMarketWithPriceLoggerProxy is StandardMarketProxy, StandardMarketWithPriceLoggerData {\n\n /// @dev Constructor validates and sets market properties\n /// @param _creator Market creator\n /// @param _eventContract Event contract\n /// @param _marketMaker Market maker contract\n /// @param _fee Market fee\n /// @param _startDate Start date for price logging\n constructor(address proxied, address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee, uint _startDate)\n public\n StandardMarketProxy(proxied, _creator, _eventContract, _marketMaker, _fee)\n {\n require(eventContract.getOutcomeCount() == 2);\n\n if (_startDate == 0)\n startDate = now;\n else {\n // The earliest start date is the market creation date\n require(_startDate >= now);\n startDate = _startDate;\n }\n\n lastTradeDate = startDate;\n // initialize lastTradePrice to assuming uniform probabilities of outcomes\n lastTradePrice = ONE / 2;\n }\n}\n\ncontract StandardMarketWithPriceLogger is StandardMarket, StandardMarketWithPriceLoggerData {\n /*\n * Public functions\n */\n /// @dev Allows to buy outcome tokens from market maker\n /// @param outcomeTokenIndex Index of the outcome token to buy\n /// @param outcomeTokenCount Amount of outcome tokens to buy\n /// @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n /// @return Cost in collateral tokens\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost)\n public\n returns (uint cost)\n {\n logPriceBefore();\n cost = super.buy(outcomeTokenIndex, outcomeTokenCount, maxCost);\n logPriceAfter();\n }\n\n /// @dev Allows to sell outcome tokens to market maker\n /// @param outcomeTokenIndex Index of the outcome token to sell\n /// @param outcomeTokenCount Amount of outcome tokens to sell\n /// @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n /// @return Profit in collateral tokens\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint profit)\n {\n logPriceBefore();\n profit = super.sell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n logPriceAfter();\n }\n\n /// @dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n /// shares of all other outcome tokens.\n /// @param outcomeTokenIndex Index of the outcome token to short sell\n /// @param outcomeTokenCount Amount of outcome tokens to short sell\n /// @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n /// @return Cost to short sell outcome in collateral tokens\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint cost)\n {\n logPriceBefore();\n cost = super.shortSell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n logPriceAfter();\n }\n\n /// @dev Allows to trade outcome tokens with market maker\n /// @param outcomeTokenAmounts Amounts of outcome tokens to trade\n /// @param collateralLimit The maximum cost or minimum profit in collateral tokens\n /// @return Cost/profit in collateral tokens\n function trade(int[] outcomeTokenAmounts, int collateralLimit)\n public\n returns (int netCost)\n {\n logPriceBefore();\n netCost = super.trade(outcomeTokenAmounts, collateralLimit);\n logPriceAfter();\n }\n\n\n /// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator\n function close()\n public\n {\n endDate = now;\n super.close();\n }\n\n /// @dev Calculates average price for long tokens based on price integral\n /// @return Average price for long tokens over time\n function getAvgPrice()\n public\n view\n returns (uint)\n {\n if(endDate > 0)\n return (priceIntegral + lastTradePrice * (endDate - lastTradeDate)) / (endDate - startDate);\n return (priceIntegral + lastTradePrice * (now - lastTradeDate)) / (now - startDate);\n }\n\n /*\n * Private functions\n */\n /// @dev Adds price integral since the last trade to the total price integral\n function logPriceBefore()\n private\n {\n if (now >= startDate) {\n // Accumulate price integral only if logging has begun\n priceIntegral += lastTradePrice * (now - lastTradeDate);\n }\n }\n\n /// @dev Updates last trade timestamp and price\n function logPriceAfter()\n private\n {\n // Refresh lastTradePrice after every transactions as we don't know if\n // this will be the last transaction before logging period starts\n lastTradePrice = marketMaker.calcMarginalPrice(this, LONG);\n lastTradeDate = now;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","exportedSymbols":{"StandardMarketWithPriceLogger":[3458],"StandardMarketWithPriceLoggerData":[3195],"StandardMarketWithPriceLoggerProxy":[3260]},"id":3459,"nodeType":"SourceUnit","nodes":[{"id":3177,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:11"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","file":"../Markets/StandardMarket.sol","id":3178,"nodeType":"ImportDirective","scope":3459,"sourceUnit":3113,"src":"25:39:11","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3195,"linearizedBaseContracts":[3195],"name":"StandardMarketWithPriceLoggerData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":3181,"name":"ONE","nodeType":"VariableDeclaration","scope":3195,"src":"149:39:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3179,"name":"uint","nodeType":"ElementaryTypeName","src":"149:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":3180,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"169:19:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"internal"},{"constant":true,"id":3184,"name":"LONG","nodeType":"VariableDeclaration","scope":3195,"src":"194:30:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3182,"name":"uint8","nodeType":"ElementaryTypeName","src":"194:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3183,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"223:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3186,"name":"startDate","nodeType":"VariableDeclaration","scope":3195,"src":"262:21:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3185,"name":"uint","nodeType":"ElementaryTypeName","src":"262:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3188,"name":"endDate","nodeType":"VariableDeclaration","scope":3195,"src":"289:19:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3187,"name":"uint","nodeType":"ElementaryTypeName","src":"289:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3190,"name":"lastTradeDate","nodeType":"VariableDeclaration","scope":3195,"src":"314:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3189,"name":"uint","nodeType":"ElementaryTypeName","src":"314:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3192,"name":"lastTradePrice","nodeType":"VariableDeclaration","scope":3195,"src":"345:26:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3191,"name":"uint","nodeType":"ElementaryTypeName","src":"345:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3194,"name":"priceIntegral","nodeType":"VariableDeclaration","scope":3195,"src":"377:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3193,"name":"uint","nodeType":"ElementaryTypeName","src":"377:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"}],"scope":3459,"src":"66:339:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3196,"name":"StandardMarketProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":2326,"src":"454:19:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}},"id":3197,"nodeType":"InheritanceSpecifier","src":"454:19:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3198,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"475:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3199,"nodeType":"InheritanceSpecifier","src":"475:33:11"}],"contractDependencies":[2172,2248,2326,3195,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3260,"linearizedBaseContracts":[3260,3195,2326,2248,2172,6701,6673],"name":"StandardMarketWithPriceLoggerProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3258,"nodeType":"Block","src":"1025:442:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3222,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1043:13:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"1043:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3224,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1043:31:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1078:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1043:36:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3221,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1035:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3227,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1035:45:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3228,"nodeType":"ExpressionStatement","src":"1035:45:11"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3229,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1095:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3230,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1109:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1095:15:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3246,"nodeType":"Block","src":"1154:154:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3237,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1243:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3238,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1257:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1243:17:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1235:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1235:26:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3241,"nodeType":"ExpressionStatement","src":"1235:26:11"},{"expression":{"argumentTypes":null,"id":3244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3242,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1275:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3243,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1287:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1275:22:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3245,"nodeType":"ExpressionStatement","src":"1275:22:11"}]},"id":3247,"nodeType":"IfStatement","src":"1091:217:11","trueBody":{"expression":{"argumentTypes":null,"id":3234,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3232,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1124:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3233,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1136:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1124:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3235,"nodeType":"ExpressionStatement","src":"1124:15:11"}},{"expression":{"argumentTypes":null,"id":3250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3248,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"1318:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3249,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1334:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1318:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3251,"nodeType":"ExpressionStatement","src":"1318:25:11"},{"expression":{"argumentTypes":null,"id":3256,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3252,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"1436:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3255,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3253,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3181,"src":"1453:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3254,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1459:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1453:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1436:24:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3257,"nodeType":"ExpressionStatement","src":"1436:24:11"}]},"documentation":"@dev Constructor validates and sets market properties\n @param _creator Market creator\n @param _eventContract Event contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _startDate Start date for price logging","id":3259,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3214,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3201,"src":"966:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3215,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3203,"src":"975:8:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3216,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3205,"src":"985:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3217,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3207,"src":"1001:12:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3218,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3209,"src":"1015:4:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"id":3219,"modifierName":{"argumentTypes":null,"id":3213,"name":"StandardMarketProxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2326,"src":"946:19:11","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarketProxy_$2326_$","typeString":"type(contract StandardMarketProxy)"}},"nodeType":"ModifierInvocation","src":"946:74:11"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3212,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3201,"name":"proxied","nodeType":"VariableDeclaration","scope":3259,"src":"810:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3200,"name":"address","nodeType":"ElementaryTypeName","src":"810:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3203,"name":"_creator","nodeType":"VariableDeclaration","scope":3259,"src":"827:16:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3202,"name":"address","nodeType":"ElementaryTypeName","src":"827:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3205,"name":"_eventContract","nodeType":"VariableDeclaration","scope":3259,"src":"845:20:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3204,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"845:5:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3207,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":3259,"src":"867:24:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3206,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"867:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3209,"name":"_fee","nodeType":"VariableDeclaration","scope":3259,"src":"893:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3208,"name":"uint24","nodeType":"ElementaryTypeName","src":"893:6:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3211,"name":"_startDate","nodeType":"VariableDeclaration","scope":3259,"src":"906:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3210,"name":"uint","nodeType":"ElementaryTypeName","src":"906:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"809:113:11"},"payable":false,"returnParameters":{"id":3220,"nodeType":"ParameterList","parameters":[],"src":"1025:0:11"},"scope":3260,"src":"798:669:11","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3459,"src":"407:1062:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3261,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"1513:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3262,"nodeType":"InheritanceSpecifier","src":"1513:14:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3263,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"1529:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3264,"nodeType":"InheritanceSpecifier","src":"1529:33:11"}],"contractDependencies":[2172,2238,2248,3112,3195,6673],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3458,"linearizedBaseContracts":[3458,3195,3112,2248,2238,2172,6673],"name":"StandardMarketWithPriceLogger","nodeType":"ContractDefinition","nodes":[{"body":{"id":3290,"nodeType":"Block","src":"2053:131:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3275,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2063:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2063:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3277,"nodeType":"ExpressionStatement","src":"2063:16:11"},{"expression":{"argumentTypes":null,"id":3285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3278,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3273,"src":"2089:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3281,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3266,"src":"2106:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3282,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3268,"src":"2125:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3283,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3270,"src":"2144:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3279,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2096:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buy","nodeType":"MemberAccess","referencedDeclaration":2596,"src":"2096:9:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3284,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2096:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2089:63:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3286,"nodeType":"ExpressionStatement","src":"2089:63:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3287,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2162:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3288,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2162:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3289,"nodeType":"ExpressionStatement","src":"2162:15:11"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":3291,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":3271,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3266,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3291,"src":"1943:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3265,"name":"uint8","nodeType":"ElementaryTypeName","src":"1943:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3268,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3291,"src":"1968:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3267,"name":"uint","nodeType":"ElementaryTypeName","src":"1968:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3270,"name":"maxCost","nodeType":"VariableDeclaration","scope":3291,"src":"1992:12:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3269,"name":"uint","nodeType":"ElementaryTypeName","src":"1992:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1942:63:11"},"payable":false,"returnParameters":{"id":3274,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3273,"name":"cost","nodeType":"VariableDeclaration","scope":3291,"src":"2038:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3272,"name":"uint","nodeType":"ElementaryTypeName","src":"2038:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2037:11:11"},"scope":3458,"src":"1930:254:11","stateMutability":"nonpayable","superFunction":2596,"visibility":"public"},{"body":{"id":3317,"nodeType":"Block","src":"2647:136:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3302,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2657:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3303,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2657:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3304,"nodeType":"ExpressionStatement","src":"2657:16:11"},{"expression":{"argumentTypes":null,"id":3312,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3305,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3300,"src":"2683:6:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3308,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3293,"src":"2703:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3309,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3295,"src":"2722:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3310,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3297,"src":"2741:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3306,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2692:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3307,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"2692:10:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3311,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2692:59:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2683:68:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3313,"nodeType":"ExpressionStatement","src":"2683:68:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3314,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2761:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2761:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3316,"nodeType":"ExpressionStatement","src":"2761:15:11"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":3318,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":3298,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3293,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3318,"src":"2533:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3292,"name":"uint8","nodeType":"ElementaryTypeName","src":"2533:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3295,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3318,"src":"2558:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3294,"name":"uint","nodeType":"ElementaryTypeName","src":"2558:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3297,"name":"minProfit","nodeType":"VariableDeclaration","scope":3318,"src":"2582:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3296,"name":"uint","nodeType":"ElementaryTypeName","src":"2582:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2532:65:11"},"payable":false,"returnParameters":{"id":3301,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3300,"name":"profit","nodeType":"VariableDeclaration","scope":3318,"src":"2630:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3299,"name":"uint","nodeType":"ElementaryTypeName","src":"2630:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2629:13:11"},"scope":3458,"src":"2519:264:11","stateMutability":"nonpayable","superFunction":2707,"visibility":"public"},{"body":{"id":3344,"nodeType":"Block","src":"3383:139:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3329,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3393:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3330,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3393:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3331,"nodeType":"ExpressionStatement","src":"3393:16:11"},{"expression":{"argumentTypes":null,"id":3339,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3332,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3327,"src":"3419:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3335,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3320,"src":"3442:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3336,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3322,"src":"3461:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3337,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3324,"src":"3480:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3333,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3426:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"shortSell","nodeType":"MemberAccess","referencedDeclaration":2822,"src":"3426:15:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3426:64:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3419:71:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3340,"nodeType":"ExpressionStatement","src":"3419:71:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3341,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"3500:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3342,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3500:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3343,"nodeType":"ExpressionStatement","src":"3500:15:11"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":3345,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":3325,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3320,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3345,"src":"3271:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3319,"name":"uint8","nodeType":"ElementaryTypeName","src":"3271:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3322,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3345,"src":"3296:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3321,"name":"uint","nodeType":"ElementaryTypeName","src":"3296:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3324,"name":"minProfit","nodeType":"VariableDeclaration","scope":3345,"src":"3320:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3323,"name":"uint","nodeType":"ElementaryTypeName","src":"3320:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3270:65:11"},"payable":false,"returnParameters":{"id":3328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3327,"name":"cost","nodeType":"VariableDeclaration","scope":3345,"src":"3368:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3326,"name":"uint","nodeType":"ElementaryTypeName","src":"3368:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3367:11:11"},"scope":3458,"src":"3252:270:11","stateMutability":"nonpayable","superFunction":2822,"visibility":"public"},{"body":{"id":3369,"nodeType":"Block","src":"3908:127:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3355,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3918:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3918:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3357,"nodeType":"ExpressionStatement","src":"3918:16:11"},{"expression":{"argumentTypes":null,"id":3364,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3358,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3353,"src":"3944:7:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3361,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3348,"src":"3966:19:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":3362,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3350,"src":"3987:15:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3359,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3954:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"trade","nodeType":"MemberAccess","referencedDeclaration":2875,"src":"3954:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$","typeString":"function (int256[] memory,int256) returns (int256)"}},"id":3363,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3954:49:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3944:59:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3365,"nodeType":"ExpressionStatement","src":"3944:59:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3366,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"4013:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3367,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4013:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3368,"nodeType":"ExpressionStatement","src":"4013:15:11"}]},"documentation":"@dev Allows to trade outcome tokens with market maker\n @param outcomeTokenAmounts Amounts of outcome tokens to trade\n @param collateralLimit The maximum cost or minimum profit in collateral tokens\n @return Cost/profit in collateral tokens","id":3370,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":3351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3348,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3370,"src":"3811:25:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":3346,"name":"int","nodeType":"ElementaryTypeName","src":"3811:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3347,"length":null,"nodeType":"ArrayTypeName","src":"3811:5:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":3350,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3370,"src":"3838:19:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3349,"name":"int","nodeType":"ElementaryTypeName","src":"3838:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3810:48:11"},"payable":false,"returnParameters":{"id":3354,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3353,"name":"netCost","nodeType":"VariableDeclaration","scope":3370,"src":"3891:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3352,"name":"int","nodeType":"ElementaryTypeName","src":"3891:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3890:13:11"},"scope":3458,"src":"3796:239:11","stateMutability":"nonpayable","superFunction":2875,"visibility":"public"},{"body":{"id":3382,"nodeType":"Block","src":"4194:53:11","statements":[{"expression":{"argumentTypes":null,"id":3375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3373,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4204:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3374,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4214:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4204:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3376,"nodeType":"ExpressionStatement","src":"4204:13:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3377,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"4227:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2460,"src":"4227:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:13:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3381,"nodeType":"ExpressionStatement","src":"4227:13:11"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":3383,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":3371,"nodeType":"ParameterList","parameters":[],"src":"4172:2:11"},"payable":false,"returnParameters":{"id":3372,"nodeType":"ParameterList","parameters":[],"src":"4194:0:11"},"scope":3458,"src":"4158:89:11","stateMutability":"nonpayable","superFunction":2460,"visibility":"public"},{"body":{"id":3422,"nodeType":"Block","src":"4465:229:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3388,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4478:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3389,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4488:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4478:11:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3406,"nodeType":"IfStatement","src":"4475:119:11","trueBody":{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3404,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3398,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3391,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4511:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3392,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4527:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3393,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4545:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3394,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4555:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4545:23:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3396,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4544:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4527:42:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4511:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3399,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4510:60:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3400,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4574:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3401,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4584:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4574:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3403,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4573:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4510:84:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3405,"nodeType":"Return","src":"4503:91:11"}},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3407,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4612:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3413,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3408,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4628:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3411,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3409,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4646:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3410,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4652:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4646:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3412,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4645:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4628:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4612:54:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3415,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4611:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3416,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4671:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3417,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4677:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4671:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3419,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4670:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4611:76:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3421,"nodeType":"Return","src":"4604:83:11"}]},"documentation":"@dev Calculates average price for long tokens based on price integral\n @return Average price for long tokens over time","id":3423,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getAvgPrice","nodeType":"FunctionDefinition","parameters":{"id":3384,"nodeType":"ParameterList","parameters":[],"src":"4407:2:11"},"payable":false,"returnParameters":{"id":3387,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3386,"name":"","nodeType":"VariableDeclaration","scope":3423,"src":"4455:4:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3385,"name":"uint","nodeType":"ElementaryTypeName","src":"4455:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4454:6:11"},"scope":3458,"src":"4387:307:11","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":3440,"nodeType":"Block","src":"4869:185:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3426,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4883:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3427,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4890:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4883:16:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3439,"nodeType":"IfStatement","src":"4879:169:11","trueBody":{"id":3438,"nodeType":"Block","src":"4901:147:11","statements":[{"expression":{"argumentTypes":null,"id":3436,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3429,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4982:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3430,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4999:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3431,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5017:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3432,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5023:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5017:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3434,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5016:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4982:55:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3437,"nodeType":"ExpressionStatement","src":"4982:55:11"}]}}]},"documentation":"@dev Adds price integral since the last trade to the total price integral","id":3441,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceBefore","nodeType":"FunctionDefinition","parameters":{"id":3424,"nodeType":"ParameterList","parameters":[],"src":"4846:2:11"},"payable":false,"returnParameters":{"id":3425,"nodeType":"ParameterList","parameters":[],"src":"4869:0:11"},"scope":3458,"src":"4823:231:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3456,"nodeType":"Block","src":"5157:257:11","statements":[{"expression":{"argumentTypes":null,"id":3450,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3444,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"5320:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3447,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7701,"src":"5367:4:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"id":3448,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3184,"src":"5373:4:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3445,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"5337:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":3446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcMarginalPrice","nodeType":"MemberAccess","referencedDeclaration":1570,"src":"5337:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_uint8_$returns$_t_uint256_$","typeString":"function (contract Market,uint8) view external returns (uint256)"}},"id":3449,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5337:41:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5320:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3451,"nodeType":"ExpressionStatement","src":"5320:58:11"},{"expression":{"argumentTypes":null,"id":3454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3452,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5388:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3453,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5404:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5388:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3455,"nodeType":"ExpressionStatement","src":"5388:19:11"}]},"documentation":"@dev Updates last trade timestamp and price","id":3457,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceAfter","nodeType":"FunctionDefinition","parameters":{"id":3442,"nodeType":"ParameterList","parameters":[],"src":"5134:2:11"},"payable":false,"returnParameters":{"id":3443,"nodeType":"ParameterList","parameters":[],"src":"5157:0:11"},"scope":3458,"src":"5112:302:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"}],"scope":3459,"src":"1471:3945:11"}],"src":"0:5417:11"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol","exportedSymbols":{"StandardMarketWithPriceLogger":[3458],"StandardMarketWithPriceLoggerData":[3195],"StandardMarketWithPriceLoggerProxy":[3260]},"id":3459,"nodeType":"SourceUnit","nodes":[{"id":3177,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:11"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol","file":"../Markets/StandardMarket.sol","id":3178,"nodeType":"ImportDirective","scope":3459,"sourceUnit":3113,"src":"25:39:11","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3195,"linearizedBaseContracts":[3195],"name":"StandardMarketWithPriceLoggerData","nodeType":"ContractDefinition","nodes":[{"constant":true,"id":3181,"name":"ONE","nodeType":"VariableDeclaration","scope":3195,"src":"149:39:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3179,"name":"uint","nodeType":"ElementaryTypeName","src":"149:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":{"argumentTypes":null,"hexValue":"30783130303030303030303030303030303030","id":3180,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"169:19:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18446744073709551616_by_1","typeString":"int_const 18446744073709551616"},"value":"0x10000000000000000"},"visibility":"internal"},{"constant":true,"id":3184,"name":"LONG","nodeType":"VariableDeclaration","scope":3195,"src":"194:30:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3182,"name":"uint8","nodeType":"ElementaryTypeName","src":"194:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"31","id":3183,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"223:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"visibility":"public"},{"constant":false,"id":3186,"name":"startDate","nodeType":"VariableDeclaration","scope":3195,"src":"262:21:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3185,"name":"uint","nodeType":"ElementaryTypeName","src":"262:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3188,"name":"endDate","nodeType":"VariableDeclaration","scope":3195,"src":"289:19:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3187,"name":"uint","nodeType":"ElementaryTypeName","src":"289:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3190,"name":"lastTradeDate","nodeType":"VariableDeclaration","scope":3195,"src":"314:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3189,"name":"uint","nodeType":"ElementaryTypeName","src":"314:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3192,"name":"lastTradePrice","nodeType":"VariableDeclaration","scope":3195,"src":"345:26:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3191,"name":"uint","nodeType":"ElementaryTypeName","src":"345:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":3194,"name":"priceIntegral","nodeType":"VariableDeclaration","scope":3195,"src":"377:25:11","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3193,"name":"uint","nodeType":"ElementaryTypeName","src":"377:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"}],"scope":3459,"src":"66:339:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3196,"name":"StandardMarketProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":2326,"src":"454:19:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketProxy_$2326","typeString":"contract StandardMarketProxy"}},"id":3197,"nodeType":"InheritanceSpecifier","src":"454:19:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3198,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"475:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3199,"nodeType":"InheritanceSpecifier","src":"475:33:11"}],"contractDependencies":[2172,2248,2326,3195,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3260,"linearizedBaseContracts":[3260,3195,2326,2248,2172,6701,6673],"name":"StandardMarketWithPriceLoggerProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":3258,"nodeType":"Block","src":"1025:442:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":3226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3222,"name":"eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2156,"src":"1043:13:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"id":3223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcomeCount","nodeType":"MemberAccess","referencedDeclaration":323,"src":"1043:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_uint8_$","typeString":"function () view external returns (uint8)"}},"id":3224,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1043:31:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1078:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1043:36:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3221,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1035:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3227,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1035:45:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3228,"nodeType":"ExpressionStatement","src":"1035:45:11"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3231,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3229,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1095:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3230,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1109:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1095:15:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":3246,"nodeType":"Block","src":"1154:154:11","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3237,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1243:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3238,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1257:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1243:17:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":3236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1235:7:11","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":3240,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1235:26:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3241,"nodeType":"ExpressionStatement","src":"1235:26:11"},{"expression":{"argumentTypes":null,"id":3244,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3242,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1275:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3243,"name":"_startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3211,"src":"1287:10:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1275:22:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3245,"nodeType":"ExpressionStatement","src":"1275:22:11"}]},"id":3247,"nodeType":"IfStatement","src":"1091:217:11","trueBody":{"expression":{"argumentTypes":null,"id":3234,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3232,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1124:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3233,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"1136:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1124:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3235,"nodeType":"ExpressionStatement","src":"1124:15:11"}},{"expression":{"argumentTypes":null,"id":3250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3248,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"1318:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3249,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"1334:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1318:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3251,"nodeType":"ExpressionStatement","src":"1318:25:11"},{"expression":{"argumentTypes":null,"id":3256,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3252,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"1436:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3255,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3253,"name":"ONE","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3181,"src":"1453:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"32","id":3254,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1459:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"1453:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1436:24:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3257,"nodeType":"ExpressionStatement","src":"1436:24:11"}]},"documentation":"@dev Constructor validates and sets market properties\n @param _creator Market creator\n @param _eventContract Event contract\n @param _marketMaker Market maker contract\n @param _fee Market fee\n @param _startDate Start date for price logging","id":3259,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":3214,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3201,"src":"966:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3215,"name":"_creator","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3203,"src":"975:8:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":3216,"name":"_eventContract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3205,"src":"985:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},{"argumentTypes":null,"id":3217,"name":"_marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3207,"src":"1001:12:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},{"argumentTypes":null,"id":3218,"name":"_fee","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3209,"src":"1015:4:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}}],"id":3219,"modifierName":{"argumentTypes":null,"id":3213,"name":"StandardMarketProxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2326,"src":"946:19:11","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_StandardMarketProxy_$2326_$","typeString":"type(contract StandardMarketProxy)"}},"nodeType":"ModifierInvocation","src":"946:74:11"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":3212,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3201,"name":"proxied","nodeType":"VariableDeclaration","scope":3259,"src":"810:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3200,"name":"address","nodeType":"ElementaryTypeName","src":"810:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3203,"name":"_creator","nodeType":"VariableDeclaration","scope":3259,"src":"827:16:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":3202,"name":"address","nodeType":"ElementaryTypeName","src":"827:7:11","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":3205,"name":"_eventContract","nodeType":"VariableDeclaration","scope":3259,"src":"845:20:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"},"typeName":{"contractScope":null,"id":3204,"name":"Event","nodeType":"UserDefinedTypeName","referencedDeclaration":384,"src":"845:5:11","typeDescriptions":{"typeIdentifier":"t_contract$_Event_$384","typeString":"contract Event"}},"value":null,"visibility":"internal"},{"constant":false,"id":3207,"name":"_marketMaker","nodeType":"VariableDeclaration","scope":3259,"src":"867:24:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"},"typeName":{"contractScope":null,"id":3206,"name":"MarketMaker","nodeType":"UserDefinedTypeName","referencedDeclaration":1571,"src":"867:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"value":null,"visibility":"internal"},{"constant":false,"id":3209,"name":"_fee","nodeType":"VariableDeclaration","scope":3259,"src":"893:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"},"typeName":{"id":3208,"name":"uint24","nodeType":"ElementaryTypeName","src":"893:6:11","typeDescriptions":{"typeIdentifier":"t_uint24","typeString":"uint24"}},"value":null,"visibility":"internal"},{"constant":false,"id":3211,"name":"_startDate","nodeType":"VariableDeclaration","scope":3259,"src":"906:15:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3210,"name":"uint","nodeType":"ElementaryTypeName","src":"906:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"809:113:11"},"payable":false,"returnParameters":{"id":3220,"nodeType":"ParameterList","parameters":[],"src":"1025:0:11"},"scope":3260,"src":"798:669:11","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":3459,"src":"407:1062:11"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":3261,"name":"StandardMarket","nodeType":"UserDefinedTypeName","referencedDeclaration":3112,"src":"1513:14:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarket_$3112","typeString":"contract StandardMarket"}},"id":3262,"nodeType":"InheritanceSpecifier","src":"1513:14:11"},{"arguments":null,"baseName":{"contractScope":null,"id":3263,"name":"StandardMarketWithPriceLoggerData","nodeType":"UserDefinedTypeName","referencedDeclaration":3195,"src":"1529:33:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLoggerData_$3195","typeString":"contract StandardMarketWithPriceLoggerData"}},"id":3264,"nodeType":"InheritanceSpecifier","src":"1529:33:11"}],"contractDependencies":[2172,2238,2248,3112,3195,6673],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3458,"linearizedBaseContracts":[3458,3195,3112,2248,2238,2172,6673],"name":"StandardMarketWithPriceLogger","nodeType":"ContractDefinition","nodes":[{"body":{"id":3290,"nodeType":"Block","src":"2053:131:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3275,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2063:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3276,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2063:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3277,"nodeType":"ExpressionStatement","src":"2063:16:11"},{"expression":{"argumentTypes":null,"id":3285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3278,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3273,"src":"2089:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3281,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3266,"src":"2106:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3282,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3268,"src":"2125:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3283,"name":"maxCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3270,"src":"2144:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3279,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2096:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"buy","nodeType":"MemberAccess","referencedDeclaration":2596,"src":"2096:9:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3284,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2096:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2089:63:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3286,"nodeType":"ExpressionStatement","src":"2089:63:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3287,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2162:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3288,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2162:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3289,"nodeType":"ExpressionStatement","src":"2162:15:11"}]},"documentation":"@dev Allows to buy outcome tokens from market maker\n @param outcomeTokenIndex Index of the outcome token to buy\n @param outcomeTokenCount Amount of outcome tokens to buy\n @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n @return Cost in collateral tokens","id":3291,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"buy","nodeType":"FunctionDefinition","parameters":{"id":3271,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3266,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3291,"src":"1943:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3265,"name":"uint8","nodeType":"ElementaryTypeName","src":"1943:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3268,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3291,"src":"1968:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3267,"name":"uint","nodeType":"ElementaryTypeName","src":"1968:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3270,"name":"maxCost","nodeType":"VariableDeclaration","scope":3291,"src":"1992:12:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3269,"name":"uint","nodeType":"ElementaryTypeName","src":"1992:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1942:63:11"},"payable":false,"returnParameters":{"id":3274,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3273,"name":"cost","nodeType":"VariableDeclaration","scope":3291,"src":"2038:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3272,"name":"uint","nodeType":"ElementaryTypeName","src":"2038:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2037:11:11"},"scope":3458,"src":"1930:254:11","stateMutability":"nonpayable","superFunction":2596,"visibility":"public"},{"body":{"id":3317,"nodeType":"Block","src":"2647:136:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3302,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"2657:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3303,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2657:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3304,"nodeType":"ExpressionStatement","src":"2657:16:11"},{"expression":{"argumentTypes":null,"id":3312,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3305,"name":"profit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3300,"src":"2683:6:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3308,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3293,"src":"2703:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3309,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3295,"src":"2722:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3310,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3297,"src":"2741:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3306,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"2692:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3307,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sell","nodeType":"MemberAccess","referencedDeclaration":2707,"src":"2692:10:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3311,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2692:59:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2683:68:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3313,"nodeType":"ExpressionStatement","src":"2683:68:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3314,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"2761:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2761:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3316,"nodeType":"ExpressionStatement","src":"2761:15:11"}]},"documentation":"@dev Allows to sell outcome tokens to market maker\n @param outcomeTokenIndex Index of the outcome token to sell\n @param outcomeTokenCount Amount of outcome tokens to sell\n @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n @return Profit in collateral tokens","id":3318,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"sell","nodeType":"FunctionDefinition","parameters":{"id":3298,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3293,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3318,"src":"2533:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3292,"name":"uint8","nodeType":"ElementaryTypeName","src":"2533:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3295,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3318,"src":"2558:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3294,"name":"uint","nodeType":"ElementaryTypeName","src":"2558:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3297,"name":"minProfit","nodeType":"VariableDeclaration","scope":3318,"src":"2582:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3296,"name":"uint","nodeType":"ElementaryTypeName","src":"2582:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2532:65:11"},"payable":false,"returnParameters":{"id":3301,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3300,"name":"profit","nodeType":"VariableDeclaration","scope":3318,"src":"2630:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3299,"name":"uint","nodeType":"ElementaryTypeName","src":"2630:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2629:13:11"},"scope":3458,"src":"2519:264:11","stateMutability":"nonpayable","superFunction":2707,"visibility":"public"},{"body":{"id":3344,"nodeType":"Block","src":"3383:139:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3329,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3393:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3330,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3393:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3331,"nodeType":"ExpressionStatement","src":"3393:16:11"},{"expression":{"argumentTypes":null,"id":3339,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3332,"name":"cost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3327,"src":"3419:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3335,"name":"outcomeTokenIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3320,"src":"3442:17:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":3336,"name":"outcomeTokenCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3322,"src":"3461:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":3337,"name":"minProfit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3324,"src":"3480:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":3333,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3426:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"shortSell","nodeType":"MemberAccess","referencedDeclaration":2822,"src":"3426:15:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint8,uint256,uint256) returns (uint256)"}},"id":3338,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3426:64:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3419:71:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3340,"nodeType":"ExpressionStatement","src":"3419:71:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3341,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"3500:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3342,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3500:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3343,"nodeType":"ExpressionStatement","src":"3500:15:11"}]},"documentation":"@dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n shares of all other outcome tokens.\n @param outcomeTokenIndex Index of the outcome token to short sell\n @param outcomeTokenCount Amount of outcome tokens to short sell\n @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n @return Cost to short sell outcome in collateral tokens","id":3345,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"shortSell","nodeType":"FunctionDefinition","parameters":{"id":3325,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3320,"name":"outcomeTokenIndex","nodeType":"VariableDeclaration","scope":3345,"src":"3271:23:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3319,"name":"uint8","nodeType":"ElementaryTypeName","src":"3271:5:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":3322,"name":"outcomeTokenCount","nodeType":"VariableDeclaration","scope":3345,"src":"3296:22:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3321,"name":"uint","nodeType":"ElementaryTypeName","src":"3296:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":3324,"name":"minProfit","nodeType":"VariableDeclaration","scope":3345,"src":"3320:14:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3323,"name":"uint","nodeType":"ElementaryTypeName","src":"3320:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3270:65:11"},"payable":false,"returnParameters":{"id":3328,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3327,"name":"cost","nodeType":"VariableDeclaration","scope":3345,"src":"3368:9:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3326,"name":"uint","nodeType":"ElementaryTypeName","src":"3368:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3367:11:11"},"scope":3458,"src":"3252:270:11","stateMutability":"nonpayable","superFunction":2822,"visibility":"public"},{"body":{"id":3369,"nodeType":"Block","src":"3908:127:11","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3355,"name":"logPriceBefore","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3441,"src":"3918:14:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3918:16:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3357,"nodeType":"ExpressionStatement","src":"3918:16:11"},{"expression":{"argumentTypes":null,"id":3364,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3358,"name":"netCost","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3353,"src":"3944:7:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3361,"name":"outcomeTokenAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3348,"src":"3966:19:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"}},{"argumentTypes":null,"id":3362,"name":"collateralLimit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3350,"src":"3987:15:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[] memory"},{"typeIdentifier":"t_int256","typeString":"int256"}],"expression":{"argumentTypes":null,"id":3359,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"3954:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"trade","nodeType":"MemberAccess","referencedDeclaration":2875,"src":"3954:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$","typeString":"function (int256[] memory,int256) returns (int256)"}},"id":3363,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3954:49:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3944:59:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3365,"nodeType":"ExpressionStatement","src":"3944:59:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":3366,"name":"logPriceAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3457,"src":"4013:13:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3367,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4013:15:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3368,"nodeType":"ExpressionStatement","src":"4013:15:11"}]},"documentation":"@dev Allows to trade outcome tokens with market maker\n @param outcomeTokenAmounts Amounts of outcome tokens to trade\n @param collateralLimit The maximum cost or minimum profit in collateral tokens\n @return Cost/profit in collateral tokens","id":3370,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"trade","nodeType":"FunctionDefinition","parameters":{"id":3351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3348,"name":"outcomeTokenAmounts","nodeType":"VariableDeclaration","scope":3370,"src":"3811:25:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_memory_ptr","typeString":"int256[]"},"typeName":{"baseType":{"id":3346,"name":"int","nodeType":"ElementaryTypeName","src":"3811:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":3347,"length":null,"nodeType":"ArrayTypeName","src":"3811:5:11","typeDescriptions":{"typeIdentifier":"t_array$_t_int256_$dyn_storage_ptr","typeString":"int256[]"}},"value":null,"visibility":"internal"},{"constant":false,"id":3350,"name":"collateralLimit","nodeType":"VariableDeclaration","scope":3370,"src":"3838:19:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3349,"name":"int","nodeType":"ElementaryTypeName","src":"3838:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3810:48:11"},"payable":false,"returnParameters":{"id":3354,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3353,"name":"netCost","nodeType":"VariableDeclaration","scope":3370,"src":"3891:11:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":3352,"name":"int","nodeType":"ElementaryTypeName","src":"3891:3:11","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3890:13:11"},"scope":3458,"src":"3796:239:11","stateMutability":"nonpayable","superFunction":2875,"visibility":"public"},{"body":{"id":3382,"nodeType":"Block","src":"4194:53:11","statements":[{"expression":{"argumentTypes":null,"id":3375,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3373,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4204:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3374,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4214:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4204:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3376,"nodeType":"ExpressionStatement","src":"4204:13:11"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":3377,"name":"super","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7702,"src":"4227:5:11","typeDescriptions":{"typeIdentifier":"t_super$_StandardMarketWithPriceLogger_$3458","typeString":"contract super StandardMarketWithPriceLogger"}},"id":3379,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"close","nodeType":"MemberAccess","referencedDeclaration":2460,"src":"4227:11:11","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":3380,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4227:13:11","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":3381,"nodeType":"ExpressionStatement","src":"4227:13:11"}]},"documentation":"@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator","id":3383,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"close","nodeType":"FunctionDefinition","parameters":{"id":3371,"nodeType":"ParameterList","parameters":[],"src":"4172:2:11"},"payable":false,"returnParameters":{"id":3372,"nodeType":"ParameterList","parameters":[],"src":"4194:0:11"},"scope":3458,"src":"4158:89:11","stateMutability":"nonpayable","superFunction":2460,"visibility":"public"},{"body":{"id":3422,"nodeType":"Block","src":"4465:229:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3388,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4478:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":3389,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4488:1:11","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4478:11:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3406,"nodeType":"IfStatement","src":"4475:119:11","trueBody":{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3404,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3398,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3391,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4511:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3392,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4527:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3393,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4545:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3394,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4555:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4545:23:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3396,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4544:25:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4527:42:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4511:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3399,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4510:60:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3400,"name":"endDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3188,"src":"4574:7:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3401,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4584:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4574:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3403,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4573:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4510:84:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3405,"nodeType":"Return","src":"4503:91:11"}},{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3420,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3407,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4612:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3413,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3408,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4628:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3411,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3409,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4646:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3410,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"4652:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4646:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3412,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4645:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4628:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4612:54:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3415,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4611:56:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3416,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4671:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3417,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4677:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4671:15:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3419,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4670:17:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4611:76:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":3387,"id":3421,"nodeType":"Return","src":"4604:83:11"}]},"documentation":"@dev Calculates average price for long tokens based on price integral\n @return Average price for long tokens over time","id":3423,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getAvgPrice","nodeType":"FunctionDefinition","parameters":{"id":3384,"nodeType":"ParameterList","parameters":[],"src":"4407:2:11"},"payable":false,"returnParameters":{"id":3387,"nodeType":"ParameterList","parameters":[{"constant":false,"id":3386,"name":"","nodeType":"VariableDeclaration","scope":3423,"src":"4455:4:11","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3385,"name":"uint","nodeType":"ElementaryTypeName","src":"4455:4:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4454:6:11"},"scope":3458,"src":"4387:307:11","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":3440,"nodeType":"Block","src":"4869:185:11","statements":[{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3426,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"4883:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":3427,"name":"startDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3186,"src":"4890:9:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4883:16:11","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":3439,"nodeType":"IfStatement","src":"4879:169:11","trueBody":{"id":3438,"nodeType":"Block","src":"4901:147:11","statements":[{"expression":{"argumentTypes":null,"id":3436,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3429,"name":"priceIntegral","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3194,"src":"4982:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3435,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3430,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"4999:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":3433,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":3431,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5017:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":3432,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5023:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5017:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":3434,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5016:21:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:38:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4982:55:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3437,"nodeType":"ExpressionStatement","src":"4982:55:11"}]}}]},"documentation":"@dev Adds price integral since the last trade to the total price integral","id":3441,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceBefore","nodeType":"FunctionDefinition","parameters":{"id":3424,"nodeType":"ParameterList","parameters":[],"src":"4846:2:11"},"payable":false,"returnParameters":{"id":3425,"nodeType":"ParameterList","parameters":[],"src":"4869:0:11"},"scope":3458,"src":"4823:231:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"},{"body":{"id":3456,"nodeType":"Block","src":"5157:257:11","statements":[{"expression":{"argumentTypes":null,"id":3450,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3444,"name":"lastTradePrice","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3192,"src":"5320:14:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":3447,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7701,"src":"5367:4:11","typeDescriptions":{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"}},{"argumentTypes":null,"id":3448,"name":"LONG","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3184,"src":"5373:4:11","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_StandardMarketWithPriceLogger_$3458","typeString":"contract StandardMarketWithPriceLogger"},{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"id":3445,"name":"marketMaker","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2158,"src":"5337:11:11","typeDescriptions":{"typeIdentifier":"t_contract$_MarketMaker_$1571","typeString":"contract MarketMaker"}},"id":3446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"calcMarginalPrice","nodeType":"MemberAccess","referencedDeclaration":1570,"src":"5337:29:11","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_contract$_Market_$2238_$_t_uint8_$returns$_t_uint256_$","typeString":"function (contract Market,uint8) view external returns (uint256)"}},"id":3449,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5337:41:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5320:58:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3451,"nodeType":"ExpressionStatement","src":"5320:58:11"},{"expression":{"argumentTypes":null,"id":3454,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":3452,"name":"lastTradeDate","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3190,"src":"5388:13:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":3453,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5404:3:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5388:19:11","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":3455,"nodeType":"ExpressionStatement","src":"5388:19:11"}]},"documentation":"@dev Updates last trade timestamp and price","id":3457,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"logPriceAfter","nodeType":"FunctionDefinition","parameters":{"id":3442,"nodeType":"ParameterList","parameters":[],"src":"5134:2:11"},"payable":false,"returnParameters":{"id":3443,"nodeType":"ParameterList","parameters":[],"src":"5157:0:11"},"scope":3458,"src":"5112:302:11","stateMutability":"nonpayable","superFunction":null,"visibility":"private"}],"scope":3459,"src":"1471:3945:11"}],"src":"0:5417:11"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.016Z"}; /***/ }), @@ -462,10 +813,10 @@ module.exports = {"contract_name":"StandardMarketWithPriceLoggerFactory","abi":[ /*!*********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/StandardToken.json ***! \*********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"StandardToken","abi":[{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"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,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"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"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263311}; +module.exports = {"contractName":"StandardToken","abi":[{"constant":true,"inputs":[],"name":"totalSupply","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":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"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"},{"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"},{"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":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50611037806100206000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461009357806318160ddd146100f857806323b872dd1461012357806366188463146101a857806370a082311461020d578063a9059cbb14610264578063d73dd623146102c9578063dd62ed3e1461032e575b600080fd5b34801561009f57600080fd5b506100de600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506103a5565b604051808215151515815260200191505060405180910390f35b34801561010457600080fd5b5061010d610497565b6040518082815260200191505060405180910390f35b34801561012f57600080fd5b5061018e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104a1565b604051808215151515815260200191505060405180910390f35b3480156101b457600080fd5b506101f3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061085b565b604051808215151515815260200191505060405180910390f35b34801561021957600080fd5b5061024e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aec565b6040518082815260200191505060405180910390f35b34801561027057600080fd5b506102af600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b34565b604051808215151515815260200191505060405180910390f35b3480156102d557600080fd5b50610314600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d53565b604051808215151515815260200191505060405180910390f35b34801561033a57600080fd5b5061038f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f4f565b6040518082815260200191505060405180910390f35b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156104de57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561052b57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156105b657600080fd5b610607826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fd690919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061069a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fef90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061076b82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fd690919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561096c576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a00565b61097f8382610fd690919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610b7157600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610bbe57600080fd5b610c0f826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fd690919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ca2826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fef90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000610de482600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fef90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000828211151515610fe457fe5b818303905092915050565b6000818301905082811015151561100257fe5b809050929150505600a165627a7a72305820939b56dae841ae2cdfabc69422fbb903de08e61a45b5c584b763facd4a3deed00029","deployedBytecode":"0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461009357806318160ddd146100f857806323b872dd1461012357806366188463146101a857806370a082311461020d578063a9059cbb14610264578063d73dd623146102c9578063dd62ed3e1461032e575b600080fd5b34801561009f57600080fd5b506100de600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506103a5565b604051808215151515815260200191505060405180910390f35b34801561010457600080fd5b5061010d610497565b6040518082815260200191505060405180910390f35b34801561012f57600080fd5b5061018e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104a1565b604051808215151515815260200191505060405180910390f35b3480156101b457600080fd5b506101f3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061085b565b604051808215151515815260200191505060405180910390f35b34801561021957600080fd5b5061024e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aec565b6040518082815260200191505060405180910390f35b34801561027057600080fd5b506102af600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b34565b604051808215151515815260200191505060405180910390f35b3480156102d557600080fd5b50610314600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d53565b604051808215151515815260200191505060405180910390f35b34801561033a57600080fd5b5061038f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f4f565b6040518082815260200191505060405180910390f35b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156104de57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561052b57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156105b657600080fd5b610607826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fd690919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061069a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fef90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061076b82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fd690919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561096c576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a00565b61097f8382610fd690919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610b7157600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610bbe57600080fd5b610c0f826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fd690919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ca2826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fef90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000610de482600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fef90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000828211151515610fe457fe5b818303905092915050565b6000818301905082811015151561100257fe5b809050929150505600a165627a7a72305820939b56dae841ae2cdfabc69422fbb903de08e61a45b5c584b763facd4a3deed00029","sourceMap":"334:3779:35:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;334:3779:35;;;;;;;","deployedSourceMap":"334:3779:35:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1814:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1814:188:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:83:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;371:83:32;;;;;;;;;;;;;;;;;;;;;;;726:470:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;726:470:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3679:431;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3679:431:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1131:99:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1131:99:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;608:321;;8:9:-1;5:2;;;30:1;27;20:12;5:2;608:321:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2926:296:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2926:296:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2321:153;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2321:153:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1814:188;1881:4;1925:6;1893:7;:19;1901:10;1893:19;;;;;;;;;;;;;;;:29;1913:8;1893:29;;;;;;;;;;;;;;;:38;;;;1963:8;1942:38;;1951:10;1942:38;;;1973:6;1942:38;;;;;;;;;;;;;;;;;;1993:4;1986:11;;1814:188;;;;:::o;371:83:32:-;415:7;437:12;;430:19;;371:83;:::o;726:470:35:-;832:4;869:1;854:17;;:3;:17;;;;846:26;;;;;;;;896:8;:15;905:5;896:15;;;;;;;;;;;;;;;;886:6;:25;;878:34;;;;;;;;936:7;:14;944:5;936:14;;;;;;;;;;;;;;;:26;951:10;936:26;;;;;;;;;;;;;;;;926:6;:36;;918:45;;;;;;;;988:27;1008:6;988:8;:15;997:5;988:15;;;;;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;970:8;:15;979:5;970:15;;;;;;;;;;;;;;;:45;;;;1037:25;1055:6;1037:8;:13;1046:3;1037:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;1021:8;:13;1030:3;1021:13;;;;;;;;;;;;;;;:41;;;;1097:38;1128:6;1097:7;:14;1105:5;1097:14;;;;;;;;;;;;;;;:26;1112:10;1097:26;;;;;;;;;;;;;;;;:30;;:38;;;;:::i;:::-;1068:7;:14;1076:5;1068:14;;;;;;;;;;;;;;;:26;1083:10;1068:26;;;;;;;;;;;;;;;:67;;;;1162:3;1146:28;;1155:5;1146:28;;;1167:6;1146:28;;;;;;;;;;;;;;;;;;1187:4;1180:11;;726:470;;;;;:::o;3679:431::-;3785:4;3799:16;3818:7;:19;3826:10;3818:19;;;;;;;;;;;;;;;:29;3838:8;3818:29;;;;;;;;;;;;;;;;3799:48;;3876:8;3857:16;:27;3853:164;;;3926:1;3894:7;:19;3902:10;3894:19;;;;;;;;;;;;;;;:29;3914:8;3894:29;;;;;;;;;;;;;;;:33;;;;3853:164;;;3980:30;3993:16;3980:8;:12;;:30;;;;:::i;:::-;3948:7;:19;3956:10;3948:19;;;;;;;;;;;;;;;:29;3968:8;3948:29;;;;;;;;;;;;;;;:62;;;;3853:164;4048:8;4027:61;;4036:10;4027:61;;;4058:7;:19;4066:10;4058:19;;;;;;;;;;;;;;;:29;4078:8;4058:29;;;;;;;;;;;;;;;;4027:61;;;;;;;;;;;;;;;;;;4101:4;4094:11;;3679:431;;;;;:::o;1131:99:32:-;1187:7;1209:8;:16;1218:6;1209:16;;;;;;;;;;;;;;;;1202:23;;1131:99;;;:::o;608:321::-;671:4;706:1;691:17;;:3;:17;;;;683:26;;;;;;;;733:8;:20;742:10;733:20;;;;;;;;;;;;;;;;723:6;:30;;715:39;;;;;;;;784:32;809:6;784:8;:20;793:10;784:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;761:8;:20;770:10;761:20;;;;;;;;;;;;;;;:55;;;;838:25;856:6;838:8;:13;847:3;838:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;822:8;:13;831:3;822:13;;;;;;;;;;;;;;;:41;;;;895:3;874:33;;883:10;874:33;;;900:6;874:33;;;;;;;;;;;;;;;;;;920:4;913:11;;608:321;;;;:::o;2926:296:35:-;3027:4;3081:46;3115:11;3081:7;:19;3089:10;3081:19;;;;;;;;;;;;;;;:29;3101:8;3081:29;;;;;;;;;;;;;;;;:33;;:46;;;;:::i;:::-;3041:7;:19;3049:10;3041:19;;;;;;;;;;;;;;;:29;3061:8;3041:29;;;;;;;;;;;;;;;:87;;;;3160:8;3139:61;;3148:10;3139:61;;;3170:7;:19;3178:10;3170:19;;;;;;;;;;;;;;;:29;3190:8;3170:29;;;;;;;;;;;;;;;;3139:61;;;;;;;;;;;;;;;;;;3213:4;3206:11;;2926:296;;;;:::o;2321:153::-;2420:7;2444;:15;2452:6;2444:15;;;;;;;;;;;;;;;:25;2460:8;2444:25;;;;;;;;;;;;;;;;2437:32;;2321:153;;;;:::o;1968:110:31:-;2026:7;2053:1;2048;:6;;2041:14;;;;;;2072:1;2068;:5;2061:12;;1968:110;;;;:::o;2363:123::-;2421:9;2446:1;2442;:5;2438:9;;2465:1;2460;:6;;2453:14;;;;;;2480:1;2473:8;;2363:123;;;;:::o","source":"pragma solidity ^0.4.24;\n\nimport \"./BasicToken.sol\";\nimport \"./ERC20.sol\";\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * https://github.com/ethereum/EIPs/issues/20\n * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(\n address _from,\n address _to,\n uint256 _value\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n emit Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(\n address _owner,\n address _spender\n )\n public\n view\n returns (uint256)\n {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(\n address _spender,\n uint256 _addedValue\n )\n public\n returns (bool)\n {\n allowed[msg.sender][_spender] = (\n allowed[msg.sender][_spender].add(_addedValue));\n emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(\n address _spender,\n uint256 _subtractedValue\n )\n public\n returns (bool)\n {\n uint256 oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n","sourcePath":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","ast":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","exportedSymbols":{"StandardToken":[7607]},"id":7608,"nodeType":"SourceUnit","nodes":[{"id":7362,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:35"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol","file":"./BasicToken.sol","id":7363,"nodeType":"ImportDirective","scope":7608,"sourceUnit":7286,"src":"26:26:35","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"./ERC20.sol","id":7364,"nodeType":"ImportDirective","scope":7608,"sourceUnit":7329,"src":"53:21:35","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":7365,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"360:5:35","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":7366,"nodeType":"InheritanceSpecifier","src":"360:5:35"},{"arguments":null,"baseName":{"contractScope":null,"id":7367,"name":"BasicToken","nodeType":"UserDefinedTypeName","referencedDeclaration":7285,"src":"367:10:35","typeDescriptions":{"typeIdentifier":"t_contract$_BasicToken_$7285","typeString":"contract BasicToken"}},"id":7368,"nodeType":"InheritanceSpecifier","src":"367:10:35"}],"contractDependencies":[7285,7328,7360],"contractKind":"contract","documentation":"@title Standard ERC20 token\n * @dev Implementation of the basic standard token.\nhttps://github.com/ethereum/EIPs/issues/20\nBased on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol","fullyImplemented":true,"id":7607,"linearizedBaseContracts":[7607,7285,7328,7360],"name":"StandardToken","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":7374,"name":"allowed","nodeType":"VariableDeclaration","scope":7607,"src":"383:66:35","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":7373,"keyType":{"id":7369,"name":"address","nodeType":"ElementaryTypeName","src":"392:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"383:49:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":7372,"keyType":{"id":7370,"name":"address","nodeType":"ElementaryTypeName","src":"412:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"403:28:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":7371,"name":"uint256","nodeType":"ElementaryTypeName","src":"423:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"internal"},{"body":{"id":7459,"nodeType":"Block","src":"840:356:35","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":7390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7386,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7378,"src":"854:3:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"hexValue":"30","id":7388,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"869:1:35","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":7387,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"861:7:35","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":7389,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"861:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"854:17:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7385,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"846:7:35","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7391,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"846:26:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7392,"nodeType":"ExpressionStatement","src":"846:26:35"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7398,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7394,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"886:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7395,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"896:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7397,"indexExpression":{"argumentTypes":null,"id":7396,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"905:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"896:15:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"886:25:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7393,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"878:7:35","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"878:34:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7400,"nodeType":"ExpressionStatement","src":"878:34:35"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7409,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7402,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"926:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7403,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"936:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7405,"indexExpression":{"argumentTypes":null,"id":7404,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"944:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"936:14:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7408,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7406,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"951:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7407,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"951:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"936:26:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"926:36:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7401,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"918:7:35","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7410,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"918:45:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7411,"nodeType":"ExpressionStatement","src":"918:45:35"},{"expression":{"argumentTypes":null,"id":7421,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7412,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"970:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7414,"indexExpression":{"argumentTypes":null,"id":7413,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"979:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"970:15:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7419,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"1008:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7415,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"988:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7417,"indexExpression":{"argumentTypes":null,"id":7416,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"997:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"988:15:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"988:19:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7420,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"988:27:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"970:45:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7422,"nodeType":"ExpressionStatement","src":"970:45:35"},{"expression":{"argumentTypes":null,"id":7432,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7423,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1021:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7425,"indexExpression":{"argumentTypes":null,"id":7424,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7378,"src":"1030:3:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1021:13:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7430,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"1055:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7426,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1037:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7428,"indexExpression":{"argumentTypes":null,"id":7427,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7378,"src":"1046:3:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1037:13:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1037:17:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7431,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1037:25:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1021:41:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7433,"nodeType":"ExpressionStatement","src":"1021:41:35"},{"expression":{"argumentTypes":null,"id":7449,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7434,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"1068:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7438,"indexExpression":{"argumentTypes":null,"id":7435,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"1076:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1068:14:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7439,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7436,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1083:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1083:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1068:26:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7447,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"1128:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7440,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"1097:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7442,"indexExpression":{"argumentTypes":null,"id":7441,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"1105:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1097:14:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7445,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7443,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1112:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7444,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1112:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1097:26:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"1097:30:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7448,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1097:38:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1068:67:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7450,"nodeType":"ExpressionStatement","src":"1068:67:35"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7452,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"1155:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7453,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7378,"src":"1162:3:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7454,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"1167:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7451,"name":"Transfer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7359,"src":"1146:8:35","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7455,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1146:28:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7456,"nodeType":"EmitStatement","src":"1141:33:35"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7457,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1187:4:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7384,"id":7458,"nodeType":"Return","src":"1180:11:35"}]},"documentation":"@dev Transfer tokens from one address to another\n@param _from address The address which you want to send tokens from\n@param _to address The address which you want to transfer to\n@param _value uint256 the amount of tokens to be transferred","id":7460,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":7381,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7376,"name":"_from","nodeType":"VariableDeclaration","scope":7460,"src":"753:13:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7375,"name":"address","nodeType":"ElementaryTypeName","src":"753:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7378,"name":"_to","nodeType":"VariableDeclaration","scope":7460,"src":"772:11:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7377,"name":"address","nodeType":"ElementaryTypeName","src":"772:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7380,"name":"_value","nodeType":"VariableDeclaration","scope":7460,"src":"789:14:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7379,"name":"uint256","nodeType":"ElementaryTypeName","src":"789:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"747:60:35"},"payable":false,"returnParameters":{"id":7384,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7383,"name":"","nodeType":"VariableDeclaration","scope":7460,"src":"832:4:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7382,"name":"bool","nodeType":"ElementaryTypeName","src":"832:4:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"831:6:35"},"scope":7607,"src":"726:470:35","stateMutability":"nonpayable","superFunction":7310,"visibility":"public"},{"body":{"id":7487,"nodeType":"Block","src":"1887:115:35","statements":[{"expression":{"argumentTypes":null,"id":7476,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7469,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"1893:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7473,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7470,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1901:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7471,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1901:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1893:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7474,"indexExpression":{"argumentTypes":null,"id":7472,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7462,"src":"1913:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1893:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":7475,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7464,"src":"1925:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1893:38:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7477,"nodeType":"ExpressionStatement","src":"1893:38:35"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7479,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1951:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7480,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1951:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7481,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7462,"src":"1963:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7482,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7464,"src":"1973:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7478,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7327,"src":"1942:8:35","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1942:38:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7484,"nodeType":"EmitStatement","src":"1937:43:35"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7485,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1993:4:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7468,"id":7486,"nodeType":"Return","src":"1986:11:35"}]},"documentation":"@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\nBeware that changing an allowance with this method brings the risk that someone may use both the old\nand the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\nrace condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n@param _spender The address which will spend the funds.\n@param _value The amount of tokens to be spent.","id":7488,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":7465,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7462,"name":"_spender","nodeType":"VariableDeclaration","scope":7488,"src":"1831:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7461,"name":"address","nodeType":"ElementaryTypeName","src":"1831:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7464,"name":"_value","nodeType":"VariableDeclaration","scope":7488,"src":"1849:14:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7463,"name":"uint256","nodeType":"ElementaryTypeName","src":"1849:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1830:34:35"},"payable":false,"returnParameters":{"id":7468,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7467,"name":"","nodeType":"VariableDeclaration","scope":7488,"src":"1881:4:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7466,"name":"bool","nodeType":"ElementaryTypeName","src":"1881:4:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1880:6:35"},"scope":7607,"src":"1814:188:35","stateMutability":"nonpayable","superFunction":7319,"visibility":"public"},{"body":{"id":7503,"nodeType":"Block","src":"2431:43:35","statements":[{"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7497,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"2444:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7499,"indexExpression":{"argumentTypes":null,"id":7498,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7490,"src":"2452:6:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2444:15:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7501,"indexExpression":{"argumentTypes":null,"id":7500,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7492,"src":"2460:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2444:25:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7496,"id":7502,"nodeType":"Return","src":"2437:32:35"}]},"documentation":"@dev Function to check the amount of tokens that an owner allowed to a spender.\n@param _owner address The address which owns the funds.\n@param _spender address The address which will spend the funds.\n@return A uint256 specifying the amount of tokens still available for the spender.","id":7504,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"allowance","nodeType":"FunctionDefinition","parameters":{"id":7493,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7490,"name":"_owner","nodeType":"VariableDeclaration","scope":7504,"src":"2345:14:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7489,"name":"address","nodeType":"ElementaryTypeName","src":"2345:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7492,"name":"_spender","nodeType":"VariableDeclaration","scope":7504,"src":"2365:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7491,"name":"address","nodeType":"ElementaryTypeName","src":"2365:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"2339:47:35"},"payable":false,"returnParameters":{"id":7496,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7495,"name":"","nodeType":"VariableDeclaration","scope":7504,"src":"2420:7:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7494,"name":"uint256","nodeType":"ElementaryTypeName","src":"2420:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2419:9:35"},"scope":7607,"src":"2321:153:35","stateMutability":"view","superFunction":7299,"visibility":"public"},{"body":{"id":7545,"nodeType":"Block","src":"3035:187:35","statements":[{"expression":{"argumentTypes":null,"id":7529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7513,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3041:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7517,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7514,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3049:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7515,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3049:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3041:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7518,"indexExpression":{"argumentTypes":null,"id":7516,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7506,"src":"3061:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3041:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"components":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7526,"name":"_addedValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7508,"src":"3115:11:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7519,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3081:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7522,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7520,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3089:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7521,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3089:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3081:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7524,"indexExpression":{"argumentTypes":null,"id":7523,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7506,"src":"3101:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3081:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7525,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"3081:33:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7527,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3081:46:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":7528,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3073:55:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3041:87:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7530,"nodeType":"ExpressionStatement","src":"3041:87:35"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7532,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3148:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7533,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3148:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7534,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7506,"src":"3160:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7535,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3170:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7538,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7536,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3178:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7537,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3178:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3170:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7540,"indexExpression":{"argumentTypes":null,"id":7539,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7506,"src":"3190:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3170:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7531,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7327,"src":"3139:8:35","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7541,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3139:61:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7542,"nodeType":"EmitStatement","src":"3134:66:35"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7543,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"3213:4:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7512,"id":7544,"nodeType":"Return","src":"3206:11:35"}]},"documentation":"@dev Increase the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed[_spender] == 0. To increment\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\n@param _spender The address which will spend the funds.\n@param _addedValue The amount of tokens to increase the allowance by.","id":7546,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"increaseApproval","nodeType":"FunctionDefinition","parameters":{"id":7509,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7506,"name":"_spender","nodeType":"VariableDeclaration","scope":7546,"src":"2957:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7505,"name":"address","nodeType":"ElementaryTypeName","src":"2957:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7508,"name":"_addedValue","nodeType":"VariableDeclaration","scope":7546,"src":"2979:19:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7507,"name":"uint256","nodeType":"ElementaryTypeName","src":"2979:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2951:51:35"},"payable":false,"returnParameters":{"id":7512,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7511,"name":"","nodeType":"VariableDeclaration","scope":7546,"src":"3027:4:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7510,"name":"bool","nodeType":"ElementaryTypeName","src":"3027:4:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"3026:6:35"},"scope":7607,"src":"2926:296:35","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":7605,"nodeType":"Block","src":"3793:317:35","statements":[{"assignments":[7556],"declarations":[{"constant":false,"id":7556,"name":"oldValue","nodeType":"VariableDeclaration","scope":7606,"src":"3799:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7555,"name":"uint256","nodeType":"ElementaryTypeName","src":"3799:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":7563,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7557,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3818:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7560,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7558,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3826:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7559,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3826:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3818:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7562,"indexExpression":{"argumentTypes":null,"id":7561,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"3838:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3818:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3799:48:35"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7566,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7564,"name":"_subtractedValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7550,"src":"3857:16:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":7565,"name":"oldValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7556,"src":"3876:8:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3857:27:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":7589,"nodeType":"Block","src":"3940:77:35","statements":[{"expression":{"argumentTypes":null,"id":7587,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7577,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3948:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7581,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7578,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3956:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3956:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3948:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7582,"indexExpression":{"argumentTypes":null,"id":7580,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"3968:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3948:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7585,"name":"_subtractedValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7550,"src":"3993:16:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":7583,"name":"oldValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7556,"src":"3980:8:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"3980:12:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7586,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3980:30:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3948:62:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7588,"nodeType":"ExpressionStatement","src":"3948:62:35"}]},"id":7590,"nodeType":"IfStatement","src":"3853:164:35","trueBody":{"id":7576,"nodeType":"Block","src":"3886:48:35","statements":[{"expression":{"argumentTypes":null,"id":7574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7567,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3894:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7571,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7568,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3902:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7569,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3902:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3894:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7572,"indexExpression":{"argumentTypes":null,"id":7570,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"3914:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3894:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":7573,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3926:1:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3894:33:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7575,"nodeType":"ExpressionStatement","src":"3894:33:35"}]}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7592,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4036:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7593,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4036:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7594,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"4048:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7595,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"4058:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7598,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7596,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4066:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4066:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4058:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7600,"indexExpression":{"argumentTypes":null,"id":7599,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"4078:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4058:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7591,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7327,"src":"4027:8:35","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7601,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4027:61:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7602,"nodeType":"EmitStatement","src":"4022:66:35"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7603,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"4101:4:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7554,"id":7604,"nodeType":"Return","src":"4094:11:35"}]},"documentation":"@dev Decrease the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed[_spender] == 0. To decrement\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\n@param _spender The address which will spend the funds.\n@param _subtractedValue The amount of tokens to decrease the allowance by.","id":7606,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"decreaseApproval","nodeType":"FunctionDefinition","parameters":{"id":7551,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7548,"name":"_spender","nodeType":"VariableDeclaration","scope":7606,"src":"3710:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7547,"name":"address","nodeType":"ElementaryTypeName","src":"3710:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7550,"name":"_subtractedValue","nodeType":"VariableDeclaration","scope":7606,"src":"3732:24:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7549,"name":"uint256","nodeType":"ElementaryTypeName","src":"3732:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3704:56:35"},"payable":false,"returnParameters":{"id":7554,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7553,"name":"","nodeType":"VariableDeclaration","scope":7606,"src":"3785:4:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7552,"name":"bool","nodeType":"ElementaryTypeName","src":"3785:4:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"3784:6:35"},"scope":7607,"src":"3679:431:35","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":7608,"src":"334:3779:35"}],"src":"0:4114:35"},"legacyAST":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol","exportedSymbols":{"StandardToken":[7607]},"id":7608,"nodeType":"SourceUnit","nodes":[{"id":7362,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:35"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol","file":"./BasicToken.sol","id":7363,"nodeType":"ImportDirective","scope":7608,"sourceUnit":7286,"src":"26:26:35","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"./ERC20.sol","id":7364,"nodeType":"ImportDirective","scope":7608,"sourceUnit":7329,"src":"53:21:35","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":7365,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"360:5:35","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":7366,"nodeType":"InheritanceSpecifier","src":"360:5:35"},{"arguments":null,"baseName":{"contractScope":null,"id":7367,"name":"BasicToken","nodeType":"UserDefinedTypeName","referencedDeclaration":7285,"src":"367:10:35","typeDescriptions":{"typeIdentifier":"t_contract$_BasicToken_$7285","typeString":"contract BasicToken"}},"id":7368,"nodeType":"InheritanceSpecifier","src":"367:10:35"}],"contractDependencies":[7285,7328,7360],"contractKind":"contract","documentation":"@title Standard ERC20 token\n * @dev Implementation of the basic standard token.\nhttps://github.com/ethereum/EIPs/issues/20\nBased on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol","fullyImplemented":true,"id":7607,"linearizedBaseContracts":[7607,7285,7328,7360],"name":"StandardToken","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":7374,"name":"allowed","nodeType":"VariableDeclaration","scope":7607,"src":"383:66:35","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":7373,"keyType":{"id":7369,"name":"address","nodeType":"ElementaryTypeName","src":"392:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"383:49:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":7372,"keyType":{"id":7370,"name":"address","nodeType":"ElementaryTypeName","src":"412:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"403:28:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":7371,"name":"uint256","nodeType":"ElementaryTypeName","src":"423:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"internal"},{"body":{"id":7459,"nodeType":"Block","src":"840:356:35","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":7390,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7386,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7378,"src":"854:3:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"hexValue":"30","id":7388,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"869:1:35","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":7387,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"861:7:35","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":7389,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"861:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"854:17:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7385,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"846:7:35","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7391,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"846:26:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7392,"nodeType":"ExpressionStatement","src":"846:26:35"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7398,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7394,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"886:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7395,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"896:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7397,"indexExpression":{"argumentTypes":null,"id":7396,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"905:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"896:15:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"886:25:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7393,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"878:7:35","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"878:34:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7400,"nodeType":"ExpressionStatement","src":"878:34:35"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7409,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7402,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"926:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7403,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"936:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7405,"indexExpression":{"argumentTypes":null,"id":7404,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"944:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"936:14:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7408,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7406,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"951:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7407,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"951:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"936:26:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"926:36:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":7401,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"918:7:35","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":7410,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"918:45:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7411,"nodeType":"ExpressionStatement","src":"918:45:35"},{"expression":{"argumentTypes":null,"id":7421,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7412,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"970:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7414,"indexExpression":{"argumentTypes":null,"id":7413,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"979:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"970:15:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7419,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"1008:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7415,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"988:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7417,"indexExpression":{"argumentTypes":null,"id":7416,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"997:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"988:15:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"988:19:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7420,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"988:27:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"970:45:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7422,"nodeType":"ExpressionStatement","src":"970:45:35"},{"expression":{"argumentTypes":null,"id":7432,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7423,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1021:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7425,"indexExpression":{"argumentTypes":null,"id":7424,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7378,"src":"1030:3:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1021:13:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7430,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"1055:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7426,"name":"balances","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7202,"src":"1037:8:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7428,"indexExpression":{"argumentTypes":null,"id":7427,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7378,"src":"1046:3:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1037:13:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"1037:17:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7431,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1037:25:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1021:41:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7433,"nodeType":"ExpressionStatement","src":"1021:41:35"},{"expression":{"argumentTypes":null,"id":7449,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7434,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"1068:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7438,"indexExpression":{"argumentTypes":null,"id":7435,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"1076:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1068:14:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7439,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7436,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1083:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1083:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1068:26:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7447,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"1128:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7440,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"1097:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7442,"indexExpression":{"argumentTypes":null,"id":7441,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"1105:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1097:14:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7445,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7443,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1112:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7444,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1112:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1097:26:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7446,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"1097:30:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7448,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1097:38:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1068:67:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7450,"nodeType":"ExpressionStatement","src":"1068:67:35"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7452,"name":"_from","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7376,"src":"1155:5:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7453,"name":"_to","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7378,"src":"1162:3:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7454,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7380,"src":"1167:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7451,"name":"Transfer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7359,"src":"1146:8:35","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7455,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1146:28:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7456,"nodeType":"EmitStatement","src":"1141:33:35"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7457,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1187:4:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7384,"id":7458,"nodeType":"Return","src":"1180:11:35"}]},"documentation":"@dev Transfer tokens from one address to another\n@param _from address The address which you want to send tokens from\n@param _to address The address which you want to transfer to\n@param _value uint256 the amount of tokens to be transferred","id":7460,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":7381,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7376,"name":"_from","nodeType":"VariableDeclaration","scope":7460,"src":"753:13:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7375,"name":"address","nodeType":"ElementaryTypeName","src":"753:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7378,"name":"_to","nodeType":"VariableDeclaration","scope":7460,"src":"772:11:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7377,"name":"address","nodeType":"ElementaryTypeName","src":"772:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7380,"name":"_value","nodeType":"VariableDeclaration","scope":7460,"src":"789:14:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7379,"name":"uint256","nodeType":"ElementaryTypeName","src":"789:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"747:60:35"},"payable":false,"returnParameters":{"id":7384,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7383,"name":"","nodeType":"VariableDeclaration","scope":7460,"src":"832:4:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7382,"name":"bool","nodeType":"ElementaryTypeName","src":"832:4:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"831:6:35"},"scope":7607,"src":"726:470:35","stateMutability":"nonpayable","superFunction":7310,"visibility":"public"},{"body":{"id":7487,"nodeType":"Block","src":"1887:115:35","statements":[{"expression":{"argumentTypes":null,"id":7476,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7469,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"1893:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7473,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7470,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1901:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7471,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1901:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1893:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7474,"indexExpression":{"argumentTypes":null,"id":7472,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7462,"src":"1913:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1893:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":7475,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7464,"src":"1925:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1893:38:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7477,"nodeType":"ExpressionStatement","src":"1893:38:35"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7479,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1951:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7480,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1951:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7481,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7462,"src":"1963:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7482,"name":"_value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7464,"src":"1973:6:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7478,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7327,"src":"1942:8:35","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1942:38:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7484,"nodeType":"EmitStatement","src":"1937:43:35"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7485,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1993:4:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7468,"id":7486,"nodeType":"Return","src":"1986:11:35"}]},"documentation":"@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\nBeware that changing an allowance with this method brings the risk that someone may use both the old\nand the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\nrace condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n@param _spender The address which will spend the funds.\n@param _value The amount of tokens to be spent.","id":7488,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":7465,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7462,"name":"_spender","nodeType":"VariableDeclaration","scope":7488,"src":"1831:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7461,"name":"address","nodeType":"ElementaryTypeName","src":"1831:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7464,"name":"_value","nodeType":"VariableDeclaration","scope":7488,"src":"1849:14:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7463,"name":"uint256","nodeType":"ElementaryTypeName","src":"1849:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1830:34:35"},"payable":false,"returnParameters":{"id":7468,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7467,"name":"","nodeType":"VariableDeclaration","scope":7488,"src":"1881:4:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7466,"name":"bool","nodeType":"ElementaryTypeName","src":"1881:4:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1880:6:35"},"scope":7607,"src":"1814:188:35","stateMutability":"nonpayable","superFunction":7319,"visibility":"public"},{"body":{"id":7503,"nodeType":"Block","src":"2431:43:35","statements":[{"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7497,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"2444:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7499,"indexExpression":{"argumentTypes":null,"id":7498,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7490,"src":"2452:6:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2444:15:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7501,"indexExpression":{"argumentTypes":null,"id":7500,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7492,"src":"2460:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2444:25:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":7496,"id":7502,"nodeType":"Return","src":"2437:32:35"}]},"documentation":"@dev Function to check the amount of tokens that an owner allowed to a spender.\n@param _owner address The address which owns the funds.\n@param _spender address The address which will spend the funds.\n@return A uint256 specifying the amount of tokens still available for the spender.","id":7504,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"allowance","nodeType":"FunctionDefinition","parameters":{"id":7493,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7490,"name":"_owner","nodeType":"VariableDeclaration","scope":7504,"src":"2345:14:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7489,"name":"address","nodeType":"ElementaryTypeName","src":"2345:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7492,"name":"_spender","nodeType":"VariableDeclaration","scope":7504,"src":"2365:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7491,"name":"address","nodeType":"ElementaryTypeName","src":"2365:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"2339:47:35"},"payable":false,"returnParameters":{"id":7496,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7495,"name":"","nodeType":"VariableDeclaration","scope":7504,"src":"2420:7:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7494,"name":"uint256","nodeType":"ElementaryTypeName","src":"2420:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2419:9:35"},"scope":7607,"src":"2321:153:35","stateMutability":"view","superFunction":7299,"visibility":"public"},{"body":{"id":7545,"nodeType":"Block","src":"3035:187:35","statements":[{"expression":{"argumentTypes":null,"id":7529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7513,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3041:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7517,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7514,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3049:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7515,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3049:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3041:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7518,"indexExpression":{"argumentTypes":null,"id":7516,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7506,"src":"3061:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3041:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"components":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7526,"name":"_addedValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7508,"src":"3115:11:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7519,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3081:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7522,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7520,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3089:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7521,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3089:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3081:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7524,"indexExpression":{"argumentTypes":null,"id":7523,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7506,"src":"3101:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3081:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7525,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"3081:33:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7527,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3081:46:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":7528,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"3073:55:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3041:87:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7530,"nodeType":"ExpressionStatement","src":"3041:87:35"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7532,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3148:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7533,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3148:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7534,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7506,"src":"3160:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7535,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3170:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7538,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7536,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3178:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7537,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3178:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3170:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7540,"indexExpression":{"argumentTypes":null,"id":7539,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7506,"src":"3190:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3170:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7531,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7327,"src":"3139:8:35","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7541,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3139:61:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7542,"nodeType":"EmitStatement","src":"3134:66:35"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7543,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"3213:4:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7512,"id":7544,"nodeType":"Return","src":"3206:11:35"}]},"documentation":"@dev Increase the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed[_spender] == 0. To increment\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\n@param _spender The address which will spend the funds.\n@param _addedValue The amount of tokens to increase the allowance by.","id":7546,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"increaseApproval","nodeType":"FunctionDefinition","parameters":{"id":7509,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7506,"name":"_spender","nodeType":"VariableDeclaration","scope":7546,"src":"2957:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7505,"name":"address","nodeType":"ElementaryTypeName","src":"2957:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7508,"name":"_addedValue","nodeType":"VariableDeclaration","scope":7546,"src":"2979:19:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7507,"name":"uint256","nodeType":"ElementaryTypeName","src":"2979:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2951:51:35"},"payable":false,"returnParameters":{"id":7512,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7511,"name":"","nodeType":"VariableDeclaration","scope":7546,"src":"3027:4:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7510,"name":"bool","nodeType":"ElementaryTypeName","src":"3027:4:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"3026:6:35"},"scope":7607,"src":"2926:296:35","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":7605,"nodeType":"Block","src":"3793:317:35","statements":[{"assignments":[7556],"declarations":[{"constant":false,"id":7556,"name":"oldValue","nodeType":"VariableDeclaration","scope":7606,"src":"3799:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7555,"name":"uint256","nodeType":"ElementaryTypeName","src":"3799:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":7563,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7557,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3818:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7560,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7558,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3826:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7559,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3826:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3818:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7562,"indexExpression":{"argumentTypes":null,"id":7561,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"3838:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3818:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3799:48:35"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":7566,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":7564,"name":"_subtractedValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7550,"src":"3857:16:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":7565,"name":"oldValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7556,"src":"3876:8:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3857:27:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":7589,"nodeType":"Block","src":"3940:77:35","statements":[{"expression":{"argumentTypes":null,"id":7587,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7577,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3948:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7581,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7578,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3956:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7579,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3956:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3948:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7582,"indexExpression":{"argumentTypes":null,"id":7580,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"3968:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3948:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":7585,"name":"_subtractedValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7550,"src":"3993:16:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":7583,"name":"oldValue","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7556,"src":"3980:8:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7584,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"3980:12:35","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":7586,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3980:30:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3948:62:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7588,"nodeType":"ExpressionStatement","src":"3948:62:35"}]},"id":7590,"nodeType":"IfStatement","src":"3853:164:35","trueBody":{"id":7576,"nodeType":"Block","src":"3886:48:35","statements":[{"expression":{"argumentTypes":null,"id":7574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7567,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"3894:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7571,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7568,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3902:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7569,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3902:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3894:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7572,"indexExpression":{"argumentTypes":null,"id":7570,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"3914:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3894:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":7573,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3926:1:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3894:33:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":7575,"nodeType":"ExpressionStatement","src":"3894:33:35"}]}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7592,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4036:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7593,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4036:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":7594,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"4048:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":7595,"name":"allowed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7374,"src":"4058:7:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":7598,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":7596,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4066:3:35","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":7597,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4066:10:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4058:19:35","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":7600,"indexExpression":{"argumentTypes":null,"id":7599,"name":"_spender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7548,"src":"4078:8:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4058:29:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":7591,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7327,"src":"4027:8:35","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":7601,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4027:61:35","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":7602,"nodeType":"EmitStatement","src":"4022:66:35"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":7603,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"4101:4:35","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":7554,"id":7604,"nodeType":"Return","src":"4094:11:35"}]},"documentation":"@dev Decrease the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed[_spender] == 0. To decrement\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\n@param _spender The address which will spend the funds.\n@param _subtractedValue The amount of tokens to decrease the allowance by.","id":7606,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"decreaseApproval","nodeType":"FunctionDefinition","parameters":{"id":7551,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7548,"name":"_spender","nodeType":"VariableDeclaration","scope":7606,"src":"3710:16:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":7547,"name":"address","nodeType":"ElementaryTypeName","src":"3710:7:35","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":7550,"name":"_subtractedValue","nodeType":"VariableDeclaration","scope":7606,"src":"3732:24:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7549,"name":"uint256","nodeType":"ElementaryTypeName","src":"3732:7:35","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3704:56:35"},"payable":false,"returnParameters":{"id":7554,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7553,"name":"","nodeType":"VariableDeclaration","scope":7606,"src":"3785:4:35","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7552,"name":"bool","nodeType":"ElementaryTypeName","src":"3785:4:35","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"3784:6:35"},"scope":7607,"src":"3679:431:35","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":7608,"src":"334:3779:35"}],"src":"0:4114:35"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.050Z"}; /***/ }), @@ -473,10 +824,10 @@ module.exports = {"contract_name":"StandardToken","abi":[{"constant":false,"inpu /*!*************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/Token.json ***! \*************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"Token","abi":[{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"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,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"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"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263311}; +module.exports = {"contractName":"ERC20","abi":[{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"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"},{"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"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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"}],"bytecode":"0x","deployedBytecode":"0x","sourceMap":"","deployedSourceMap":"","source":"pragma solidity ^0.4.24;\n\nimport \"./ERC20Basic.sol\";\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender)\n public view returns (uint256);\n\n function transferFrom(address from, address to, uint256 value)\n public returns (bool);\n\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n","sourcePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","ast":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","exportedSymbols":{"ERC20":[381]},"id":382,"nodeType":"SourceUnit","nodes":[{"id":340,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","file":"./ERC20Basic.sol","id":341,"nodeType":"ImportDirective","scope":382,"sourceUnit":414,"src":"26:26:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":342,"name":"ERC20Basic","nodeType":"UserDefinedTypeName","referencedDeclaration":413,"src":"162:10:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20Basic_$413","typeString":"contract ERC20Basic"}},"id":343,"nodeType":"InheritanceSpecifier","src":"162:10:3"}],"contractDependencies":[413],"contractKind":"contract","documentation":"@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20","fullyImplemented":false,"id":381,"linearizedBaseContracts":[381,413],"name":"ERC20","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":352,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"allowance","nodeType":"FunctionDefinition","parameters":{"id":348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":345,"name":"owner","nodeType":"VariableDeclaration","scope":352,"src":"196:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":344,"name":"address","nodeType":"ElementaryTypeName","src":"196:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":347,"name":"spender","nodeType":"VariableDeclaration","scope":352,"src":"211:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":346,"name":"address","nodeType":"ElementaryTypeName","src":"211:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"195:32:3"},"payable":false,"returnParameters":{"id":351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":350,"name":"","nodeType":"VariableDeclaration","scope":352,"src":"253:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":349,"name":"uint256","nodeType":"ElementaryTypeName","src":"253:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"252:9:3"},"scope":381,"src":"177:85:3","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":363,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":359,"nodeType":"ParameterList","parameters":[{"constant":false,"id":354,"name":"from","nodeType":"VariableDeclaration","scope":363,"src":"288:12:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":353,"name":"address","nodeType":"ElementaryTypeName","src":"288:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":356,"name":"to","nodeType":"VariableDeclaration","scope":363,"src":"302:10:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":355,"name":"address","nodeType":"ElementaryTypeName","src":"302:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":358,"name":"value","nodeType":"VariableDeclaration","scope":363,"src":"314:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":357,"name":"uint256","nodeType":"ElementaryTypeName","src":"314:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"287:41:3"},"payable":false,"returnParameters":{"id":362,"nodeType":"ParameterList","parameters":[{"constant":false,"id":361,"name":"","nodeType":"VariableDeclaration","scope":363,"src":"349:4:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":360,"name":"bool","nodeType":"ElementaryTypeName","src":"349:4:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"348:6:3"},"scope":381,"src":"266:89:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":372,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":368,"nodeType":"ParameterList","parameters":[{"constant":false,"id":365,"name":"spender","nodeType":"VariableDeclaration","scope":372,"src":"376:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":364,"name":"address","nodeType":"ElementaryTypeName","src":"376:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":367,"name":"value","nodeType":"VariableDeclaration","scope":372,"src":"393:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":366,"name":"uint256","nodeType":"ElementaryTypeName","src":"393:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"375:32:3"},"payable":false,"returnParameters":{"id":371,"nodeType":"ParameterList","parameters":[{"constant":false,"id":370,"name":"","nodeType":"VariableDeclaration","scope":372,"src":"424:4:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":369,"name":"bool","nodeType":"ElementaryTypeName","src":"424:4:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"423:6:3"},"scope":381,"src":"359:71:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"anonymous":false,"documentation":null,"id":380,"name":"Approval","nodeType":"EventDefinition","parameters":{"id":379,"nodeType":"ParameterList","parameters":[{"constant":false,"id":374,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":380,"src":"453:21:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":373,"name":"address","nodeType":"ElementaryTypeName","src":"453:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":376,"indexed":true,"name":"spender","nodeType":"VariableDeclaration","scope":380,"src":"480:23:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":375,"name":"address","nodeType":"ElementaryTypeName","src":"480:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":378,"indexed":false,"name":"value","nodeType":"VariableDeclaration","scope":380,"src":"509:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":377,"name":"uint256","nodeType":"ElementaryTypeName","src":"509:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"447:79:3"},"src":"433:94:3"}],"scope":382,"src":"144:385:3"}],"src":"0:530:3"},"legacyAST":{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","exportedSymbols":{"ERC20":[381]},"id":382,"nodeType":"SourceUnit","nodes":[{"id":340,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:3"},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol","file":"./ERC20Basic.sol","id":341,"nodeType":"ImportDirective","scope":382,"sourceUnit":414,"src":"26:26:3","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":342,"name":"ERC20Basic","nodeType":"UserDefinedTypeName","referencedDeclaration":413,"src":"162:10:3","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20Basic_$413","typeString":"contract ERC20Basic"}},"id":343,"nodeType":"InheritanceSpecifier","src":"162:10:3"}],"contractDependencies":[413],"contractKind":"contract","documentation":"@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20","fullyImplemented":false,"id":381,"linearizedBaseContracts":[381,413],"name":"ERC20","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":null,"id":352,"implemented":false,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"allowance","nodeType":"FunctionDefinition","parameters":{"id":348,"nodeType":"ParameterList","parameters":[{"constant":false,"id":345,"name":"owner","nodeType":"VariableDeclaration","scope":352,"src":"196:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":344,"name":"address","nodeType":"ElementaryTypeName","src":"196:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":347,"name":"spender","nodeType":"VariableDeclaration","scope":352,"src":"211:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":346,"name":"address","nodeType":"ElementaryTypeName","src":"211:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"195:32:3"},"payable":false,"returnParameters":{"id":351,"nodeType":"ParameterList","parameters":[{"constant":false,"id":350,"name":"","nodeType":"VariableDeclaration","scope":352,"src":"253:7:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":349,"name":"uint256","nodeType":"ElementaryTypeName","src":"253:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"252:9:3"},"scope":381,"src":"177:85:3","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":363,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":359,"nodeType":"ParameterList","parameters":[{"constant":false,"id":354,"name":"from","nodeType":"VariableDeclaration","scope":363,"src":"288:12:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":353,"name":"address","nodeType":"ElementaryTypeName","src":"288:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":356,"name":"to","nodeType":"VariableDeclaration","scope":363,"src":"302:10:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":355,"name":"address","nodeType":"ElementaryTypeName","src":"302:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":358,"name":"value","nodeType":"VariableDeclaration","scope":363,"src":"314:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":357,"name":"uint256","nodeType":"ElementaryTypeName","src":"314:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"287:41:3"},"payable":false,"returnParameters":{"id":362,"nodeType":"ParameterList","parameters":[{"constant":false,"id":361,"name":"","nodeType":"VariableDeclaration","scope":363,"src":"349:4:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":360,"name":"bool","nodeType":"ElementaryTypeName","src":"349:4:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"348:6:3"},"scope":381,"src":"266:89:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":null,"documentation":null,"id":372,"implemented":false,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":368,"nodeType":"ParameterList","parameters":[{"constant":false,"id":365,"name":"spender","nodeType":"VariableDeclaration","scope":372,"src":"376:15:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":364,"name":"address","nodeType":"ElementaryTypeName","src":"376:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":367,"name":"value","nodeType":"VariableDeclaration","scope":372,"src":"393:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":366,"name":"uint256","nodeType":"ElementaryTypeName","src":"393:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"375:32:3"},"payable":false,"returnParameters":{"id":371,"nodeType":"ParameterList","parameters":[{"constant":false,"id":370,"name":"","nodeType":"VariableDeclaration","scope":372,"src":"424:4:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":369,"name":"bool","nodeType":"ElementaryTypeName","src":"424:4:3","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"423:6:3"},"scope":381,"src":"359:71:3","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"anonymous":false,"documentation":null,"id":380,"name":"Approval","nodeType":"EventDefinition","parameters":{"id":379,"nodeType":"ParameterList","parameters":[{"constant":false,"id":374,"indexed":true,"name":"owner","nodeType":"VariableDeclaration","scope":380,"src":"453:21:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":373,"name":"address","nodeType":"ElementaryTypeName","src":"453:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":376,"indexed":true,"name":"spender","nodeType":"VariableDeclaration","scope":380,"src":"480:23:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":375,"name":"address","nodeType":"ElementaryTypeName","src":"480:7:3","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":378,"indexed":false,"name":"value","nodeType":"VariableDeclaration","scope":380,"src":"509:13:3","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":377,"name":"uint256","nodeType":"ElementaryTypeName","src":"509:7:3","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"447:79:3"},"src":"433:94:3"}],"scope":382,"src":"144:385:3"}],"src":"0:530:3"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-29T15:25:24.148Z"}; /***/ }), @@ -484,10 +835,21 @@ module.exports = {"contract_name":"Token","abi":[{"constant":false,"inputs":[{"n /*!**********************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracle.json ***! \**********************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"UltimateOracle","abi":[{"constant":true,"inputs":[],"name":"forwardedOracle","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunnerPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunner","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"int256"}],"name":"totalOutcomeAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"forwardedOutcomeSetTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunnerSetTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"forwardedOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"challengeAmount","outputs":[{"name":"","type":"uint256"}],"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":"","type":"address"},{"name":"","type":"int256"}],"name":"outcomeAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spreadMultiplier","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"challengePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"ForwardedOracleOutcomeAssignment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeChallenge","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"outcome","type":"int256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"OutcomeVote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"constant":false,"inputs":[],"name":"setForwardedOutcome","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_outcome","type":"int256"}],"name":"challengeOutcome","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_outcome","type":"int256"},{"name":"amount","type":"uint256"}],"name":"voteForOutcome","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[{"name":"amount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isChallengePeriodOver","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isFrontRunnerPeriodOver","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isChallenged","outputs":[{"name":"","type":"bool"}],"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":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5061125b806100206000396000f300608060405260043610610133576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063061a85c7146101385780630853f7eb1461018f5780630f3e9438146101ba5780631a39d8ef146101e55780631a4f5b67146102105780631ff143111461023f5780633ccfd60b14610280578063466ae314146102ab57806372b8de14146102d6578063739b8c48146103055780637e7e4b471461031c5780638ef8125e14610347578063984a470a146103725780639d89e7d41461039d5780639df4d0fe146103c85780639f0de490146103f7578063a619486e14610424578063b2016bd41461047b578063c427af9b146104d2578063ccdf68f314610533578063d84d2a4714610562578063f3f480d914610593578063f7553098146105be575b600080fd5b34801561014457600080fd5b5061014d6105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101a461061b565b6040518082815260200191505060405180910390f35b3480156101c657600080fd5b506101cf610621565b6040518082815260200191505060405180910390f35b3480156101f157600080fd5b506101fa610627565b6040518082815260200191505060405180910390f35b34801561021c57600080fd5b5061022561062d565b604051808215151515815260200191505060405180910390f35b34801561024b57600080fd5b5061026a6004803603810190808035906020019092919050505061065b565b6040518082815260200191505060405180910390f35b34801561028c57600080fd5b50610295610673565b6040518082815260200191505060405180910390f35b3480156102b757600080fd5b506102c06108c5565b6040518082815260200191505060405180910390f35b3480156102e257600080fd5b506102eb6108cb565b604051808215151515815260200191505060405180910390f35b34801561031157600080fd5b5061031a6108f9565b005b34801561032857600080fd5b50610331610aed565b6040518082815260200191505060405180910390f35b34801561035357600080fd5b5061035c610b0f565b6040518082815260200191505060405180910390f35b34801561037e57600080fd5b50610387610b15565b6040518082815260200191505060405180910390f35b3480156103a957600080fd5b506103b2610b1b565b6040518082815260200191505060405180910390f35b3480156103d457600080fd5b506103dd610b21565b604051808215151515815260200191505060405180910390f35b34801561040357600080fd5b5061042260048036038101908080359060200190929190505050610b2e565b005b34801561043057600080fd5b50610439610d6a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561048757600080fd5b50610490610d8f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104de57600080fd5b5061051d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db5565b6040518082815260200191505060405180910390f35b34801561053f57600080fd5b50610548610dda565b604051808215151515815260200191505060405180910390f35b34801561056e57600080fd5b50610577610e09565b604051808260ff1660ff16815260200191505060405180910390f35b34801561059f57600080fd5b506105a8610e1c565b6040518082815260200191505060405180910390f35b3480156105ca57600080fd5b506105f36004803603810190808035906020019092919080359060200190929190505050610e22565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60085481565b600a5481565b600080600954141580156106565750600554610654600954426111c290919063ffffffff16565b115b905090565b600b6020528060005260406000206000915090505481565b600061067d61062d565b151561068857600080fd5b600b6000600854815260200190815260200160002054610705600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600854815260200190815260200160002054600a546111db90919063ffffffff16565b81151561070e57fe5b0490506000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600854815260200190815260200160002081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561082e57600080fd5b505af1158015610842573d6000803e3d6000fd5b505050506040513d602081101561085857600080fd5b8101908080519060200190929190505050151561087457600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a290565b60075481565b600080600754141580156108f457506003546108f2600754426111c290919063ffffffff16565b115b905090565b610901610b21565b15801561091057506000600754145b80156109d95750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561099d57600080fd5b505af11580156109b1573d6000803e3d6000fd5b505050506040513d60208110156109c757600080fd5b81019080805190602001909291905050505b15156109e457600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a6a57600080fd5b505af1158015610a7e573d6000803e3d6000fd5b505050506040513d6020811015610a9457600080fd5b8101908080519060200190929190505050600681905550426007819055507f6eab3db94ac766c1ac203bcd9c9636476993422eaa067ad449e20ce8501b2a8f6006546040518082815260200191505060405180910390a1565b6000610af761062d565b15610b06576008549050610b0c565b60065490505b90565b60095481565b60065481565b60045481565b6000806009541415905090565b610b36610b21565b158015610b485750610b466108cb565b155b8015610c865750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33306004546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b81019080805190602001909291905050505b1515610c9157600080fd5b600454600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550600454600b600083815260200190815260200160002081905550600454600a8190555080600881905550426009819055503373ffffffffffffffffffffffffffffffffffffffff167fd0fdeb84e66d569a89718f40a99496b38d6c13249a9c9f623fbaa3d8ef343a9d826040518082815260200191505060405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c602052816000526040600020602052806000526040600020600091509150505481565b6000610de46108cb565b8015610df55750610df3610b21565b155b80610e045750610e0361062d565b5b905090565b600260149054906101000a900460ff1681565b60035481565b6000610e60600260149054906101000a900460ff1660ff16600b600086815260200190815260200160002054600a54036111db90919063ffffffff16565b9050600b600084815260200190815260200160002054811115610e9a57600b60008481526020019081526020016000205481039050610e9f565b600090505b80821115610eab578091505b610eb3610b21565b8015610ec45750610ec261062d565b155b80156110005750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610fc457600080fd5b505af1158015610fd8573d6000803e3d6000fd5b505050506040513d6020811015610fee57600080fd5b81019080805190602001909291905050505b151561100b57600080fd5b61106e82600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008681526020019081526020016000205461121390919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020819055506110e882600b60008681526020019081526020016000205461121390919063ffffffff16565b600b60008581526020019081526020016000208190555061111482600a5461121390919063ffffffff16565b600a8190555060085483141580156111535750600b6000600854815260200190815260200160002054600b600085815260200190815260200160002054115b156111675782600881905550426009819055505b3373ffffffffffffffffffffffffffffffffffffffff167f86fa706979a07f1dd01a49718016881d95ada425549c353ec9e55a627b98a93b8484604051808381526020018281526020019250505060405180910390a2505050565b60008282111515156111d057fe5b818303905092915050565b6000808314156111ee576000905061120d565b81830290508183828115156111ff57fe5b0414151561120957fe5b8090505b92915050565b6000818301905082811015151561122657fe5b809050929150505600a165627a7a72305820077404465a2a43e386ecf551a709db6b8d947b5886b0c82209c521de3262a63c0029","deployedBytecode":"0x608060405260043610610133576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063061a85c7146101385780630853f7eb1461018f5780630f3e9438146101ba5780631a39d8ef146101e55780631a4f5b67146102105780631ff143111461023f5780633ccfd60b14610280578063466ae314146102ab57806372b8de14146102d6578063739b8c48146103055780637e7e4b471461031c5780638ef8125e14610347578063984a470a146103725780639d89e7d41461039d5780639df4d0fe146103c85780639f0de490146103f7578063a619486e14610424578063b2016bd41461047b578063c427af9b146104d2578063ccdf68f314610533578063d84d2a4714610562578063f3f480d914610593578063f7553098146105be575b600080fd5b34801561014457600080fd5b5061014d6105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019b57600080fd5b506101a461061b565b6040518082815260200191505060405180910390f35b3480156101c657600080fd5b506101cf610621565b6040518082815260200191505060405180910390f35b3480156101f157600080fd5b506101fa610627565b6040518082815260200191505060405180910390f35b34801561021c57600080fd5b5061022561062d565b604051808215151515815260200191505060405180910390f35b34801561024b57600080fd5b5061026a6004803603810190808035906020019092919050505061065b565b6040518082815260200191505060405180910390f35b34801561028c57600080fd5b50610295610673565b6040518082815260200191505060405180910390f35b3480156102b757600080fd5b506102c06108c5565b6040518082815260200191505060405180910390f35b3480156102e257600080fd5b506102eb6108cb565b604051808215151515815260200191505060405180910390f35b34801561031157600080fd5b5061031a6108f9565b005b34801561032857600080fd5b50610331610aed565b6040518082815260200191505060405180910390f35b34801561035357600080fd5b5061035c610b0f565b6040518082815260200191505060405180910390f35b34801561037e57600080fd5b50610387610b15565b6040518082815260200191505060405180910390f35b3480156103a957600080fd5b506103b2610b1b565b6040518082815260200191505060405180910390f35b3480156103d457600080fd5b506103dd610b21565b604051808215151515815260200191505060405180910390f35b34801561040357600080fd5b5061042260048036038101908080359060200190929190505050610b2e565b005b34801561043057600080fd5b50610439610d6a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561048757600080fd5b50610490610d8f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104de57600080fd5b5061051d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db5565b6040518082815260200191505060405180910390f35b34801561053f57600080fd5b50610548610dda565b604051808215151515815260200191505060405180910390f35b34801561056e57600080fd5b50610577610e09565b604051808260ff1660ff16815260200191505060405180910390f35b34801561059f57600080fd5b506105a8610e1c565b6040518082815260200191505060405180910390f35b3480156105ca57600080fd5b506105f36004803603810190808035906020019092919080359060200190929190505050610e22565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60085481565b600a5481565b600080600954141580156106565750600554610654600954426111c290919063ffffffff16565b115b905090565b600b6020528060005260406000206000915090505481565b600061067d61062d565b151561068857600080fd5b600b6000600854815260200190815260200160002054610705600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600854815260200190815260200160002054600a546111db90919063ffffffff16565b81151561070e57fe5b0490506000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600854815260200190815260200160002081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561082e57600080fd5b505af1158015610842573d6000803e3d6000fd5b505050506040513d602081101561085857600080fd5b8101908080519060200190929190505050151561087457600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a290565b60075481565b600080600754141580156108f457506003546108f2600754426111c290919063ffffffff16565b115b905090565b610901610b21565b15801561091057506000600754145b80156109d95750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561099d57600080fd5b505af11580156109b1573d6000803e3d6000fd5b505050506040513d60208110156109c757600080fd5b81019080805190602001909291905050505b15156109e457600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a6a57600080fd5b505af1158015610a7e573d6000803e3d6000fd5b505050506040513d6020811015610a9457600080fd5b8101908080519060200190929190505050600681905550426007819055507f6eab3db94ac766c1ac203bcd9c9636476993422eaa067ad449e20ce8501b2a8f6006546040518082815260200191505060405180910390a1565b6000610af761062d565b15610b06576008549050610b0c565b60065490505b90565b60095481565b60065481565b60045481565b6000806009541415905090565b610b36610b21565b158015610b485750610b466108cb565b155b8015610c865750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33306004546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b81019080805190602001909291905050505b1515610c9157600080fd5b600454600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550600454600b600083815260200190815260200160002081905550600454600a8190555080600881905550426009819055503373ffffffffffffffffffffffffffffffffffffffff167fd0fdeb84e66d569a89718f40a99496b38d6c13249a9c9f623fbaa3d8ef343a9d826040518082815260200191505060405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c602052816000526040600020602052806000526040600020600091509150505481565b6000610de46108cb565b8015610df55750610df3610b21565b155b80610e045750610e0361062d565b5b905090565b600260149054906101000a900460ff1681565b60035481565b6000610e60600260149054906101000a900460ff1660ff16600b600086815260200190815260200160002054600a54036111db90919063ffffffff16565b9050600b600084815260200190815260200160002054811115610e9a57600b60008481526020019081526020016000205481039050610e9f565b600090505b80821115610eab578091505b610eb3610b21565b8015610ec45750610ec261062d565b155b80156110005750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610fc457600080fd5b505af1158015610fd8573d6000803e3d6000fd5b505050506040513d6020811015610fee57600080fd5b81019080805190602001909291905050505b151561100b57600080fd5b61106e82600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008681526020019081526020016000205461121390919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020819055506110e882600b60008681526020019081526020016000205461121390919063ffffffff16565b600b60008581526020019081526020016000208190555061111482600a5461121390919063ffffffff16565b600a8190555060085483141580156111535750600b6000600854815260200190815260200160002054600b600085815260200190815260200160002054115b156111675782600881905550426009819055505b3373ffffffffffffffffffffffffffffffffffffffff167f86fa706979a07f1dd01a49718016881d95ada425549c353ec9e55a627b98a93b8484604051808381526020018281526020019250505060405180910390a2505050565b60008282111515156111d057fe5b818303905092915050565b6000808314156111ee576000905061120d565b81830290508183828115156111ff57fe5b0414151561120957fe5b8090505b92915050565b6000818301905082811015151561122657fe5b809050929150505600a165627a7a72305820077404465a2a43e386ecf551a709db6b8d947b5886b0c82209c521de3262a63c0029","sourceMap":"2613:4555:25:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2613:4555:25;;;;;;;","deployedSourceMap":"2613:4555:25:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;590:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;590:29:25;;;;;;;;;;;;;;;;;;;;;;;;;;;760;;8:9:-1;5:2;;;30:1;27;20:12;5:2;760:29:25;;;;;;;;;;;;;;;;;;;;;;;875:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;875:22:25;;;;;;;;;;;;;;;;;;;;;;;945:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;945:23:25;;;;;;;;;;;;;;;;;;;;;;;6223:198;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6223:198:25;;;;;;;;;;;;;;;;;;;;;;;;;;;974:48;;8:9:-1;5:2;;;30:1;27;20:12;5:2;974:48:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5297:498;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5297:498:25;;;;;;;;;;;;;;;;;;;;;;;829:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;829:40:25;;;;;;;;;;;;;;;;;;;;;;;5904:204;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5904:204:25;;;;;;;;;;;;;;;;;;;;;;;;;;;2791:480;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2791:480:25;;;;;;6979:187;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6979:187:25;;;;;;;;;;;;;;;;;;;;;;;903:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;903:35:25;;;;;;;;;;;;;;;;;;;;;;;796:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;796:27:25;;;;;;;;;;;;;;;;;;;;;;;727;;8:9:-1;5:2;;;30:1;27;20:12;5:2;727:27:25;;;;;;;;;;;;;;;;;;;;;;;6504:131;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6504:131:25;;;;;;;;;;;;;;;;;;;;;;;;;;;3371:584;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3371:584:25;;;;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;625:28:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;625:28:25;;;;;;;;;;;;;;;;;;;;;;;;;;;1028:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1028:64:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6720:192;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6720:192:25;;;;;;;;;;;;;;;;;;;;;;;;;;;659:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;659:29:25;;;;;;;;;;;;;;;;;;;;;;;;;;;694:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;694:27:25;;;;;;;;;;;;;;;;;;;;;;;4091:1134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4091:1134:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;590:29;;;;;;;;;;;;;:::o;760:::-;;;;:::o;875:22::-;;;;:::o;945:23::-;;;;:::o;6223:198::-;6303:4;6357:1;6330:23;;:28;;:84;;;;;6397:17;;6362:32;6370:23;;6362:3;:7;;:32;;;;:::i;:::-;:52;6330:84;6323:91;;6223:198;:::o;974:48::-;;;;;;;;;;;;;;;;;:::o;5297:498::-;5349:11;5447:25;:23;:25::i;:::-;5439:34;;;;;;;;5551:19;:32;5571:11;;5551:32;;;;;;;;;;;;5492:56;5508:14;:26;5523:10;5508:26;;;;;;;;;;;;;;;:39;5535:11;;5508:39;;;;;;;;;;;;5492:11;;:15;;:56;;;;:::i;:::-;:91;;;;;;;;5483:100;;5635:1;5593:14;:26;5608:10;5593:26;;;;;;;;;;;;;;;:39;5620:11;;5593:39;;;;;;;;;;;:43;;;;5698:15;;;;;;;;;;;:24;;;5723:10;5735:6;5698:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5698:44:25;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5698:44:25;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5698:44:25;;;;;;;;;;;;;;;;5690:53;;;;;;;;5769:10;5758:30;;;5781:6;5758:30;;;;;;;;;;;;;;;;;;5297:498;:::o;829:40::-;;;;:::o;5904:204::-;5982:4;6041:1;6009:28;;:33;;:92;;;;;6086:15;;6046:37;6054:28;;6046:3;:7;;:37;;;;:::i;:::-;:55;6009:92;6002:99;;5904:204;:::o;2791:480::-;2980:14;:12;:14::i;:::-;2979:15;:68;;;;;3046:1;3014:28;;:33;2979:68;:118;;;;;3067:15;;;;;;;;;;;:28;;;:30;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3067:30:25;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3067:30:25;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3067:30:25;;;;;;;;;;;;;;;;2979:118;2968:130;;;;;;;;3127:15;;;;;;;;;;;:26;;;:28;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3127:28:25;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3127:28:25;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3127:28:25;;;;;;;;;;;;;;;;3108:16;:47;;;;3196:3;3165:28;:34;;;;3214:50;3247:16;;3214:50;;;;;;;;;;;;;;;;;;2791:480::o;6979:187::-;7046:3;7069:25;:23;:25::i;:::-;7065:61;;;7115:11;;7108:18;;;;7065:61;7143:16;;7136:23;;6979:187;;:::o;903:35::-;;;;:::o;796:27::-;;;;:::o;727:::-;;;;:::o;6504:131::-;6573:4;6627:1;6600:23;;:28;;6593:35;;6504:131;:::o;3371:584::-;3522:14;:12;:14::i;:::-;3521:15;:59;;;;;3557:23;:21;:23::i;:::-;3556:24;3521:59;:142;;;;;3600:15;;;;;;;;;;;:28;;;3629:10;3641:4;3647:15;;3600:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3600:63:25;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3600:63:25;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3600:63:25;;;;;;;;;;;;;;;;3521:142;3510:154;;;;;;;;3713:15;;3674:14;:26;3689:10;3674:26;;;;;;;;;;;;;;;:36;3701:8;3674:36;;;;;;;;;;;:54;;;;3770:15;;3738:19;:29;3758:8;3738:29;;;;;;;;;;;:47;;;;3809:15;;3795:11;:29;;;;3848:8;3834:11;:22;;;;3892:3;3866:23;:29;;;;3927:10;3910:38;;;3939:8;3910:38;;;;;;;;;;;;;;;;;;3371:584;:::o;197:25:29:-;;;;;;;;;;;;;:::o;625:28:25:-;;;;;;;;;;;;;:::o;1028:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;6720:192::-;6789:4;6819:23;:21;:23::i;:::-;:42;;;;;6847:14;:12;:14::i;:::-;6846:15;6819:42;:86;;;;6880:25;:23;:25::i;:::-;6819:86;6809:96;;6720:192;:::o;659:29::-;;;;;;;;;;;;;:::o;694:27::-;;;;:::o;4091:1134::-;4171:14;4188:67;4238:16;;;;;;;;;;;4188:67;;4203:19;:29;4223:8;4203:29;;;;;;;;;;;;4189:11;;:43;4188:49;;:67;;;;:::i;:::-;4171:84;;4282:19;:29;4302:8;4282:29;;;;;;;;;;;;4270:9;:41;4266:141;;;4338:19;:29;4358:8;4338:29;;;;;;;;;;;;4325:42;;;;4266:141;;;4406:1;4394:13;;4266:141;4431:9;4422:6;:18;4418:54;;;4463:9;4454:18;;4418:54;4596:14;:12;:14::i;:::-;:60;;;;;4631:25;:23;:25::i;:::-;4630:26;4596:60;:134;;;;;4676:15;;;;;;;;;;;:28;;;4705:10;4717:4;4723:6;4676:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4676:54:25;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4676:54:25;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4676:54:25;;;;;;;;;;;;;;;;4596:134;4585:146;;;;;;;;4780:48;4821:6;4780:14;:26;4795:10;4780:26;;;;;;;;;;;;;;;:36;4807:8;4780:36;;;;;;;;;;;;:40;;:48;;;;:::i;:::-;4741:14;:26;4756:10;4741:26;;;;;;;;;;;;;;;:36;4768:8;4741:36;;;;;;;;;;;:87;;;;4870:41;4904:6;4870:19;:29;4890:8;4870:29;;;;;;;;;;;;:33;;:41;;;;:::i;:::-;4838:19;:29;4858:8;4838:29;;;;;;;;;;;:73;;;;4935:23;4951:6;4935:11;;:15;;:23;;;;:::i;:::-;4921:11;:37;;;;4984:11;;4972:8;:23;;:91;;;;;5031:19;:32;5051:11;;5031:32;;;;;;;;;;;;4999:19;:29;5019:8;4999:29;;;;;;;;;;;;:64;4972:91;4968:195;;;5101:8;5087:11;:22;;;;5149:3;5123:23;:29;;;;4968:195;5189:10;5177:41;;;5201:8;5211:6;5177:41;;;;;;;;;;;;;;;;;;;;;;;;4091:1134;;;:::o;1968:110:31:-;2026:7;2053:1;2048;:6;;2041:14;;;;;;2072:1;2068;:5;2061:12;;1968:110;;;;:::o;273:373::-;331:9;562:1;557;:6;553:35;;;580:1;573:8;;;;553:35;602:1;598;:5;594:9;;625:1;620;616;:5;;;;;;;;:10;609:18;;;;;;640:1;633:8;;273:373;;;;;:::o;2363:123::-;2421:9;2446:1;2442;:5;2438:9;;2465:1;2460;:6;;2453:14;;;;;;2480:1;2473:8;;2363:123;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract UltimateOracleData {\n\n /*\n * Events\n */\n event ForwardedOracleOutcomeAssignment(int outcome);\n event OutcomeChallenge(address indexed sender, int outcome);\n event OutcomeVote(address indexed sender, int outcome, uint amount);\n event Withdrawal(address indexed sender, uint amount);\n\n /*\n * Storage\n */\n Oracle public forwardedOracle;\n ERC20 public collateralToken;\n uint8 public spreadMultiplier;\n uint public challengePeriod;\n uint public challengeAmount;\n uint public frontRunnerPeriod;\n\n int public forwardedOutcome;\n uint public forwardedOutcomeSetTimestamp;\n int public frontRunner;\n uint public frontRunnerSetTimestamp;\n\n uint public totalAmount;\n mapping (int => uint) public totalOutcomeAmounts;\n mapping (address => mapping (int => uint)) public outcomeAmounts;\n}\n\ncontract UltimateOracleProxy is Proxy, UltimateOracleData {\n\n /// @dev Constructor sets ultimate oracle properties\n /// @param _forwardedOracle Oracle address\n /// @param _collateralToken Collateral token address\n /// @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n /// @param _challengePeriod Time to challenge oracle outcome\n /// @param _challengeAmount Amount to challenge the outcome\n /// @param _frontRunnerPeriod Time to overbid the front-runner\n constructor(\n address proxied,\n Oracle _forwardedOracle,\n ERC20 _collateralToken,\n uint8 _spreadMultiplier,\n uint _challengePeriod,\n uint _challengeAmount,\n uint _frontRunnerPeriod\n )\n Proxy(proxied)\n public\n {\n // Validate inputs\n require( address(_forwardedOracle) != 0\n && address(_collateralToken) != 0\n && _spreadMultiplier >= 2\n && _challengePeriod > 0\n && _challengeAmount > 0\n && _frontRunnerPeriod > 0);\n forwardedOracle = _forwardedOracle;\n collateralToken = _collateralToken;\n spreadMultiplier = _spreadMultiplier;\n challengePeriod = _challengePeriod;\n challengeAmount = _challengeAmount;\n frontRunnerPeriod = _frontRunnerPeriod;\n }\n}\n\n/// @title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n/// @author Stefan George - \ncontract UltimateOracle is Proxied, Oracle, UltimateOracleData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Allows to set oracle outcome\n function setForwardedOutcome()\n public\n {\n // There was no challenge and the outcome was not set yet in the ultimate oracle but in the forwarded oracle\n require( !isChallenged()\n && forwardedOutcomeSetTimestamp == 0\n && forwardedOracle.isOutcomeSet());\n forwardedOutcome = forwardedOracle.getOutcome();\n forwardedOutcomeSetTimestamp = now;\n emit ForwardedOracleOutcomeAssignment(forwardedOutcome);\n }\n\n /// @dev Allows to challenge the oracle outcome\n /// @param _outcome Outcome to bid on\n function challengeOutcome(int _outcome)\n public\n {\n // There was no challenge yet or the challenge period expired\n require( !isChallenged()\n && !isChallengePeriodOver()\n && collateralToken.transferFrom(msg.sender, this, challengeAmount));\n outcomeAmounts[msg.sender][_outcome] = challengeAmount;\n totalOutcomeAmounts[_outcome] = challengeAmount;\n totalAmount = challengeAmount;\n frontRunner = _outcome;\n frontRunnerSetTimestamp = now;\n emit OutcomeChallenge(msg.sender, _outcome);\n }\n\n /// @dev Allows to challenge the oracle outcome\n /// @param _outcome Outcome to bid on\n /// @param amount Amount to bid\n function voteForOutcome(int _outcome, uint amount)\n public\n {\n uint maxAmount = (totalAmount - totalOutcomeAmounts[_outcome]).mul(spreadMultiplier);\n\n if (maxAmount > totalOutcomeAmounts[_outcome])\n maxAmount -= totalOutcomeAmounts[_outcome];\n else\n maxAmount = 0;\n\n if (amount > maxAmount)\n amount = maxAmount;\n // Outcome is challenged and front runner period is not over yet and tokens can be transferred\n require( isChallenged()\n && !isFrontRunnerPeriodOver()\n && collateralToken.transferFrom(msg.sender, this, amount));\n outcomeAmounts[msg.sender][_outcome] = outcomeAmounts[msg.sender][_outcome].add(amount);\n totalOutcomeAmounts[_outcome] = totalOutcomeAmounts[_outcome].add(amount);\n totalAmount = totalAmount.add(amount);\n if (_outcome != frontRunner && totalOutcomeAmounts[_outcome] > totalOutcomeAmounts[frontRunner])\n {\n frontRunner = _outcome;\n frontRunnerSetTimestamp = now;\n }\n emit OutcomeVote(msg.sender, _outcome, amount);\n }\n\n /// @dev Withdraws winnings for user\n /// @return Winnings\n function withdraw()\n public\n returns (uint amount)\n {\n // Outcome was challenged and ultimate outcome decided\n require(isFrontRunnerPeriodOver());\n amount = totalAmount.mul(outcomeAmounts[msg.sender][frontRunner]) / totalOutcomeAmounts[frontRunner];\n outcomeAmounts[msg.sender][frontRunner] = 0;\n // Transfer earnings to contributor\n require(collateralToken.transfer(msg.sender, amount));\n emit Withdrawal(msg.sender, amount);\n }\n\n /// @dev Checks if time to challenge the outcome is over\n /// @return Is challenge period over?\n function isChallengePeriodOver()\n public\n view\n returns (bool)\n {\n return forwardedOutcomeSetTimestamp != 0 && now.sub(forwardedOutcomeSetTimestamp) > challengePeriod;\n }\n\n /// @dev Checks if time to overbid the front runner is over\n /// @return Is front runner period over?\n function isFrontRunnerPeriodOver()\n public\n view\n returns (bool)\n {\n return frontRunnerSetTimestamp != 0 && now.sub(frontRunnerSetTimestamp) > frontRunnerPeriod;\n }\n\n /// @dev Checks if outcome was challenged\n /// @return Is challenged?\n function isChallenged()\n public\n view\n returns (bool)\n {\n return frontRunnerSetTimestamp != 0;\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isChallengePeriodOver() && !isChallenged()\n || isFrontRunnerPeriodOver();\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n if (isFrontRunnerPeriodOver())\n return frontRunner;\n return forwardedOutcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","exportedSymbols":{"UltimateOracle":[5462],"UltimateOracleData":[5036],"UltimateOracleProxy":[5116]},"id":5463,"nodeType":"SourceUnit","nodes":[{"id":4975,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:25"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4976,"nodeType":"ImportDirective","scope":5463,"sourceUnit":4718,"src":"25:31:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":4977,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7329,"src":"57:63:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":4978,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7190,"src":"121:59:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4979,"nodeType":"ImportDirective","scope":5463,"sourceUnit":6702,"src":"181:55:25","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5036,"linearizedBaseContracts":[5036],"name":"UltimateOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4983,"name":"ForwardedOracleOutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4982,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4981,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4983,"src":"343:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4980,"name":"int","nodeType":"ElementaryTypeName","src":"343:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"342:13:25"},"src":"304:52:25"},{"anonymous":false,"documentation":null,"id":4989,"name":"OutcomeChallenge","nodeType":"EventDefinition","parameters":{"id":4988,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4985,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4989,"src":"384:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4984,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4987,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4989,"src":"408:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4986,"name":"int","nodeType":"ElementaryTypeName","src":"408:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"383:37:25"},"src":"361:60:25"},{"anonymous":false,"documentation":null,"id":4997,"name":"OutcomeVote","nodeType":"EventDefinition","parameters":{"id":4996,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4991,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4997,"src":"444:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4990,"name":"address","nodeType":"ElementaryTypeName","src":"444:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4993,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4997,"src":"468:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4992,"name":"int","nodeType":"ElementaryTypeName","src":"468:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4995,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":4997,"src":"481:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4994,"name":"uint","nodeType":"ElementaryTypeName","src":"481:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"443:50:25"},"src":"426:68:25"},{"anonymous":false,"documentation":null,"id":5003,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":5002,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4999,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":5003,"src":"516:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4998,"name":"address","nodeType":"ElementaryTypeName","src":"516:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5001,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5003,"src":"540:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5000,"name":"uint","nodeType":"ElementaryTypeName","src":"540:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"515:37:25"},"src":"499:54:25"},{"constant":false,"id":5005,"name":"forwardedOracle","nodeType":"VariableDeclaration","scope":5036,"src":"590:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5004,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"590:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":5007,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5036,"src":"625:28:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5006,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"625:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":5009,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5036,"src":"659:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5008,"name":"uint8","nodeType":"ElementaryTypeName","src":"659:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"constant":false,"id":5011,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5036,"src":"694:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5010,"name":"uint","nodeType":"ElementaryTypeName","src":"694:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5013,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5036,"src":"727:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5012,"name":"uint","nodeType":"ElementaryTypeName","src":"727:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5015,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5036,"src":"760:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5014,"name":"uint","nodeType":"ElementaryTypeName","src":"760:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5017,"name":"forwardedOutcome","nodeType":"VariableDeclaration","scope":5036,"src":"796:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5016,"name":"int","nodeType":"ElementaryTypeName","src":"796:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5019,"name":"forwardedOutcomeSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"829:40:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5018,"name":"uint","nodeType":"ElementaryTypeName","src":"829:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5021,"name":"frontRunner","nodeType":"VariableDeclaration","scope":5036,"src":"875:22:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5020,"name":"int","nodeType":"ElementaryTypeName","src":"875:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5023,"name":"frontRunnerSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"903:35:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5022,"name":"uint","nodeType":"ElementaryTypeName","src":"903:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5025,"name":"totalAmount","nodeType":"VariableDeclaration","scope":5036,"src":"945:23:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5024,"name":"uint","nodeType":"ElementaryTypeName","src":"945:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5029,"name":"totalOutcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"974:48:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"typeName":{"id":5028,"keyType":{"id":5026,"name":"int","nodeType":"ElementaryTypeName","src":"983:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"974:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5027,"name":"uint","nodeType":"ElementaryTypeName","src":"990:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":5035,"name":"outcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"1028:64:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"typeName":{"id":5034,"keyType":{"id":5030,"name":"address","nodeType":"ElementaryTypeName","src":"1037:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1028:42:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"valueType":{"id":5033,"keyType":{"id":5031,"name":"int","nodeType":"ElementaryTypeName","src":"1057:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"1048:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5032,"name":"uint","nodeType":"ElementaryTypeName","src":"1064:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"}],"scope":5463,"src":"239:856:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5037,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1129:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5038,"nodeType":"InheritanceSpecifier","src":"1129:5:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5039,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"1136:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5040,"nodeType":"InheritanceSpecifier","src":"1136:18:25"}],"contractDependencies":[5036,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5116,"linearizedBaseContracts":[5116,5036,6701,6673],"name":"UltimateOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":5114,"nodeType":"Block","src":"1898:570:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5075,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5062,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"1954:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":5061,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1946:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1946:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1975:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1946:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5070,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5067,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2004:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":5066,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1996:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5068,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1996:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2025:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1996:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:80:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":5074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5072,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2046:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5073,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2067:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2046:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:122:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5076,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2088:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5077,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2107:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2088:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:162:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5080,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2128:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5081,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2147:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2128:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:202:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5084,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2168:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5085,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2189:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2168:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:244:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5060,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1935:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1935:256:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5089,"nodeType":"ExpressionStatement","src":"1935:256:25"},{"expression":{"argumentTypes":null,"id":5092,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5090,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"2201:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5091,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"2219:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"2201:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5093,"nodeType":"ExpressionStatement","src":"2201:34:25"},{"expression":{"argumentTypes":null,"id":5096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5094,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"2245:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5095,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2263:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"2245:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5097,"nodeType":"ExpressionStatement","src":"2245:34:25"},{"expression":{"argumentTypes":null,"id":5100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5098,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"2289:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5099,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2308:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2289:36:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":5101,"nodeType":"ExpressionStatement","src":"2289:36:25"},{"expression":{"argumentTypes":null,"id":5104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5102,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"2335:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5103,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2353:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2335:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5105,"nodeType":"ExpressionStatement","src":"2335:34:25"},{"expression":{"argumentTypes":null,"id":5108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5106,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"2379:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5107,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2397:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2379:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5109,"nodeType":"ExpressionStatement","src":"2379:34:25"},{"expression":{"argumentTypes":null,"id":5112,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5110,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"2423:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5111,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2443:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2423:38:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5113,"nodeType":"ExpressionStatement","src":"2423:38:25"}]},"documentation":"@dev Constructor sets ultimate oracle properties\n @param _forwardedOracle Oracle address\n @param _collateralToken Collateral token address\n @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n @param _challengePeriod Time to challenge oracle outcome\n @param _challengeAmount Amount to challenge the outcome\n @param _frontRunnerPeriod Time to overbid the front-runner","id":5115,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5057,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5042,"src":"1870:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5058,"modifierName":{"argumentTypes":null,"id":5056,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1864:5:25","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1864:14:25"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5042,"name":"proxied","nodeType":"VariableDeclaration","scope":5115,"src":"1641:15:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5041,"name":"address","nodeType":"ElementaryTypeName","src":"1641:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5044,"name":"_forwardedOracle","nodeType":"VariableDeclaration","scope":5115,"src":"1666:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5043,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1666:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5046,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":5115,"src":"1699:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5045,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1699:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5048,"name":"_spreadMultiplier","nodeType":"VariableDeclaration","scope":5115,"src":"1731:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5047,"name":"uint8","nodeType":"ElementaryTypeName","src":"1731:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5050,"name":"_challengePeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1764:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5049,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5052,"name":"_challengeAmount","nodeType":"VariableDeclaration","scope":5115,"src":"1795:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5051,"name":"uint","nodeType":"ElementaryTypeName","src":"1795:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5054,"name":"_frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1826:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5053,"name":"uint","nodeType":"ElementaryTypeName","src":"1826:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1631:224:25"},"payable":false,"returnParameters":{"id":5059,"nodeType":"ParameterList","parameters":[],"src":"1898:0:25"},"scope":5116,"src":"1620:848:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5463,"src":"1097:1373:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5117,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2640:7:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5118,"nodeType":"InheritanceSpecifier","src":"2640:7:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5119,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2649:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5120,"nodeType":"InheritanceSpecifier","src":"2649:6:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5121,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"2657:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5122,"nodeType":"InheritanceSpecifier","src":"2657:18:25"}],"contractDependencies":[4717,5036,6673],"contractKind":"contract","documentation":"@title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n @author Stefan George - ","fullyImplemented":true,"id":5462,"linearizedBaseContracts":[5462,5036,4717,6673],"name":"UltimateOracle","nodeType":"ContractDefinition","nodes":[{"id":5124,"libraryName":{"contractScope":null,"id":5123,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2688:8:25","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2682:21:25","typeName":null},{"body":{"id":5155,"nodeType":"Block","src":"2841:430:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5138,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5134,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2979:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5128,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"2980:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2980:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5133,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5131,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3014:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3046:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3014:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:68:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5135,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3067:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"3067:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":5137,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3067:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:118:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5127,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2968:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5139,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2968:130:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5140,"nodeType":"ExpressionStatement","src":"2968:130:25"},{"expression":{"argumentTypes":null,"id":5145,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5141,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3108:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5142,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3127:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5143,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"3127:26:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":5144,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3127:28:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3108:47:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5146,"nodeType":"ExpressionStatement","src":"3108:47:25"},{"expression":{"argumentTypes":null,"id":5149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5147,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3165:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5148,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3196:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3165:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5150,"nodeType":"ExpressionStatement","src":"3165:34:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5152,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3247:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5151,"name":"ForwardedOracleOutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4983,"src":"3214:32:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":5153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:50:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5154,"nodeType":"EmitStatement","src":"3209:55:25"}]},"documentation":"@dev Allows to set oracle outcome","id":5156,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setForwardedOutcome","nodeType":"FunctionDefinition","parameters":{"id":5125,"nodeType":"ParameterList","parameters":[],"src":"2819:2:25"},"payable":false,"returnParameters":{"id":5126,"nodeType":"ParameterList","parameters":[],"src":"2841:0:25"},"scope":5462,"src":"2791:480:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5212,"nodeType":"Block","src":"3430:525:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5176,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3521:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5162,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"3522:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3522:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3556:24:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5165,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"3557:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3557:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:59:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5171,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3629:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3629:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5173,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"3641:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5174,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3647:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5169,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"3600:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3600:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5175,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3600:63:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:142:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5161,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3510:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5177,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3510:154:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5178,"nodeType":"ExpressionStatement","src":"3510:154:25"},{"expression":{"argumentTypes":null,"id":5186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5179,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"3674:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5183,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5180,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3689:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3689:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3674:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5184,"indexExpression":{"argumentTypes":null,"id":5182,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3701:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3674:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5185,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3713:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3674:54:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5187,"nodeType":"ExpressionStatement","src":"3674:54:25"},{"expression":{"argumentTypes":null,"id":5192,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5188,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"3738:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5190,"indexExpression":{"argumentTypes":null,"id":5189,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3758:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3738:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5191,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3770:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3738:47:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5193,"nodeType":"ExpressionStatement","src":"3738:47:25"},{"expression":{"argumentTypes":null,"id":5196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5194,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"3795:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5195,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3809:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3795:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5197,"nodeType":"ExpressionStatement","src":"3795:29:25"},{"expression":{"argumentTypes":null,"id":5200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5198,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"3834:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5199,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3848:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3834:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5201,"nodeType":"ExpressionStatement","src":"3834:22:25"},{"expression":{"argumentTypes":null,"id":5204,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5202,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"3866:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5203,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3892:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3866:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5205,"nodeType":"ExpressionStatement","src":"3866:29:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5207,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3927:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3927:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5209,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3939:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5206,"name":"OutcomeChallenge","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4989,"src":"3910:16:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$returns$__$","typeString":"function (address,int256)"}},"id":5210,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3910:38:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5211,"nodeType":"EmitStatement","src":"3905:43:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on","id":5213,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"challengeOutcome","nodeType":"FunctionDefinition","parameters":{"id":5159,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5158,"name":"_outcome","nodeType":"VariableDeclaration","scope":5213,"src":"3397:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5157,"name":"int","nodeType":"ElementaryTypeName","src":"3397:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3396:14:25"},"payable":false,"returnParameters":{"id":5160,"nodeType":"ParameterList","parameters":[],"src":"3430:0:25"},"scope":5462,"src":"3371:584:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5336,"nodeType":"Block","src":"4161:1064:25","statements":[{"assignments":[5221],"declarations":[{"constant":false,"id":5221,"name":"maxAmount","nodeType":"VariableDeclaration","scope":5337,"src":"4171:14:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5220,"name":"uint","nodeType":"ElementaryTypeName","src":"4171:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5231,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5229,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"4238:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5222,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4189:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5223,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4203:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5225,"indexExpression":{"argumentTypes":null,"id":5224,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4223:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4203:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4189:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5227,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4188:45:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"4188:49:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5230,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4188:67:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"4171:84:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5232,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4270:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5233,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4282:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5235,"indexExpression":{"argumentTypes":null,"id":5234,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4302:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4282:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4270:41:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":5245,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5243,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4394:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5244,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4406:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4394:13:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5246,"nodeType":"ExpressionStatement","src":"4394:13:25"},"id":5247,"nodeType":"IfStatement","src":"4266:141:25","trueBody":{"expression":{"argumentTypes":null,"id":5241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5237,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4325:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5238,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4338:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5240,"indexExpression":{"argumentTypes":null,"id":5239,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4358:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4338:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4325:42:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5242,"nodeType":"ExpressionStatement","src":"4325:42:25"}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5248,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4422:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5249,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4431:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4422:18:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5255,"nodeType":"IfStatement","src":"4418:54:25","trueBody":{"expression":{"argumentTypes":null,"id":5253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5251,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4454:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5252,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4463:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4454:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5254,"nodeType":"ExpressionStatement","src":"4454:18:25"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5257,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"4596:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4596:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5261,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"4630:26:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5259,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"4631:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5260,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:60:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5265,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4705:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4705:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5267,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"4717:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5268,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4723:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5263,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"4676:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"4676:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4676:54:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:134:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5256,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4585:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5271,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4585:146:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5272,"nodeType":"ExpressionStatement","src":"4585:146:25"},{"expression":{"argumentTypes":null,"id":5288,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5273,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4741:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5277,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5274,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4756:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4756:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4741:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5278,"indexExpression":{"argumentTypes":null,"id":5276,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4768:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4741:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5286,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4821:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5279,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4780:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5282,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5280,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4795:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4795:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5284,"indexExpression":{"argumentTypes":null,"id":5283,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4807:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4780:40:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5287,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4780:48:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4741:87:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5289,"nodeType":"ExpressionStatement","src":"4741:87:25"},{"expression":{"argumentTypes":null,"id":5299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5290,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4838:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5292,"indexExpression":{"argumentTypes":null,"id":5291,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4858:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4838:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5297,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4904:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5293,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4870:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5295,"indexExpression":{"argumentTypes":null,"id":5294,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4890:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4870:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4870:33:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:41:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4838:73:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5300,"nodeType":"ExpressionStatement","src":"4838:73:25"},{"expression":{"argumentTypes":null,"id":5306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5301,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4921:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5304,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4951:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5302,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4935:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5303,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4935:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5305,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4935:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4921:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5307,"nodeType":"ExpressionStatement","src":"4921:37:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5318,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5310,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5308,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4972:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":5309,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"4984:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4972:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5311,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4999:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5313,"indexExpression":{"argumentTypes":null,"id":5312,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5019:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4999:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5314,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5031:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5316,"indexExpression":{"argumentTypes":null,"id":5315,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5051:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5031:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:64:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4972:91:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5328,"nodeType":"IfStatement","src":"4968:195:25","trueBody":{"id":5327,"nodeType":"Block","src":"5073:90:25","statements":[{"expression":{"argumentTypes":null,"id":5321,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5319,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5087:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5320,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5101:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5322,"nodeType":"ExpressionStatement","src":"5087:22:25"},{"expression":{"argumentTypes":null,"id":5325,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5323,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"5123:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5324,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5149:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5123:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5326,"nodeType":"ExpressionStatement","src":"5123:29:25"}]}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5330,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5189:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5331,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5189:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5332,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5201:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":5333,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"5211:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5329,"name":"OutcomeVote","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4997,"src":"5177:11:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256,uint256)"}},"id":5334,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5177:41:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5335,"nodeType":"EmitStatement","src":"5172:46:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on\n @param amount Amount to bid","id":5337,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"voteForOutcome","nodeType":"FunctionDefinition","parameters":{"id":5218,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5215,"name":"_outcome","nodeType":"VariableDeclaration","scope":5337,"src":"4115:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5214,"name":"int","nodeType":"ElementaryTypeName","src":"4115:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5217,"name":"amount","nodeType":"VariableDeclaration","scope":5337,"src":"4129:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5216,"name":"uint","nodeType":"ElementaryTypeName","src":"4129:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4114:27:25"},"payable":false,"returnParameters":{"id":5219,"nodeType":"ParameterList","parameters":[],"src":"4161:0:25"},"scope":5462,"src":"4091:1134:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5387,"nodeType":"Block","src":"5366:429:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5343,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"5447:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5344,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5447:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5342,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5439:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5345,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5439:34:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5346,"nodeType":"ExpressionStatement","src":"5439:34:25"},{"expression":{"argumentTypes":null,"id":5361,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5347,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5483:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5350,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5508:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5353,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5351,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5523:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5523:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5355,"indexExpression":{"argumentTypes":null,"id":5354,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5535:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5348,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"5492:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5349,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5492:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5492:56:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5357,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5551:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5359,"indexExpression":{"argumentTypes":null,"id":5358,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5571:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5551:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5492:91:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5483:100:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5362,"nodeType":"ExpressionStatement","src":"5483:100:25"},{"expression":{"argumentTypes":null,"id":5370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5363,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5593:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5367,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5364,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5608:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5608:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5593:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5368,"indexExpression":{"argumentTypes":null,"id":5366,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5620:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5593:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5369,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5635:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5593:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5371,"nodeType":"ExpressionStatement","src":"5593:43:25"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5375,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5723:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5376,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5723:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5377,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5735:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5373,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"5698:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5698:24:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":5378,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5698:44:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5372,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5690:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5379,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5690:53:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5380,"nodeType":"ExpressionStatement","src":"5690:53:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5382,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5769:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5383,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5769:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5384,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5781:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5381,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5003,"src":"5758:10:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5385,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5758:30:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5386,"nodeType":"EmitStatement","src":"5753:35:25"}]},"documentation":"@dev Withdraws winnings for user\n @return Winnings","id":5388,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":5338,"nodeType":"ParameterList","parameters":[],"src":"5314:2:25"},"payable":false,"returnParameters":{"id":5341,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5340,"name":"amount","nodeType":"VariableDeclaration","scope":5388,"src":"5349:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5339,"name":"uint","nodeType":"ElementaryTypeName","src":"5349:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5348:13:25"},"scope":5462,"src":"5297:498:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5404,"nodeType":"Block","src":"5992:116:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5393,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6009:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5394,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6041:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6009:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5398,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6054:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5396,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6046:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6046:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6046:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5400,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"6086:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6046:55:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6009:92:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5392,"id":5403,"nodeType":"Return","src":"6002:99:25"}]},"documentation":"@dev Checks if time to challenge the outcome is over\n @return Is challenge period over?","id":5405,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallengePeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5389,"nodeType":"ParameterList","parameters":[],"src":"5934:2:25"},"payable":false,"returnParameters":{"id":5392,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5391,"name":"","nodeType":"VariableDeclaration","scope":5405,"src":"5982:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5390,"name":"bool","nodeType":"ElementaryTypeName","src":"5982:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5981:6:25"},"scope":5462,"src":"5904:204:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5421,"nodeType":"Block","src":"6313:108:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5419,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5412,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5410,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6330:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5411,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6357:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6330:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5415,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6370:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5413,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6362:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6362:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5416,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6362:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5417,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"6397:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6362:52:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6330:84:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5409,"id":5420,"nodeType":"Return","src":"6323:91:25"}]},"documentation":"@dev Checks if time to overbid the front runner is over\n @return Is front runner period over?","id":5422,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isFrontRunnerPeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5406,"nodeType":"ParameterList","parameters":[],"src":"6255:2:25"},"payable":false,"returnParameters":{"id":5409,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5408,"name":"","nodeType":"VariableDeclaration","scope":5422,"src":"6303:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5407,"name":"bool","nodeType":"ElementaryTypeName","src":"6303:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6302:6:25"},"scope":5462,"src":"6223:198:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5431,"nodeType":"Block","src":"6583:52:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5427,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6600:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5428,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6627:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6600:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5426,"id":5430,"nodeType":"Return","src":"6593:35:25"}]},"documentation":"@dev Checks if outcome was challenged\n @return Is challenged?","id":5432,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallenged","nodeType":"FunctionDefinition","parameters":{"id":5423,"nodeType":"ParameterList","parameters":[],"src":"6525:2:25"},"payable":false,"returnParameters":{"id":5426,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5425,"name":"","nodeType":"VariableDeclaration","scope":5432,"src":"6573:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5424,"name":"bool","nodeType":"ElementaryTypeName","src":"6573:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6572:6:25"},"scope":5462,"src":"6504:131:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5447,"nodeType":"Block","src":"6799:113:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5445,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5442,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5437,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"6819:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6819:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"6846:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5439,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"6847:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5440,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6847:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:42:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5443,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"6880:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5444,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6880:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:86:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5436,"id":5446,"nodeType":"Return","src":"6809:96:25"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":5448,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":5433,"nodeType":"ParameterList","parameters":[],"src":"6741:2:25"},"payable":false,"returnParameters":{"id":5436,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5435,"name":"","nodeType":"VariableDeclaration","scope":5448,"src":"6789:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5434,"name":"bool","nodeType":"ElementaryTypeName","src":"6789:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6788:6:25"},"scope":5462,"src":"6720:192:25","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":5460,"nodeType":"Block","src":"7055:111:25","statements":[{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5453,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"7069:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7069:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5457,"nodeType":"IfStatement","src":"7065:61:25","trueBody":{"expression":{"argumentTypes":null,"id":5455,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"7115:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5456,"nodeType":"Return","src":"7108:18:25"}},{"expression":{"argumentTypes":null,"id":5458,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"7143:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5459,"nodeType":"Return","src":"7136:23:25"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":5461,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":5449,"nodeType":"ParameterList","parameters":[],"src":"6998:2:25"},"payable":false,"returnParameters":{"id":5452,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5451,"name":"","nodeType":"VariableDeclaration","scope":5461,"src":"7046:3:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5450,"name":"int","nodeType":"ElementaryTypeName","src":"7046:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7045:5:25"},"scope":5462,"src":"6979:187:25","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":5463,"src":"2613:4555:25"}],"src":"0:7169:25"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","exportedSymbols":{"UltimateOracle":[5462],"UltimateOracleData":[5036],"UltimateOracleProxy":[5116]},"id":5463,"nodeType":"SourceUnit","nodes":[{"id":4975,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:25"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4976,"nodeType":"ImportDirective","scope":5463,"sourceUnit":4718,"src":"25:31:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":4977,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7329,"src":"57:63:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":4978,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7190,"src":"121:59:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4979,"nodeType":"ImportDirective","scope":5463,"sourceUnit":6702,"src":"181:55:25","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5036,"linearizedBaseContracts":[5036],"name":"UltimateOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4983,"name":"ForwardedOracleOutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4982,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4981,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4983,"src":"343:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4980,"name":"int","nodeType":"ElementaryTypeName","src":"343:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"342:13:25"},"src":"304:52:25"},{"anonymous":false,"documentation":null,"id":4989,"name":"OutcomeChallenge","nodeType":"EventDefinition","parameters":{"id":4988,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4985,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4989,"src":"384:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4984,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4987,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4989,"src":"408:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4986,"name":"int","nodeType":"ElementaryTypeName","src":"408:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"383:37:25"},"src":"361:60:25"},{"anonymous":false,"documentation":null,"id":4997,"name":"OutcomeVote","nodeType":"EventDefinition","parameters":{"id":4996,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4991,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4997,"src":"444:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4990,"name":"address","nodeType":"ElementaryTypeName","src":"444:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4993,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4997,"src":"468:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4992,"name":"int","nodeType":"ElementaryTypeName","src":"468:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4995,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":4997,"src":"481:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4994,"name":"uint","nodeType":"ElementaryTypeName","src":"481:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"443:50:25"},"src":"426:68:25"},{"anonymous":false,"documentation":null,"id":5003,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":5002,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4999,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":5003,"src":"516:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4998,"name":"address","nodeType":"ElementaryTypeName","src":"516:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5001,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5003,"src":"540:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5000,"name":"uint","nodeType":"ElementaryTypeName","src":"540:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"515:37:25"},"src":"499:54:25"},{"constant":false,"id":5005,"name":"forwardedOracle","nodeType":"VariableDeclaration","scope":5036,"src":"590:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5004,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"590:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":5007,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5036,"src":"625:28:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5006,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"625:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":5009,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5036,"src":"659:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5008,"name":"uint8","nodeType":"ElementaryTypeName","src":"659:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"constant":false,"id":5011,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5036,"src":"694:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5010,"name":"uint","nodeType":"ElementaryTypeName","src":"694:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5013,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5036,"src":"727:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5012,"name":"uint","nodeType":"ElementaryTypeName","src":"727:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5015,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5036,"src":"760:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5014,"name":"uint","nodeType":"ElementaryTypeName","src":"760:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5017,"name":"forwardedOutcome","nodeType":"VariableDeclaration","scope":5036,"src":"796:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5016,"name":"int","nodeType":"ElementaryTypeName","src":"796:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5019,"name":"forwardedOutcomeSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"829:40:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5018,"name":"uint","nodeType":"ElementaryTypeName","src":"829:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5021,"name":"frontRunner","nodeType":"VariableDeclaration","scope":5036,"src":"875:22:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5020,"name":"int","nodeType":"ElementaryTypeName","src":"875:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5023,"name":"frontRunnerSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"903:35:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5022,"name":"uint","nodeType":"ElementaryTypeName","src":"903:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5025,"name":"totalAmount","nodeType":"VariableDeclaration","scope":5036,"src":"945:23:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5024,"name":"uint","nodeType":"ElementaryTypeName","src":"945:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5029,"name":"totalOutcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"974:48:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"typeName":{"id":5028,"keyType":{"id":5026,"name":"int","nodeType":"ElementaryTypeName","src":"983:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"974:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5027,"name":"uint","nodeType":"ElementaryTypeName","src":"990:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":5035,"name":"outcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"1028:64:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"typeName":{"id":5034,"keyType":{"id":5030,"name":"address","nodeType":"ElementaryTypeName","src":"1037:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1028:42:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"valueType":{"id":5033,"keyType":{"id":5031,"name":"int","nodeType":"ElementaryTypeName","src":"1057:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"1048:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5032,"name":"uint","nodeType":"ElementaryTypeName","src":"1064:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"}],"scope":5463,"src":"239:856:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5037,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1129:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5038,"nodeType":"InheritanceSpecifier","src":"1129:5:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5039,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"1136:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5040,"nodeType":"InheritanceSpecifier","src":"1136:18:25"}],"contractDependencies":[5036,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5116,"linearizedBaseContracts":[5116,5036,6701,6673],"name":"UltimateOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":5114,"nodeType":"Block","src":"1898:570:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5075,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5062,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"1954:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":5061,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1946:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1946:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1975:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1946:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5070,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5067,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2004:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":5066,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1996:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5068,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1996:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2025:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1996:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:80:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":5074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5072,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2046:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5073,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2067:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2046:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:122:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5076,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2088:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5077,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2107:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2088:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:162:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5080,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2128:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5081,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2147:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2128:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:202:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5084,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2168:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5085,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2189:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2168:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:244:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5060,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1935:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1935:256:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5089,"nodeType":"ExpressionStatement","src":"1935:256:25"},{"expression":{"argumentTypes":null,"id":5092,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5090,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"2201:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5091,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"2219:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"2201:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5093,"nodeType":"ExpressionStatement","src":"2201:34:25"},{"expression":{"argumentTypes":null,"id":5096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5094,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"2245:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5095,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2263:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"2245:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5097,"nodeType":"ExpressionStatement","src":"2245:34:25"},{"expression":{"argumentTypes":null,"id":5100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5098,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"2289:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5099,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2308:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2289:36:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":5101,"nodeType":"ExpressionStatement","src":"2289:36:25"},{"expression":{"argumentTypes":null,"id":5104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5102,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"2335:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5103,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2353:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2335:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5105,"nodeType":"ExpressionStatement","src":"2335:34:25"},{"expression":{"argumentTypes":null,"id":5108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5106,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"2379:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5107,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2397:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2379:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5109,"nodeType":"ExpressionStatement","src":"2379:34:25"},{"expression":{"argumentTypes":null,"id":5112,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5110,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"2423:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5111,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2443:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2423:38:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5113,"nodeType":"ExpressionStatement","src":"2423:38:25"}]},"documentation":"@dev Constructor sets ultimate oracle properties\n @param _forwardedOracle Oracle address\n @param _collateralToken Collateral token address\n @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n @param _challengePeriod Time to challenge oracle outcome\n @param _challengeAmount Amount to challenge the outcome\n @param _frontRunnerPeriod Time to overbid the front-runner","id":5115,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5057,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5042,"src":"1870:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5058,"modifierName":{"argumentTypes":null,"id":5056,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1864:5:25","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1864:14:25"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5042,"name":"proxied","nodeType":"VariableDeclaration","scope":5115,"src":"1641:15:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5041,"name":"address","nodeType":"ElementaryTypeName","src":"1641:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5044,"name":"_forwardedOracle","nodeType":"VariableDeclaration","scope":5115,"src":"1666:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5043,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1666:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5046,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":5115,"src":"1699:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5045,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1699:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5048,"name":"_spreadMultiplier","nodeType":"VariableDeclaration","scope":5115,"src":"1731:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5047,"name":"uint8","nodeType":"ElementaryTypeName","src":"1731:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5050,"name":"_challengePeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1764:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5049,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5052,"name":"_challengeAmount","nodeType":"VariableDeclaration","scope":5115,"src":"1795:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5051,"name":"uint","nodeType":"ElementaryTypeName","src":"1795:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5054,"name":"_frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1826:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5053,"name":"uint","nodeType":"ElementaryTypeName","src":"1826:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1631:224:25"},"payable":false,"returnParameters":{"id":5059,"nodeType":"ParameterList","parameters":[],"src":"1898:0:25"},"scope":5116,"src":"1620:848:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5463,"src":"1097:1373:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5117,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2640:7:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5118,"nodeType":"InheritanceSpecifier","src":"2640:7:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5119,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2649:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5120,"nodeType":"InheritanceSpecifier","src":"2649:6:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5121,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"2657:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5122,"nodeType":"InheritanceSpecifier","src":"2657:18:25"}],"contractDependencies":[4717,5036,6673],"contractKind":"contract","documentation":"@title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n @author Stefan George - ","fullyImplemented":true,"id":5462,"linearizedBaseContracts":[5462,5036,4717,6673],"name":"UltimateOracle","nodeType":"ContractDefinition","nodes":[{"id":5124,"libraryName":{"contractScope":null,"id":5123,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2688:8:25","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2682:21:25","typeName":null},{"body":{"id":5155,"nodeType":"Block","src":"2841:430:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5138,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5134,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2979:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5128,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"2980:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2980:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5133,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5131,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3014:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3046:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3014:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:68:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5135,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3067:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"3067:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":5137,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3067:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:118:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5127,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2968:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5139,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2968:130:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5140,"nodeType":"ExpressionStatement","src":"2968:130:25"},{"expression":{"argumentTypes":null,"id":5145,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5141,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3108:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5142,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3127:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5143,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"3127:26:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":5144,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3127:28:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3108:47:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5146,"nodeType":"ExpressionStatement","src":"3108:47:25"},{"expression":{"argumentTypes":null,"id":5149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5147,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3165:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5148,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3196:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3165:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5150,"nodeType":"ExpressionStatement","src":"3165:34:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5152,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3247:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5151,"name":"ForwardedOracleOutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4983,"src":"3214:32:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":5153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:50:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5154,"nodeType":"EmitStatement","src":"3209:55:25"}]},"documentation":"@dev Allows to set oracle outcome","id":5156,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setForwardedOutcome","nodeType":"FunctionDefinition","parameters":{"id":5125,"nodeType":"ParameterList","parameters":[],"src":"2819:2:25"},"payable":false,"returnParameters":{"id":5126,"nodeType":"ParameterList","parameters":[],"src":"2841:0:25"},"scope":5462,"src":"2791:480:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5212,"nodeType":"Block","src":"3430:525:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5176,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3521:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5162,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"3522:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3522:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3556:24:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5165,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"3557:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3557:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:59:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5171,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3629:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3629:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5173,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"3641:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5174,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3647:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5169,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"3600:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3600:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5175,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3600:63:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:142:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5161,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3510:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5177,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3510:154:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5178,"nodeType":"ExpressionStatement","src":"3510:154:25"},{"expression":{"argumentTypes":null,"id":5186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5179,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"3674:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5183,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5180,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3689:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3689:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3674:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5184,"indexExpression":{"argumentTypes":null,"id":5182,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3701:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3674:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5185,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3713:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3674:54:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5187,"nodeType":"ExpressionStatement","src":"3674:54:25"},{"expression":{"argumentTypes":null,"id":5192,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5188,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"3738:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5190,"indexExpression":{"argumentTypes":null,"id":5189,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3758:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3738:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5191,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3770:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3738:47:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5193,"nodeType":"ExpressionStatement","src":"3738:47:25"},{"expression":{"argumentTypes":null,"id":5196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5194,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"3795:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5195,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3809:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3795:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5197,"nodeType":"ExpressionStatement","src":"3795:29:25"},{"expression":{"argumentTypes":null,"id":5200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5198,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"3834:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5199,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3848:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3834:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5201,"nodeType":"ExpressionStatement","src":"3834:22:25"},{"expression":{"argumentTypes":null,"id":5204,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5202,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"3866:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5203,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3892:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3866:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5205,"nodeType":"ExpressionStatement","src":"3866:29:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5207,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3927:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3927:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5209,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3939:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5206,"name":"OutcomeChallenge","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4989,"src":"3910:16:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$returns$__$","typeString":"function (address,int256)"}},"id":5210,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3910:38:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5211,"nodeType":"EmitStatement","src":"3905:43:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on","id":5213,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"challengeOutcome","nodeType":"FunctionDefinition","parameters":{"id":5159,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5158,"name":"_outcome","nodeType":"VariableDeclaration","scope":5213,"src":"3397:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5157,"name":"int","nodeType":"ElementaryTypeName","src":"3397:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3396:14:25"},"payable":false,"returnParameters":{"id":5160,"nodeType":"ParameterList","parameters":[],"src":"3430:0:25"},"scope":5462,"src":"3371:584:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5336,"nodeType":"Block","src":"4161:1064:25","statements":[{"assignments":[5221],"declarations":[{"constant":false,"id":5221,"name":"maxAmount","nodeType":"VariableDeclaration","scope":5337,"src":"4171:14:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5220,"name":"uint","nodeType":"ElementaryTypeName","src":"4171:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5231,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5229,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"4238:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5222,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4189:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5223,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4203:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5225,"indexExpression":{"argumentTypes":null,"id":5224,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4223:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4203:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4189:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5227,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4188:45:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"4188:49:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5230,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4188:67:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"4171:84:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5232,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4270:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5233,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4282:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5235,"indexExpression":{"argumentTypes":null,"id":5234,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4302:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4282:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4270:41:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":5245,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5243,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4394:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5244,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4406:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4394:13:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5246,"nodeType":"ExpressionStatement","src":"4394:13:25"},"id":5247,"nodeType":"IfStatement","src":"4266:141:25","trueBody":{"expression":{"argumentTypes":null,"id":5241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5237,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4325:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5238,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4338:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5240,"indexExpression":{"argumentTypes":null,"id":5239,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4358:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4338:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4325:42:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5242,"nodeType":"ExpressionStatement","src":"4325:42:25"}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5248,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4422:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5249,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4431:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4422:18:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5255,"nodeType":"IfStatement","src":"4418:54:25","trueBody":{"expression":{"argumentTypes":null,"id":5253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5251,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4454:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5252,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4463:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4454:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5254,"nodeType":"ExpressionStatement","src":"4454:18:25"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5257,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"4596:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4596:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5261,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"4630:26:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5259,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"4631:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5260,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:60:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5265,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4705:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4705:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5267,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"4717:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5268,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4723:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5263,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"4676:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"4676:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4676:54:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:134:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5256,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4585:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5271,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4585:146:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5272,"nodeType":"ExpressionStatement","src":"4585:146:25"},{"expression":{"argumentTypes":null,"id":5288,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5273,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4741:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5277,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5274,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4756:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4756:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4741:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5278,"indexExpression":{"argumentTypes":null,"id":5276,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4768:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4741:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5286,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4821:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5279,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4780:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5282,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5280,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4795:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4795:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5284,"indexExpression":{"argumentTypes":null,"id":5283,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4807:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4780:40:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5287,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4780:48:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4741:87:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5289,"nodeType":"ExpressionStatement","src":"4741:87:25"},{"expression":{"argumentTypes":null,"id":5299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5290,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4838:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5292,"indexExpression":{"argumentTypes":null,"id":5291,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4858:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4838:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5297,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4904:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5293,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4870:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5295,"indexExpression":{"argumentTypes":null,"id":5294,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4890:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4870:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4870:33:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:41:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4838:73:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5300,"nodeType":"ExpressionStatement","src":"4838:73:25"},{"expression":{"argumentTypes":null,"id":5306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5301,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4921:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5304,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4951:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5302,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4935:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5303,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4935:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5305,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4935:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4921:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5307,"nodeType":"ExpressionStatement","src":"4921:37:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5318,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5310,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5308,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4972:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":5309,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"4984:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4972:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5311,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4999:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5313,"indexExpression":{"argumentTypes":null,"id":5312,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5019:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4999:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5314,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5031:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5316,"indexExpression":{"argumentTypes":null,"id":5315,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5051:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5031:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:64:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4972:91:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5328,"nodeType":"IfStatement","src":"4968:195:25","trueBody":{"id":5327,"nodeType":"Block","src":"5073:90:25","statements":[{"expression":{"argumentTypes":null,"id":5321,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5319,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5087:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5320,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5101:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5322,"nodeType":"ExpressionStatement","src":"5087:22:25"},{"expression":{"argumentTypes":null,"id":5325,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5323,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"5123:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5324,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5149:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5123:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5326,"nodeType":"ExpressionStatement","src":"5123:29:25"}]}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5330,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5189:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5331,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5189:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5332,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5201:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":5333,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"5211:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5329,"name":"OutcomeVote","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4997,"src":"5177:11:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256,uint256)"}},"id":5334,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5177:41:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5335,"nodeType":"EmitStatement","src":"5172:46:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on\n @param amount Amount to bid","id":5337,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"voteForOutcome","nodeType":"FunctionDefinition","parameters":{"id":5218,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5215,"name":"_outcome","nodeType":"VariableDeclaration","scope":5337,"src":"4115:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5214,"name":"int","nodeType":"ElementaryTypeName","src":"4115:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5217,"name":"amount","nodeType":"VariableDeclaration","scope":5337,"src":"4129:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5216,"name":"uint","nodeType":"ElementaryTypeName","src":"4129:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4114:27:25"},"payable":false,"returnParameters":{"id":5219,"nodeType":"ParameterList","parameters":[],"src":"4161:0:25"},"scope":5462,"src":"4091:1134:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5387,"nodeType":"Block","src":"5366:429:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5343,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"5447:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5344,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5447:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5342,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5439:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5345,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5439:34:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5346,"nodeType":"ExpressionStatement","src":"5439:34:25"},{"expression":{"argumentTypes":null,"id":5361,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5347,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5483:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5350,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5508:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5353,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5351,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5523:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5523:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5355,"indexExpression":{"argumentTypes":null,"id":5354,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5535:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5348,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"5492:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5349,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5492:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5492:56:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5357,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5551:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5359,"indexExpression":{"argumentTypes":null,"id":5358,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5571:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5551:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5492:91:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5483:100:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5362,"nodeType":"ExpressionStatement","src":"5483:100:25"},{"expression":{"argumentTypes":null,"id":5370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5363,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5593:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5367,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5364,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5608:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5608:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5593:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5368,"indexExpression":{"argumentTypes":null,"id":5366,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5620:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5593:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5369,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5635:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5593:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5371,"nodeType":"ExpressionStatement","src":"5593:43:25"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5375,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5723:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5376,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5723:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5377,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5735:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5373,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"5698:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5698:24:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":5378,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5698:44:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5372,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5690:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5379,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5690:53:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5380,"nodeType":"ExpressionStatement","src":"5690:53:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5382,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5769:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5383,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5769:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5384,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5781:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5381,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5003,"src":"5758:10:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5385,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5758:30:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5386,"nodeType":"EmitStatement","src":"5753:35:25"}]},"documentation":"@dev Withdraws winnings for user\n @return Winnings","id":5388,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":5338,"nodeType":"ParameterList","parameters":[],"src":"5314:2:25"},"payable":false,"returnParameters":{"id":5341,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5340,"name":"amount","nodeType":"VariableDeclaration","scope":5388,"src":"5349:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5339,"name":"uint","nodeType":"ElementaryTypeName","src":"5349:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5348:13:25"},"scope":5462,"src":"5297:498:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5404,"nodeType":"Block","src":"5992:116:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5393,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6009:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5394,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6041:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6009:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5398,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6054:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5396,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6046:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6046:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6046:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5400,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"6086:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6046:55:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6009:92:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5392,"id":5403,"nodeType":"Return","src":"6002:99:25"}]},"documentation":"@dev Checks if time to challenge the outcome is over\n @return Is challenge period over?","id":5405,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallengePeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5389,"nodeType":"ParameterList","parameters":[],"src":"5934:2:25"},"payable":false,"returnParameters":{"id":5392,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5391,"name":"","nodeType":"VariableDeclaration","scope":5405,"src":"5982:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5390,"name":"bool","nodeType":"ElementaryTypeName","src":"5982:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5981:6:25"},"scope":5462,"src":"5904:204:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5421,"nodeType":"Block","src":"6313:108:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5419,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5412,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5410,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6330:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5411,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6357:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6330:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5415,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6370:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5413,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6362:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6362:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5416,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6362:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5417,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"6397:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6362:52:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6330:84:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5409,"id":5420,"nodeType":"Return","src":"6323:91:25"}]},"documentation":"@dev Checks if time to overbid the front runner is over\n @return Is front runner period over?","id":5422,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isFrontRunnerPeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5406,"nodeType":"ParameterList","parameters":[],"src":"6255:2:25"},"payable":false,"returnParameters":{"id":5409,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5408,"name":"","nodeType":"VariableDeclaration","scope":5422,"src":"6303:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5407,"name":"bool","nodeType":"ElementaryTypeName","src":"6303:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6302:6:25"},"scope":5462,"src":"6223:198:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5431,"nodeType":"Block","src":"6583:52:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5427,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6600:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5428,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6627:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6600:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5426,"id":5430,"nodeType":"Return","src":"6593:35:25"}]},"documentation":"@dev Checks if outcome was challenged\n @return Is challenged?","id":5432,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallenged","nodeType":"FunctionDefinition","parameters":{"id":5423,"nodeType":"ParameterList","parameters":[],"src":"6525:2:25"},"payable":false,"returnParameters":{"id":5426,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5425,"name":"","nodeType":"VariableDeclaration","scope":5432,"src":"6573:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5424,"name":"bool","nodeType":"ElementaryTypeName","src":"6573:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6572:6:25"},"scope":5462,"src":"6504:131:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5447,"nodeType":"Block","src":"6799:113:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5445,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5442,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5437,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"6819:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6819:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"6846:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5439,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"6847:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5440,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6847:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:42:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5443,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"6880:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5444,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6880:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:86:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5436,"id":5446,"nodeType":"Return","src":"6809:96:25"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":5448,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":5433,"nodeType":"ParameterList","parameters":[],"src":"6741:2:25"},"payable":false,"returnParameters":{"id":5436,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5435,"name":"","nodeType":"VariableDeclaration","scope":5448,"src":"6789:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5434,"name":"bool","nodeType":"ElementaryTypeName","src":"6789:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6788:6:25"},"scope":5462,"src":"6720:192:25","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":5460,"nodeType":"Block","src":"7055:111:25","statements":[{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5453,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"7069:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7069:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5457,"nodeType":"IfStatement","src":"7065:61:25","trueBody":{"expression":{"argumentTypes":null,"id":5455,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"7115:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5456,"nodeType":"Return","src":"7108:18:25"}},{"expression":{"argumentTypes":null,"id":5458,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"7143:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5459,"nodeType":"Return","src":"7136:23:25"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":5461,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":5449,"nodeType":"ParameterList","parameters":[],"src":"6998:2:25"},"payable":false,"returnParameters":{"id":5452,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5451,"name":"","nodeType":"VariableDeclaration","scope":5461,"src":"7046:3:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5450,"name":"int","nodeType":"ElementaryTypeName","src":"7046:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7045:5:25"},"scope":5462,"src":"6979:187:25","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":5463,"src":"2613:4555:25"}],"src":"0:7169:25"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0x4cdc02b0903e971f359d8ed6664fbfc8928ea278","transactionHash":"0x8db17ef191873ed30a27432738d3c1d094f8ca95f83629381a38c0b9dfa62790"},"4":{"address":"0xba4376c3f8861e61b0a7232a4ee221c8d17c1f75","transactionHash":"0x41c4e37745993f550391d355241447f4fb747a0dbf83452b04bd5a6190dd9426"},"42":{"address":"0x7567fe7d9209fde48be05de707ce5a477b93242e","transactionHash":"0x7958ae454f8c4a6598c7f14d7aaa411cac05ca259f313f6216df2075ce7c5751"},"437894314312":{"address":"0x59d3631c86bbe35ef041872d502f218a39fba150","transactionHash":"0xcd8fb139c58fc7a02f89d4ff4227e7108e1ecdf135baf37703728250d09bc8b5"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.814Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleData.json": +/*!**************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleData.json ***! + \**************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"UltimateOracle","abi":[{"constant":true,"inputs":[],"name":"forwardedOracle","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"frontRunnerPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"frontRunner","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"isFrontRunnerPeriodOver","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"int256"}],"name":"totalOutcomeAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[{"name":"amount","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"forwardedOutcomeSetTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"isChallengePeriodOver","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"setForwardedOutcome","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"frontRunnerSetTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"forwardedOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"challengeAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"isChallenged","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_outcome","type":"int256"}],"name":"challengeOutcome","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"collateralToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"int256"}],"name":"outcomeAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isOutcomeSet","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"spreadMultiplier","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"challengePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_outcome","type":"int256"},{"name":"amount","type":"uint256"}],"name":"voteForOutcome","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_forwardedOracle","type":"address"},{"name":"_collateralToken","type":"address"},{"name":"_spreadMultiplier","type":"uint8"},{"name":"_challengePeriod","type":"uint256"},{"name":"_challengeAmount","type":"uint256"},{"name":"_frontRunnerPeriod","type":"uint256"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"ForwardedOracleOutcomeAssignment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeChallenge","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"outcome","type":"int256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"OutcomeVote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"}],"networks":{},"schema_version":"0.0.5","updated_at":1525713263312}; +module.exports = {"contractName":"UltimateOracleData","abi":[{"constant":true,"inputs":[],"name":"forwardedOracle","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunnerPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunner","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"int256"}],"name":"totalOutcomeAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"forwardedOutcomeSetTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunnerSetTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"forwardedOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"challengeAmount","outputs":[{"name":"","type":"uint256"}],"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":"","type":"address"},{"name":"","type":"int256"}],"name":"outcomeAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spreadMultiplier","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"challengePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"ForwardedOracleOutcomeAssignment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeChallenge","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"outcome","type":"int256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"OutcomeVote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b5061049a806100206000396000f3006080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063061a85c7146100ca5780630853f7eb146101215780630f3e94381461014c5780631a39d8ef146101775780631ff14311146101a2578063466ae314146101e35780638ef8125e1461020e578063984a470a146102395780639d89e7d414610264578063b2016bd41461028f578063c427af9b146102e6578063d84d2a4714610347578063f3f480d914610378575b600080fd5b3480156100d657600080fd5b506100df6103a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561012d57600080fd5b506101366103c8565b6040518082815260200191505060405180910390f35b34801561015857600080fd5b506101616103ce565b6040518082815260200191505060405180910390f35b34801561018357600080fd5b5061018c6103d4565b6040518082815260200191505060405180910390f35b3480156101ae57600080fd5b506101cd600480360381019080803590602001909291905050506103da565b6040518082815260200191505060405180910390f35b3480156101ef57600080fd5b506101f86103f2565b6040518082815260200191505060405180910390f35b34801561021a57600080fd5b506102236103f8565b6040518082815260200191505060405180910390f35b34801561024557600080fd5b5061024e6103fe565b6040518082815260200191505060405180910390f35b34801561027057600080fd5b50610279610404565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102a461040a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102f257600080fd5b50610331600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610430565b6040518082815260200191505060405180910390f35b34801561035357600080fd5b5061035c610455565b604051808260ff1660ff16815260200191505060405180910390f35b34801561038457600080fd5b5061038d610468565b6040518082815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60075481565b60095481565b600a6020528060005260406000206000915090505481565b60065481565b60085481565b60055481565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b602052816000526040600020602052806000526040600020600091509150505481565b600160149054906101000a900460ff1681565b600254815600a165627a7a72305820d329d941dfae55c073cbd477ef66514b6529949b6935243b3888292bfe1deea80029","deployedBytecode":"0x6080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063061a85c7146100ca5780630853f7eb146101215780630f3e94381461014c5780631a39d8ef146101775780631ff14311146101a2578063466ae314146101e35780638ef8125e1461020e578063984a470a146102395780639d89e7d414610264578063b2016bd41461028f578063c427af9b146102e6578063d84d2a4714610347578063f3f480d914610378575b600080fd5b3480156100d657600080fd5b506100df6103a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561012d57600080fd5b506101366103c8565b6040518082815260200191505060405180910390f35b34801561015857600080fd5b506101616103ce565b6040518082815260200191505060405180910390f35b34801561018357600080fd5b5061018c6103d4565b6040518082815260200191505060405180910390f35b3480156101ae57600080fd5b506101cd600480360381019080803590602001909291905050506103da565b6040518082815260200191505060405180910390f35b3480156101ef57600080fd5b506101f86103f2565b6040518082815260200191505060405180910390f35b34801561021a57600080fd5b506102236103f8565b6040518082815260200191505060405180910390f35b34801561024557600080fd5b5061024e6103fe565b6040518082815260200191505060405180910390f35b34801561027057600080fd5b50610279610404565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102a461040a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102f257600080fd5b50610331600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610430565b6040518082815260200191505060405180910390f35b34801561035357600080fd5b5061035c610455565b604051808260ff1660ff16815260200191505060405180910390f35b34801561038457600080fd5b5061038d610468565b6040518082815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60075481565b60095481565b600a6020528060005260406000206000915090505481565b60065481565b60085481565b60055481565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b602052816000526040600020602052806000526040600020600091509150505481565b600160149054906101000a900460ff1681565b600254815600a165627a7a72305820d329d941dfae55c073cbd477ef66514b6529949b6935243b3888292bfe1deea80029","sourceMap":"239:856:25:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;239:856:25;;;;;;;","deployedSourceMap":"239:856:25:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;590:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;590:29:25;;;;;;;;;;;;;;;;;;;;;;;;;;;760;;8:9:-1;5:2;;;30:1;27;20:12;5:2;760:29:25;;;;;;;;;;;;;;;;;;;;;;;875:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;875:22:25;;;;;;;;;;;;;;;;;;;;;;;945:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;945:23:25;;;;;;;;;;;;;;;;;;;;;;;974:48;;8:9:-1;5:2;;;30:1;27;20:12;5:2;974:48:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;829:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;829:40:25;;;;;;;;;;;;;;;;;;;;;;;903:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;903:35:25;;;;;;;;;;;;;;;;;;;;;;;796:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;796:27:25;;;;;;;;;;;;;;;;;;;;;;;727;;8:9:-1;5:2;;;30:1;27;20:12;5:2;727:27:25;;;;;;;;;;;;;;;;;;;;;;;625:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;625:28:25;;;;;;;;;;;;;;;;;;;;;;;;;;;1028:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1028:64:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;659:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;659:29:25;;;;;;;;;;;;;;;;;;;;;;;;;;;694:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;694:27:25;;;;;;;;;;;;;;;;;;;;;;;590:29;;;;;;;;;;;;;:::o;760:::-;;;;:::o;875:22::-;;;;:::o;945:23::-;;;;:::o;974:48::-;;;;;;;;;;;;;;;;;:::o;829:40::-;;;;:::o;903:35::-;;;;:::o;796:27::-;;;;:::o;727:::-;;;;:::o;625:28::-;;;;;;;;;;;;;:::o;1028:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;659:29::-;;;;;;;;;;;;;:::o;694:27::-;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract UltimateOracleData {\n\n /*\n * Events\n */\n event ForwardedOracleOutcomeAssignment(int outcome);\n event OutcomeChallenge(address indexed sender, int outcome);\n event OutcomeVote(address indexed sender, int outcome, uint amount);\n event Withdrawal(address indexed sender, uint amount);\n\n /*\n * Storage\n */\n Oracle public forwardedOracle;\n ERC20 public collateralToken;\n uint8 public spreadMultiplier;\n uint public challengePeriod;\n uint public challengeAmount;\n uint public frontRunnerPeriod;\n\n int public forwardedOutcome;\n uint public forwardedOutcomeSetTimestamp;\n int public frontRunner;\n uint public frontRunnerSetTimestamp;\n\n uint public totalAmount;\n mapping (int => uint) public totalOutcomeAmounts;\n mapping (address => mapping (int => uint)) public outcomeAmounts;\n}\n\ncontract UltimateOracleProxy is Proxy, UltimateOracleData {\n\n /// @dev Constructor sets ultimate oracle properties\n /// @param _forwardedOracle Oracle address\n /// @param _collateralToken Collateral token address\n /// @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n /// @param _challengePeriod Time to challenge oracle outcome\n /// @param _challengeAmount Amount to challenge the outcome\n /// @param _frontRunnerPeriod Time to overbid the front-runner\n constructor(\n address proxied,\n Oracle _forwardedOracle,\n ERC20 _collateralToken,\n uint8 _spreadMultiplier,\n uint _challengePeriod,\n uint _challengeAmount,\n uint _frontRunnerPeriod\n )\n Proxy(proxied)\n public\n {\n // Validate inputs\n require( address(_forwardedOracle) != 0\n && address(_collateralToken) != 0\n && _spreadMultiplier >= 2\n && _challengePeriod > 0\n && _challengeAmount > 0\n && _frontRunnerPeriod > 0);\n forwardedOracle = _forwardedOracle;\n collateralToken = _collateralToken;\n spreadMultiplier = _spreadMultiplier;\n challengePeriod = _challengePeriod;\n challengeAmount = _challengeAmount;\n frontRunnerPeriod = _frontRunnerPeriod;\n }\n}\n\n/// @title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n/// @author Stefan George - \ncontract UltimateOracle is Proxied, Oracle, UltimateOracleData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Allows to set oracle outcome\n function setForwardedOutcome()\n public\n {\n // There was no challenge and the outcome was not set yet in the ultimate oracle but in the forwarded oracle\n require( !isChallenged()\n && forwardedOutcomeSetTimestamp == 0\n && forwardedOracle.isOutcomeSet());\n forwardedOutcome = forwardedOracle.getOutcome();\n forwardedOutcomeSetTimestamp = now;\n emit ForwardedOracleOutcomeAssignment(forwardedOutcome);\n }\n\n /// @dev Allows to challenge the oracle outcome\n /// @param _outcome Outcome to bid on\n function challengeOutcome(int _outcome)\n public\n {\n // There was no challenge yet or the challenge period expired\n require( !isChallenged()\n && !isChallengePeriodOver()\n && collateralToken.transferFrom(msg.sender, this, challengeAmount));\n outcomeAmounts[msg.sender][_outcome] = challengeAmount;\n totalOutcomeAmounts[_outcome] = challengeAmount;\n totalAmount = challengeAmount;\n frontRunner = _outcome;\n frontRunnerSetTimestamp = now;\n emit OutcomeChallenge(msg.sender, _outcome);\n }\n\n /// @dev Allows to challenge the oracle outcome\n /// @param _outcome Outcome to bid on\n /// @param amount Amount to bid\n function voteForOutcome(int _outcome, uint amount)\n public\n {\n uint maxAmount = (totalAmount - totalOutcomeAmounts[_outcome]).mul(spreadMultiplier);\n\n if (maxAmount > totalOutcomeAmounts[_outcome])\n maxAmount -= totalOutcomeAmounts[_outcome];\n else\n maxAmount = 0;\n\n if (amount > maxAmount)\n amount = maxAmount;\n // Outcome is challenged and front runner period is not over yet and tokens can be transferred\n require( isChallenged()\n && !isFrontRunnerPeriodOver()\n && collateralToken.transferFrom(msg.sender, this, amount));\n outcomeAmounts[msg.sender][_outcome] = outcomeAmounts[msg.sender][_outcome].add(amount);\n totalOutcomeAmounts[_outcome] = totalOutcomeAmounts[_outcome].add(amount);\n totalAmount = totalAmount.add(amount);\n if (_outcome != frontRunner && totalOutcomeAmounts[_outcome] > totalOutcomeAmounts[frontRunner])\n {\n frontRunner = _outcome;\n frontRunnerSetTimestamp = now;\n }\n emit OutcomeVote(msg.sender, _outcome, amount);\n }\n\n /// @dev Withdraws winnings for user\n /// @return Winnings\n function withdraw()\n public\n returns (uint amount)\n {\n // Outcome was challenged and ultimate outcome decided\n require(isFrontRunnerPeriodOver());\n amount = totalAmount.mul(outcomeAmounts[msg.sender][frontRunner]) / totalOutcomeAmounts[frontRunner];\n outcomeAmounts[msg.sender][frontRunner] = 0;\n // Transfer earnings to contributor\n require(collateralToken.transfer(msg.sender, amount));\n emit Withdrawal(msg.sender, amount);\n }\n\n /// @dev Checks if time to challenge the outcome is over\n /// @return Is challenge period over?\n function isChallengePeriodOver()\n public\n view\n returns (bool)\n {\n return forwardedOutcomeSetTimestamp != 0 && now.sub(forwardedOutcomeSetTimestamp) > challengePeriod;\n }\n\n /// @dev Checks if time to overbid the front runner is over\n /// @return Is front runner period over?\n function isFrontRunnerPeriodOver()\n public\n view\n returns (bool)\n {\n return frontRunnerSetTimestamp != 0 && now.sub(frontRunnerSetTimestamp) > frontRunnerPeriod;\n }\n\n /// @dev Checks if outcome was challenged\n /// @return Is challenged?\n function isChallenged()\n public\n view\n returns (bool)\n {\n return frontRunnerSetTimestamp != 0;\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isChallengePeriodOver() && !isChallenged()\n || isFrontRunnerPeriodOver();\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n if (isFrontRunnerPeriodOver())\n return frontRunner;\n return forwardedOutcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","exportedSymbols":{"UltimateOracle":[5462],"UltimateOracleData":[5036],"UltimateOracleProxy":[5116]},"id":5463,"nodeType":"SourceUnit","nodes":[{"id":4975,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:25"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4976,"nodeType":"ImportDirective","scope":5463,"sourceUnit":4718,"src":"25:31:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":4977,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7329,"src":"57:63:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":4978,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7190,"src":"121:59:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4979,"nodeType":"ImportDirective","scope":5463,"sourceUnit":6702,"src":"181:55:25","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5036,"linearizedBaseContracts":[5036],"name":"UltimateOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4983,"name":"ForwardedOracleOutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4982,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4981,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4983,"src":"343:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4980,"name":"int","nodeType":"ElementaryTypeName","src":"343:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"342:13:25"},"src":"304:52:25"},{"anonymous":false,"documentation":null,"id":4989,"name":"OutcomeChallenge","nodeType":"EventDefinition","parameters":{"id":4988,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4985,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4989,"src":"384:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4984,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4987,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4989,"src":"408:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4986,"name":"int","nodeType":"ElementaryTypeName","src":"408:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"383:37:25"},"src":"361:60:25"},{"anonymous":false,"documentation":null,"id":4997,"name":"OutcomeVote","nodeType":"EventDefinition","parameters":{"id":4996,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4991,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4997,"src":"444:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4990,"name":"address","nodeType":"ElementaryTypeName","src":"444:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4993,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4997,"src":"468:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4992,"name":"int","nodeType":"ElementaryTypeName","src":"468:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4995,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":4997,"src":"481:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4994,"name":"uint","nodeType":"ElementaryTypeName","src":"481:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"443:50:25"},"src":"426:68:25"},{"anonymous":false,"documentation":null,"id":5003,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":5002,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4999,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":5003,"src":"516:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4998,"name":"address","nodeType":"ElementaryTypeName","src":"516:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5001,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5003,"src":"540:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5000,"name":"uint","nodeType":"ElementaryTypeName","src":"540:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"515:37:25"},"src":"499:54:25"},{"constant":false,"id":5005,"name":"forwardedOracle","nodeType":"VariableDeclaration","scope":5036,"src":"590:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5004,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"590:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":5007,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5036,"src":"625:28:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5006,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"625:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":5009,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5036,"src":"659:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5008,"name":"uint8","nodeType":"ElementaryTypeName","src":"659:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"constant":false,"id":5011,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5036,"src":"694:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5010,"name":"uint","nodeType":"ElementaryTypeName","src":"694:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5013,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5036,"src":"727:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5012,"name":"uint","nodeType":"ElementaryTypeName","src":"727:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5015,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5036,"src":"760:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5014,"name":"uint","nodeType":"ElementaryTypeName","src":"760:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5017,"name":"forwardedOutcome","nodeType":"VariableDeclaration","scope":5036,"src":"796:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5016,"name":"int","nodeType":"ElementaryTypeName","src":"796:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5019,"name":"forwardedOutcomeSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"829:40:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5018,"name":"uint","nodeType":"ElementaryTypeName","src":"829:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5021,"name":"frontRunner","nodeType":"VariableDeclaration","scope":5036,"src":"875:22:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5020,"name":"int","nodeType":"ElementaryTypeName","src":"875:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5023,"name":"frontRunnerSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"903:35:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5022,"name":"uint","nodeType":"ElementaryTypeName","src":"903:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5025,"name":"totalAmount","nodeType":"VariableDeclaration","scope":5036,"src":"945:23:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5024,"name":"uint","nodeType":"ElementaryTypeName","src":"945:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5029,"name":"totalOutcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"974:48:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"typeName":{"id":5028,"keyType":{"id":5026,"name":"int","nodeType":"ElementaryTypeName","src":"983:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"974:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5027,"name":"uint","nodeType":"ElementaryTypeName","src":"990:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":5035,"name":"outcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"1028:64:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"typeName":{"id":5034,"keyType":{"id":5030,"name":"address","nodeType":"ElementaryTypeName","src":"1037:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1028:42:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"valueType":{"id":5033,"keyType":{"id":5031,"name":"int","nodeType":"ElementaryTypeName","src":"1057:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"1048:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5032,"name":"uint","nodeType":"ElementaryTypeName","src":"1064:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"}],"scope":5463,"src":"239:856:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5037,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1129:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5038,"nodeType":"InheritanceSpecifier","src":"1129:5:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5039,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"1136:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5040,"nodeType":"InheritanceSpecifier","src":"1136:18:25"}],"contractDependencies":[5036,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5116,"linearizedBaseContracts":[5116,5036,6701,6673],"name":"UltimateOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":5114,"nodeType":"Block","src":"1898:570:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5075,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5062,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"1954:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":5061,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1946:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1946:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1975:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1946:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5070,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5067,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2004:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":5066,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1996:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5068,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1996:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2025:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1996:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:80:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":5074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5072,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2046:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5073,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2067:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2046:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:122:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5076,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2088:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5077,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2107:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2088:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:162:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5080,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2128:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5081,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2147:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2128:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:202:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5084,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2168:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5085,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2189:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2168:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:244:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5060,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1935:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1935:256:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5089,"nodeType":"ExpressionStatement","src":"1935:256:25"},{"expression":{"argumentTypes":null,"id":5092,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5090,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"2201:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5091,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"2219:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"2201:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5093,"nodeType":"ExpressionStatement","src":"2201:34:25"},{"expression":{"argumentTypes":null,"id":5096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5094,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"2245:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5095,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2263:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"2245:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5097,"nodeType":"ExpressionStatement","src":"2245:34:25"},{"expression":{"argumentTypes":null,"id":5100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5098,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"2289:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5099,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2308:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2289:36:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":5101,"nodeType":"ExpressionStatement","src":"2289:36:25"},{"expression":{"argumentTypes":null,"id":5104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5102,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"2335:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5103,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2353:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2335:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5105,"nodeType":"ExpressionStatement","src":"2335:34:25"},{"expression":{"argumentTypes":null,"id":5108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5106,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"2379:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5107,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2397:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2379:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5109,"nodeType":"ExpressionStatement","src":"2379:34:25"},{"expression":{"argumentTypes":null,"id":5112,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5110,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"2423:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5111,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2443:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2423:38:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5113,"nodeType":"ExpressionStatement","src":"2423:38:25"}]},"documentation":"@dev Constructor sets ultimate oracle properties\n @param _forwardedOracle Oracle address\n @param _collateralToken Collateral token address\n @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n @param _challengePeriod Time to challenge oracle outcome\n @param _challengeAmount Amount to challenge the outcome\n @param _frontRunnerPeriod Time to overbid the front-runner","id":5115,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5057,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5042,"src":"1870:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5058,"modifierName":{"argumentTypes":null,"id":5056,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1864:5:25","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1864:14:25"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5042,"name":"proxied","nodeType":"VariableDeclaration","scope":5115,"src":"1641:15:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5041,"name":"address","nodeType":"ElementaryTypeName","src":"1641:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5044,"name":"_forwardedOracle","nodeType":"VariableDeclaration","scope":5115,"src":"1666:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5043,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1666:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5046,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":5115,"src":"1699:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5045,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1699:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5048,"name":"_spreadMultiplier","nodeType":"VariableDeclaration","scope":5115,"src":"1731:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5047,"name":"uint8","nodeType":"ElementaryTypeName","src":"1731:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5050,"name":"_challengePeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1764:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5049,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5052,"name":"_challengeAmount","nodeType":"VariableDeclaration","scope":5115,"src":"1795:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5051,"name":"uint","nodeType":"ElementaryTypeName","src":"1795:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5054,"name":"_frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1826:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5053,"name":"uint","nodeType":"ElementaryTypeName","src":"1826:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1631:224:25"},"payable":false,"returnParameters":{"id":5059,"nodeType":"ParameterList","parameters":[],"src":"1898:0:25"},"scope":5116,"src":"1620:848:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5463,"src":"1097:1373:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5117,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2640:7:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5118,"nodeType":"InheritanceSpecifier","src":"2640:7:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5119,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2649:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5120,"nodeType":"InheritanceSpecifier","src":"2649:6:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5121,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"2657:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5122,"nodeType":"InheritanceSpecifier","src":"2657:18:25"}],"contractDependencies":[4717,5036,6673],"contractKind":"contract","documentation":"@title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n @author Stefan George - ","fullyImplemented":true,"id":5462,"linearizedBaseContracts":[5462,5036,4717,6673],"name":"UltimateOracle","nodeType":"ContractDefinition","nodes":[{"id":5124,"libraryName":{"contractScope":null,"id":5123,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2688:8:25","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2682:21:25","typeName":null},{"body":{"id":5155,"nodeType":"Block","src":"2841:430:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5138,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5134,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2979:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5128,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"2980:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2980:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5133,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5131,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3014:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3046:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3014:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:68:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5135,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3067:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"3067:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":5137,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3067:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:118:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5127,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2968:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5139,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2968:130:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5140,"nodeType":"ExpressionStatement","src":"2968:130:25"},{"expression":{"argumentTypes":null,"id":5145,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5141,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3108:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5142,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3127:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5143,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"3127:26:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":5144,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3127:28:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3108:47:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5146,"nodeType":"ExpressionStatement","src":"3108:47:25"},{"expression":{"argumentTypes":null,"id":5149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5147,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3165:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5148,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3196:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3165:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5150,"nodeType":"ExpressionStatement","src":"3165:34:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5152,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3247:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5151,"name":"ForwardedOracleOutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4983,"src":"3214:32:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":5153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:50:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5154,"nodeType":"EmitStatement","src":"3209:55:25"}]},"documentation":"@dev Allows to set oracle outcome","id":5156,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setForwardedOutcome","nodeType":"FunctionDefinition","parameters":{"id":5125,"nodeType":"ParameterList","parameters":[],"src":"2819:2:25"},"payable":false,"returnParameters":{"id":5126,"nodeType":"ParameterList","parameters":[],"src":"2841:0:25"},"scope":5462,"src":"2791:480:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5212,"nodeType":"Block","src":"3430:525:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5176,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3521:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5162,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"3522:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3522:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3556:24:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5165,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"3557:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3557:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:59:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5171,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3629:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3629:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5173,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"3641:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5174,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3647:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5169,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"3600:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3600:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5175,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3600:63:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:142:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5161,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3510:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5177,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3510:154:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5178,"nodeType":"ExpressionStatement","src":"3510:154:25"},{"expression":{"argumentTypes":null,"id":5186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5179,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"3674:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5183,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5180,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3689:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3689:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3674:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5184,"indexExpression":{"argumentTypes":null,"id":5182,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3701:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3674:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5185,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3713:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3674:54:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5187,"nodeType":"ExpressionStatement","src":"3674:54:25"},{"expression":{"argumentTypes":null,"id":5192,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5188,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"3738:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5190,"indexExpression":{"argumentTypes":null,"id":5189,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3758:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3738:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5191,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3770:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3738:47:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5193,"nodeType":"ExpressionStatement","src":"3738:47:25"},{"expression":{"argumentTypes":null,"id":5196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5194,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"3795:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5195,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3809:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3795:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5197,"nodeType":"ExpressionStatement","src":"3795:29:25"},{"expression":{"argumentTypes":null,"id":5200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5198,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"3834:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5199,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3848:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3834:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5201,"nodeType":"ExpressionStatement","src":"3834:22:25"},{"expression":{"argumentTypes":null,"id":5204,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5202,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"3866:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5203,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3892:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3866:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5205,"nodeType":"ExpressionStatement","src":"3866:29:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5207,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3927:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3927:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5209,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3939:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5206,"name":"OutcomeChallenge","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4989,"src":"3910:16:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$returns$__$","typeString":"function (address,int256)"}},"id":5210,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3910:38:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5211,"nodeType":"EmitStatement","src":"3905:43:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on","id":5213,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"challengeOutcome","nodeType":"FunctionDefinition","parameters":{"id":5159,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5158,"name":"_outcome","nodeType":"VariableDeclaration","scope":5213,"src":"3397:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5157,"name":"int","nodeType":"ElementaryTypeName","src":"3397:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3396:14:25"},"payable":false,"returnParameters":{"id":5160,"nodeType":"ParameterList","parameters":[],"src":"3430:0:25"},"scope":5462,"src":"3371:584:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5336,"nodeType":"Block","src":"4161:1064:25","statements":[{"assignments":[5221],"declarations":[{"constant":false,"id":5221,"name":"maxAmount","nodeType":"VariableDeclaration","scope":5337,"src":"4171:14:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5220,"name":"uint","nodeType":"ElementaryTypeName","src":"4171:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5231,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5229,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"4238:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5222,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4189:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5223,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4203:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5225,"indexExpression":{"argumentTypes":null,"id":5224,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4223:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4203:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4189:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5227,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4188:45:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"4188:49:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5230,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4188:67:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"4171:84:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5232,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4270:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5233,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4282:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5235,"indexExpression":{"argumentTypes":null,"id":5234,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4302:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4282:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4270:41:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":5245,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5243,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4394:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5244,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4406:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4394:13:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5246,"nodeType":"ExpressionStatement","src":"4394:13:25"},"id":5247,"nodeType":"IfStatement","src":"4266:141:25","trueBody":{"expression":{"argumentTypes":null,"id":5241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5237,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4325:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5238,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4338:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5240,"indexExpression":{"argumentTypes":null,"id":5239,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4358:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4338:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4325:42:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5242,"nodeType":"ExpressionStatement","src":"4325:42:25"}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5248,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4422:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5249,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4431:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4422:18:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5255,"nodeType":"IfStatement","src":"4418:54:25","trueBody":{"expression":{"argumentTypes":null,"id":5253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5251,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4454:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5252,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4463:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4454:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5254,"nodeType":"ExpressionStatement","src":"4454:18:25"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5257,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"4596:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4596:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5261,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"4630:26:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5259,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"4631:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5260,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:60:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5265,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4705:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4705:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5267,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"4717:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5268,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4723:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5263,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"4676:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"4676:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4676:54:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:134:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5256,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4585:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5271,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4585:146:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5272,"nodeType":"ExpressionStatement","src":"4585:146:25"},{"expression":{"argumentTypes":null,"id":5288,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5273,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4741:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5277,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5274,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4756:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4756:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4741:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5278,"indexExpression":{"argumentTypes":null,"id":5276,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4768:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4741:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5286,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4821:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5279,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4780:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5282,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5280,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4795:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4795:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5284,"indexExpression":{"argumentTypes":null,"id":5283,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4807:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4780:40:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5287,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4780:48:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4741:87:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5289,"nodeType":"ExpressionStatement","src":"4741:87:25"},{"expression":{"argumentTypes":null,"id":5299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5290,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4838:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5292,"indexExpression":{"argumentTypes":null,"id":5291,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4858:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4838:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5297,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4904:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5293,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4870:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5295,"indexExpression":{"argumentTypes":null,"id":5294,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4890:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4870:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4870:33:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:41:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4838:73:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5300,"nodeType":"ExpressionStatement","src":"4838:73:25"},{"expression":{"argumentTypes":null,"id":5306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5301,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4921:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5304,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4951:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5302,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4935:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5303,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4935:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5305,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4935:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4921:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5307,"nodeType":"ExpressionStatement","src":"4921:37:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5318,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5310,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5308,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4972:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":5309,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"4984:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4972:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5311,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4999:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5313,"indexExpression":{"argumentTypes":null,"id":5312,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5019:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4999:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5314,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5031:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5316,"indexExpression":{"argumentTypes":null,"id":5315,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5051:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5031:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:64:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4972:91:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5328,"nodeType":"IfStatement","src":"4968:195:25","trueBody":{"id":5327,"nodeType":"Block","src":"5073:90:25","statements":[{"expression":{"argumentTypes":null,"id":5321,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5319,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5087:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5320,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5101:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5322,"nodeType":"ExpressionStatement","src":"5087:22:25"},{"expression":{"argumentTypes":null,"id":5325,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5323,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"5123:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5324,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5149:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5123:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5326,"nodeType":"ExpressionStatement","src":"5123:29:25"}]}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5330,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5189:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5331,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5189:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5332,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5201:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":5333,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"5211:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5329,"name":"OutcomeVote","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4997,"src":"5177:11:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256,uint256)"}},"id":5334,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5177:41:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5335,"nodeType":"EmitStatement","src":"5172:46:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on\n @param amount Amount to bid","id":5337,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"voteForOutcome","nodeType":"FunctionDefinition","parameters":{"id":5218,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5215,"name":"_outcome","nodeType":"VariableDeclaration","scope":5337,"src":"4115:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5214,"name":"int","nodeType":"ElementaryTypeName","src":"4115:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5217,"name":"amount","nodeType":"VariableDeclaration","scope":5337,"src":"4129:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5216,"name":"uint","nodeType":"ElementaryTypeName","src":"4129:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4114:27:25"},"payable":false,"returnParameters":{"id":5219,"nodeType":"ParameterList","parameters":[],"src":"4161:0:25"},"scope":5462,"src":"4091:1134:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5387,"nodeType":"Block","src":"5366:429:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5343,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"5447:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5344,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5447:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5342,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5439:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5345,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5439:34:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5346,"nodeType":"ExpressionStatement","src":"5439:34:25"},{"expression":{"argumentTypes":null,"id":5361,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5347,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5483:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5350,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5508:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5353,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5351,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5523:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5523:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5355,"indexExpression":{"argumentTypes":null,"id":5354,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5535:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5348,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"5492:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5349,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5492:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5492:56:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5357,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5551:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5359,"indexExpression":{"argumentTypes":null,"id":5358,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5571:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5551:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5492:91:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5483:100:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5362,"nodeType":"ExpressionStatement","src":"5483:100:25"},{"expression":{"argumentTypes":null,"id":5370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5363,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5593:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5367,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5364,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5608:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5608:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5593:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5368,"indexExpression":{"argumentTypes":null,"id":5366,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5620:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5593:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5369,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5635:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5593:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5371,"nodeType":"ExpressionStatement","src":"5593:43:25"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5375,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5723:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5376,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5723:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5377,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5735:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5373,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"5698:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5698:24:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":5378,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5698:44:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5372,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5690:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5379,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5690:53:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5380,"nodeType":"ExpressionStatement","src":"5690:53:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5382,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5769:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5383,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5769:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5384,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5781:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5381,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5003,"src":"5758:10:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5385,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5758:30:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5386,"nodeType":"EmitStatement","src":"5753:35:25"}]},"documentation":"@dev Withdraws winnings for user\n @return Winnings","id":5388,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":5338,"nodeType":"ParameterList","parameters":[],"src":"5314:2:25"},"payable":false,"returnParameters":{"id":5341,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5340,"name":"amount","nodeType":"VariableDeclaration","scope":5388,"src":"5349:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5339,"name":"uint","nodeType":"ElementaryTypeName","src":"5349:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5348:13:25"},"scope":5462,"src":"5297:498:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5404,"nodeType":"Block","src":"5992:116:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5393,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6009:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5394,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6041:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6009:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5398,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6054:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5396,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6046:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6046:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6046:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5400,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"6086:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6046:55:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6009:92:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5392,"id":5403,"nodeType":"Return","src":"6002:99:25"}]},"documentation":"@dev Checks if time to challenge the outcome is over\n @return Is challenge period over?","id":5405,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallengePeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5389,"nodeType":"ParameterList","parameters":[],"src":"5934:2:25"},"payable":false,"returnParameters":{"id":5392,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5391,"name":"","nodeType":"VariableDeclaration","scope":5405,"src":"5982:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5390,"name":"bool","nodeType":"ElementaryTypeName","src":"5982:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5981:6:25"},"scope":5462,"src":"5904:204:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5421,"nodeType":"Block","src":"6313:108:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5419,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5412,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5410,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6330:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5411,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6357:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6330:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5415,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6370:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5413,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6362:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6362:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5416,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6362:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5417,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"6397:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6362:52:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6330:84:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5409,"id":5420,"nodeType":"Return","src":"6323:91:25"}]},"documentation":"@dev Checks if time to overbid the front runner is over\n @return Is front runner period over?","id":5422,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isFrontRunnerPeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5406,"nodeType":"ParameterList","parameters":[],"src":"6255:2:25"},"payable":false,"returnParameters":{"id":5409,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5408,"name":"","nodeType":"VariableDeclaration","scope":5422,"src":"6303:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5407,"name":"bool","nodeType":"ElementaryTypeName","src":"6303:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6302:6:25"},"scope":5462,"src":"6223:198:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5431,"nodeType":"Block","src":"6583:52:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5427,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6600:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5428,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6627:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6600:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5426,"id":5430,"nodeType":"Return","src":"6593:35:25"}]},"documentation":"@dev Checks if outcome was challenged\n @return Is challenged?","id":5432,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallenged","nodeType":"FunctionDefinition","parameters":{"id":5423,"nodeType":"ParameterList","parameters":[],"src":"6525:2:25"},"payable":false,"returnParameters":{"id":5426,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5425,"name":"","nodeType":"VariableDeclaration","scope":5432,"src":"6573:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5424,"name":"bool","nodeType":"ElementaryTypeName","src":"6573:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6572:6:25"},"scope":5462,"src":"6504:131:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5447,"nodeType":"Block","src":"6799:113:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5445,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5442,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5437,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"6819:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6819:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"6846:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5439,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"6847:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5440,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6847:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:42:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5443,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"6880:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5444,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6880:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:86:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5436,"id":5446,"nodeType":"Return","src":"6809:96:25"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":5448,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":5433,"nodeType":"ParameterList","parameters":[],"src":"6741:2:25"},"payable":false,"returnParameters":{"id":5436,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5435,"name":"","nodeType":"VariableDeclaration","scope":5448,"src":"6789:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5434,"name":"bool","nodeType":"ElementaryTypeName","src":"6789:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6788:6:25"},"scope":5462,"src":"6720:192:25","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":5460,"nodeType":"Block","src":"7055:111:25","statements":[{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5453,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"7069:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7069:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5457,"nodeType":"IfStatement","src":"7065:61:25","trueBody":{"expression":{"argumentTypes":null,"id":5455,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"7115:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5456,"nodeType":"Return","src":"7108:18:25"}},{"expression":{"argumentTypes":null,"id":5458,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"7143:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5459,"nodeType":"Return","src":"7136:23:25"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":5461,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":5449,"nodeType":"ParameterList","parameters":[],"src":"6998:2:25"},"payable":false,"returnParameters":{"id":5452,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5451,"name":"","nodeType":"VariableDeclaration","scope":5461,"src":"7046:3:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5450,"name":"int","nodeType":"ElementaryTypeName","src":"7046:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7045:5:25"},"scope":5462,"src":"6979:187:25","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":5463,"src":"2613:4555:25"}],"src":"0:7169:25"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","exportedSymbols":{"UltimateOracle":[5462],"UltimateOracleData":[5036],"UltimateOracleProxy":[5116]},"id":5463,"nodeType":"SourceUnit","nodes":[{"id":4975,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:25"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4976,"nodeType":"ImportDirective","scope":5463,"sourceUnit":4718,"src":"25:31:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":4977,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7329,"src":"57:63:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":4978,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7190,"src":"121:59:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4979,"nodeType":"ImportDirective","scope":5463,"sourceUnit":6702,"src":"181:55:25","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5036,"linearizedBaseContracts":[5036],"name":"UltimateOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4983,"name":"ForwardedOracleOutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4982,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4981,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4983,"src":"343:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4980,"name":"int","nodeType":"ElementaryTypeName","src":"343:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"342:13:25"},"src":"304:52:25"},{"anonymous":false,"documentation":null,"id":4989,"name":"OutcomeChallenge","nodeType":"EventDefinition","parameters":{"id":4988,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4985,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4989,"src":"384:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4984,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4987,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4989,"src":"408:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4986,"name":"int","nodeType":"ElementaryTypeName","src":"408:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"383:37:25"},"src":"361:60:25"},{"anonymous":false,"documentation":null,"id":4997,"name":"OutcomeVote","nodeType":"EventDefinition","parameters":{"id":4996,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4991,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4997,"src":"444:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4990,"name":"address","nodeType":"ElementaryTypeName","src":"444:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4993,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4997,"src":"468:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4992,"name":"int","nodeType":"ElementaryTypeName","src":"468:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4995,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":4997,"src":"481:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4994,"name":"uint","nodeType":"ElementaryTypeName","src":"481:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"443:50:25"},"src":"426:68:25"},{"anonymous":false,"documentation":null,"id":5003,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":5002,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4999,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":5003,"src":"516:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4998,"name":"address","nodeType":"ElementaryTypeName","src":"516:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5001,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5003,"src":"540:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5000,"name":"uint","nodeType":"ElementaryTypeName","src":"540:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"515:37:25"},"src":"499:54:25"},{"constant":false,"id":5005,"name":"forwardedOracle","nodeType":"VariableDeclaration","scope":5036,"src":"590:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5004,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"590:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":5007,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5036,"src":"625:28:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5006,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"625:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":5009,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5036,"src":"659:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5008,"name":"uint8","nodeType":"ElementaryTypeName","src":"659:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"constant":false,"id":5011,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5036,"src":"694:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5010,"name":"uint","nodeType":"ElementaryTypeName","src":"694:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5013,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5036,"src":"727:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5012,"name":"uint","nodeType":"ElementaryTypeName","src":"727:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5015,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5036,"src":"760:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5014,"name":"uint","nodeType":"ElementaryTypeName","src":"760:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5017,"name":"forwardedOutcome","nodeType":"VariableDeclaration","scope":5036,"src":"796:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5016,"name":"int","nodeType":"ElementaryTypeName","src":"796:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5019,"name":"forwardedOutcomeSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"829:40:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5018,"name":"uint","nodeType":"ElementaryTypeName","src":"829:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5021,"name":"frontRunner","nodeType":"VariableDeclaration","scope":5036,"src":"875:22:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5020,"name":"int","nodeType":"ElementaryTypeName","src":"875:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5023,"name":"frontRunnerSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"903:35:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5022,"name":"uint","nodeType":"ElementaryTypeName","src":"903:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5025,"name":"totalAmount","nodeType":"VariableDeclaration","scope":5036,"src":"945:23:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5024,"name":"uint","nodeType":"ElementaryTypeName","src":"945:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5029,"name":"totalOutcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"974:48:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"typeName":{"id":5028,"keyType":{"id":5026,"name":"int","nodeType":"ElementaryTypeName","src":"983:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"974:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5027,"name":"uint","nodeType":"ElementaryTypeName","src":"990:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":5035,"name":"outcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"1028:64:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"typeName":{"id":5034,"keyType":{"id":5030,"name":"address","nodeType":"ElementaryTypeName","src":"1037:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1028:42:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"valueType":{"id":5033,"keyType":{"id":5031,"name":"int","nodeType":"ElementaryTypeName","src":"1057:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"1048:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5032,"name":"uint","nodeType":"ElementaryTypeName","src":"1064:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"}],"scope":5463,"src":"239:856:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5037,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1129:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5038,"nodeType":"InheritanceSpecifier","src":"1129:5:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5039,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"1136:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5040,"nodeType":"InheritanceSpecifier","src":"1136:18:25"}],"contractDependencies":[5036,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5116,"linearizedBaseContracts":[5116,5036,6701,6673],"name":"UltimateOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":5114,"nodeType":"Block","src":"1898:570:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5075,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5062,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"1954:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":5061,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1946:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1946:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1975:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1946:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5070,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5067,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2004:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":5066,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1996:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5068,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1996:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2025:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1996:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:80:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":5074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5072,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2046:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5073,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2067:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2046:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:122:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5076,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2088:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5077,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2107:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2088:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:162:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5080,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2128:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5081,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2147:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2128:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:202:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5084,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2168:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5085,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2189:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2168:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:244:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5060,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1935:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1935:256:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5089,"nodeType":"ExpressionStatement","src":"1935:256:25"},{"expression":{"argumentTypes":null,"id":5092,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5090,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"2201:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5091,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"2219:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"2201:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5093,"nodeType":"ExpressionStatement","src":"2201:34:25"},{"expression":{"argumentTypes":null,"id":5096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5094,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"2245:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5095,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2263:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"2245:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5097,"nodeType":"ExpressionStatement","src":"2245:34:25"},{"expression":{"argumentTypes":null,"id":5100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5098,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"2289:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5099,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2308:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2289:36:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":5101,"nodeType":"ExpressionStatement","src":"2289:36:25"},{"expression":{"argumentTypes":null,"id":5104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5102,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"2335:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5103,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2353:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2335:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5105,"nodeType":"ExpressionStatement","src":"2335:34:25"},{"expression":{"argumentTypes":null,"id":5108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5106,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"2379:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5107,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2397:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2379:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5109,"nodeType":"ExpressionStatement","src":"2379:34:25"},{"expression":{"argumentTypes":null,"id":5112,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5110,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"2423:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5111,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2443:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2423:38:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5113,"nodeType":"ExpressionStatement","src":"2423:38:25"}]},"documentation":"@dev Constructor sets ultimate oracle properties\n @param _forwardedOracle Oracle address\n @param _collateralToken Collateral token address\n @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n @param _challengePeriod Time to challenge oracle outcome\n @param _challengeAmount Amount to challenge the outcome\n @param _frontRunnerPeriod Time to overbid the front-runner","id":5115,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5057,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5042,"src":"1870:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5058,"modifierName":{"argumentTypes":null,"id":5056,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1864:5:25","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1864:14:25"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5042,"name":"proxied","nodeType":"VariableDeclaration","scope":5115,"src":"1641:15:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5041,"name":"address","nodeType":"ElementaryTypeName","src":"1641:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5044,"name":"_forwardedOracle","nodeType":"VariableDeclaration","scope":5115,"src":"1666:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5043,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1666:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5046,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":5115,"src":"1699:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5045,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1699:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5048,"name":"_spreadMultiplier","nodeType":"VariableDeclaration","scope":5115,"src":"1731:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5047,"name":"uint8","nodeType":"ElementaryTypeName","src":"1731:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5050,"name":"_challengePeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1764:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5049,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5052,"name":"_challengeAmount","nodeType":"VariableDeclaration","scope":5115,"src":"1795:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5051,"name":"uint","nodeType":"ElementaryTypeName","src":"1795:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5054,"name":"_frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1826:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5053,"name":"uint","nodeType":"ElementaryTypeName","src":"1826:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1631:224:25"},"payable":false,"returnParameters":{"id":5059,"nodeType":"ParameterList","parameters":[],"src":"1898:0:25"},"scope":5116,"src":"1620:848:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5463,"src":"1097:1373:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5117,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2640:7:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5118,"nodeType":"InheritanceSpecifier","src":"2640:7:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5119,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2649:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5120,"nodeType":"InheritanceSpecifier","src":"2649:6:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5121,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"2657:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5122,"nodeType":"InheritanceSpecifier","src":"2657:18:25"}],"contractDependencies":[4717,5036,6673],"contractKind":"contract","documentation":"@title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n @author Stefan George - ","fullyImplemented":true,"id":5462,"linearizedBaseContracts":[5462,5036,4717,6673],"name":"UltimateOracle","nodeType":"ContractDefinition","nodes":[{"id":5124,"libraryName":{"contractScope":null,"id":5123,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2688:8:25","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2682:21:25","typeName":null},{"body":{"id":5155,"nodeType":"Block","src":"2841:430:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5138,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5134,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2979:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5128,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"2980:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2980:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5133,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5131,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3014:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3046:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3014:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:68:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5135,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3067:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"3067:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":5137,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3067:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:118:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5127,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2968:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5139,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2968:130:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5140,"nodeType":"ExpressionStatement","src":"2968:130:25"},{"expression":{"argumentTypes":null,"id":5145,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5141,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3108:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5142,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3127:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5143,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"3127:26:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":5144,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3127:28:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3108:47:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5146,"nodeType":"ExpressionStatement","src":"3108:47:25"},{"expression":{"argumentTypes":null,"id":5149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5147,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3165:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5148,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3196:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3165:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5150,"nodeType":"ExpressionStatement","src":"3165:34:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5152,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3247:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5151,"name":"ForwardedOracleOutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4983,"src":"3214:32:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":5153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:50:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5154,"nodeType":"EmitStatement","src":"3209:55:25"}]},"documentation":"@dev Allows to set oracle outcome","id":5156,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setForwardedOutcome","nodeType":"FunctionDefinition","parameters":{"id":5125,"nodeType":"ParameterList","parameters":[],"src":"2819:2:25"},"payable":false,"returnParameters":{"id":5126,"nodeType":"ParameterList","parameters":[],"src":"2841:0:25"},"scope":5462,"src":"2791:480:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5212,"nodeType":"Block","src":"3430:525:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5176,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3521:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5162,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"3522:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3522:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3556:24:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5165,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"3557:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3557:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:59:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5171,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3629:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3629:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5173,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"3641:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5174,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3647:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5169,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"3600:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3600:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5175,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3600:63:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:142:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5161,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3510:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5177,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3510:154:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5178,"nodeType":"ExpressionStatement","src":"3510:154:25"},{"expression":{"argumentTypes":null,"id":5186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5179,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"3674:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5183,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5180,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3689:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3689:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3674:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5184,"indexExpression":{"argumentTypes":null,"id":5182,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3701:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3674:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5185,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3713:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3674:54:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5187,"nodeType":"ExpressionStatement","src":"3674:54:25"},{"expression":{"argumentTypes":null,"id":5192,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5188,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"3738:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5190,"indexExpression":{"argumentTypes":null,"id":5189,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3758:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3738:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5191,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3770:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3738:47:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5193,"nodeType":"ExpressionStatement","src":"3738:47:25"},{"expression":{"argumentTypes":null,"id":5196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5194,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"3795:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5195,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3809:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3795:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5197,"nodeType":"ExpressionStatement","src":"3795:29:25"},{"expression":{"argumentTypes":null,"id":5200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5198,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"3834:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5199,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3848:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3834:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5201,"nodeType":"ExpressionStatement","src":"3834:22:25"},{"expression":{"argumentTypes":null,"id":5204,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5202,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"3866:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5203,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3892:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3866:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5205,"nodeType":"ExpressionStatement","src":"3866:29:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5207,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3927:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3927:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5209,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3939:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5206,"name":"OutcomeChallenge","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4989,"src":"3910:16:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$returns$__$","typeString":"function (address,int256)"}},"id":5210,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3910:38:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5211,"nodeType":"EmitStatement","src":"3905:43:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on","id":5213,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"challengeOutcome","nodeType":"FunctionDefinition","parameters":{"id":5159,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5158,"name":"_outcome","nodeType":"VariableDeclaration","scope":5213,"src":"3397:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5157,"name":"int","nodeType":"ElementaryTypeName","src":"3397:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3396:14:25"},"payable":false,"returnParameters":{"id":5160,"nodeType":"ParameterList","parameters":[],"src":"3430:0:25"},"scope":5462,"src":"3371:584:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5336,"nodeType":"Block","src":"4161:1064:25","statements":[{"assignments":[5221],"declarations":[{"constant":false,"id":5221,"name":"maxAmount","nodeType":"VariableDeclaration","scope":5337,"src":"4171:14:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5220,"name":"uint","nodeType":"ElementaryTypeName","src":"4171:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5231,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5229,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"4238:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5222,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4189:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5223,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4203:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5225,"indexExpression":{"argumentTypes":null,"id":5224,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4223:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4203:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4189:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5227,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4188:45:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"4188:49:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5230,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4188:67:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"4171:84:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5232,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4270:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5233,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4282:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5235,"indexExpression":{"argumentTypes":null,"id":5234,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4302:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4282:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4270:41:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":5245,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5243,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4394:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5244,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4406:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4394:13:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5246,"nodeType":"ExpressionStatement","src":"4394:13:25"},"id":5247,"nodeType":"IfStatement","src":"4266:141:25","trueBody":{"expression":{"argumentTypes":null,"id":5241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5237,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4325:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5238,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4338:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5240,"indexExpression":{"argumentTypes":null,"id":5239,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4358:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4338:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4325:42:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5242,"nodeType":"ExpressionStatement","src":"4325:42:25"}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5248,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4422:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5249,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4431:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4422:18:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5255,"nodeType":"IfStatement","src":"4418:54:25","trueBody":{"expression":{"argumentTypes":null,"id":5253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5251,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4454:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5252,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4463:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4454:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5254,"nodeType":"ExpressionStatement","src":"4454:18:25"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5257,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"4596:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4596:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5261,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"4630:26:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5259,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"4631:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5260,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:60:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5265,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4705:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4705:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5267,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"4717:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5268,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4723:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5263,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"4676:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"4676:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4676:54:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:134:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5256,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4585:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5271,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4585:146:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5272,"nodeType":"ExpressionStatement","src":"4585:146:25"},{"expression":{"argumentTypes":null,"id":5288,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5273,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4741:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5277,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5274,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4756:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4756:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4741:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5278,"indexExpression":{"argumentTypes":null,"id":5276,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4768:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4741:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5286,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4821:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5279,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4780:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5282,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5280,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4795:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4795:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5284,"indexExpression":{"argumentTypes":null,"id":5283,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4807:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4780:40:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5287,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4780:48:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4741:87:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5289,"nodeType":"ExpressionStatement","src":"4741:87:25"},{"expression":{"argumentTypes":null,"id":5299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5290,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4838:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5292,"indexExpression":{"argumentTypes":null,"id":5291,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4858:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4838:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5297,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4904:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5293,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4870:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5295,"indexExpression":{"argumentTypes":null,"id":5294,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4890:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4870:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4870:33:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:41:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4838:73:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5300,"nodeType":"ExpressionStatement","src":"4838:73:25"},{"expression":{"argumentTypes":null,"id":5306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5301,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4921:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5304,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4951:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5302,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4935:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5303,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4935:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5305,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4935:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4921:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5307,"nodeType":"ExpressionStatement","src":"4921:37:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5318,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5310,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5308,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4972:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":5309,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"4984:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4972:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5311,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4999:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5313,"indexExpression":{"argumentTypes":null,"id":5312,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5019:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4999:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5314,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5031:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5316,"indexExpression":{"argumentTypes":null,"id":5315,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5051:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5031:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:64:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4972:91:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5328,"nodeType":"IfStatement","src":"4968:195:25","trueBody":{"id":5327,"nodeType":"Block","src":"5073:90:25","statements":[{"expression":{"argumentTypes":null,"id":5321,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5319,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5087:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5320,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5101:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5322,"nodeType":"ExpressionStatement","src":"5087:22:25"},{"expression":{"argumentTypes":null,"id":5325,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5323,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"5123:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5324,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5149:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5123:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5326,"nodeType":"ExpressionStatement","src":"5123:29:25"}]}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5330,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5189:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5331,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5189:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5332,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5201:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":5333,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"5211:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5329,"name":"OutcomeVote","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4997,"src":"5177:11:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256,uint256)"}},"id":5334,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5177:41:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5335,"nodeType":"EmitStatement","src":"5172:46:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on\n @param amount Amount to bid","id":5337,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"voteForOutcome","nodeType":"FunctionDefinition","parameters":{"id":5218,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5215,"name":"_outcome","nodeType":"VariableDeclaration","scope":5337,"src":"4115:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5214,"name":"int","nodeType":"ElementaryTypeName","src":"4115:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5217,"name":"amount","nodeType":"VariableDeclaration","scope":5337,"src":"4129:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5216,"name":"uint","nodeType":"ElementaryTypeName","src":"4129:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4114:27:25"},"payable":false,"returnParameters":{"id":5219,"nodeType":"ParameterList","parameters":[],"src":"4161:0:25"},"scope":5462,"src":"4091:1134:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5387,"nodeType":"Block","src":"5366:429:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5343,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"5447:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5344,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5447:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5342,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5439:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5345,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5439:34:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5346,"nodeType":"ExpressionStatement","src":"5439:34:25"},{"expression":{"argumentTypes":null,"id":5361,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5347,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5483:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5350,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5508:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5353,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5351,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5523:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5523:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5355,"indexExpression":{"argumentTypes":null,"id":5354,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5535:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5348,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"5492:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5349,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5492:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5492:56:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5357,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5551:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5359,"indexExpression":{"argumentTypes":null,"id":5358,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5571:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5551:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5492:91:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5483:100:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5362,"nodeType":"ExpressionStatement","src":"5483:100:25"},{"expression":{"argumentTypes":null,"id":5370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5363,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5593:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5367,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5364,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5608:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5608:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5593:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5368,"indexExpression":{"argumentTypes":null,"id":5366,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5620:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5593:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5369,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5635:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5593:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5371,"nodeType":"ExpressionStatement","src":"5593:43:25"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5375,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5723:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5376,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5723:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5377,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5735:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5373,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"5698:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5698:24:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":5378,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5698:44:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5372,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5690:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5379,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5690:53:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5380,"nodeType":"ExpressionStatement","src":"5690:53:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5382,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5769:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5383,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5769:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5384,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5781:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5381,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5003,"src":"5758:10:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5385,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5758:30:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5386,"nodeType":"EmitStatement","src":"5753:35:25"}]},"documentation":"@dev Withdraws winnings for user\n @return Winnings","id":5388,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":5338,"nodeType":"ParameterList","parameters":[],"src":"5314:2:25"},"payable":false,"returnParameters":{"id":5341,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5340,"name":"amount","nodeType":"VariableDeclaration","scope":5388,"src":"5349:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5339,"name":"uint","nodeType":"ElementaryTypeName","src":"5349:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5348:13:25"},"scope":5462,"src":"5297:498:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5404,"nodeType":"Block","src":"5992:116:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5393,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6009:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5394,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6041:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6009:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5398,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6054:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5396,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6046:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6046:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6046:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5400,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"6086:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6046:55:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6009:92:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5392,"id":5403,"nodeType":"Return","src":"6002:99:25"}]},"documentation":"@dev Checks if time to challenge the outcome is over\n @return Is challenge period over?","id":5405,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallengePeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5389,"nodeType":"ParameterList","parameters":[],"src":"5934:2:25"},"payable":false,"returnParameters":{"id":5392,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5391,"name":"","nodeType":"VariableDeclaration","scope":5405,"src":"5982:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5390,"name":"bool","nodeType":"ElementaryTypeName","src":"5982:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5981:6:25"},"scope":5462,"src":"5904:204:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5421,"nodeType":"Block","src":"6313:108:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5419,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5412,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5410,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6330:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5411,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6357:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6330:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5415,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6370:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5413,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6362:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6362:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5416,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6362:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5417,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"6397:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6362:52:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6330:84:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5409,"id":5420,"nodeType":"Return","src":"6323:91:25"}]},"documentation":"@dev Checks if time to overbid the front runner is over\n @return Is front runner period over?","id":5422,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isFrontRunnerPeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5406,"nodeType":"ParameterList","parameters":[],"src":"6255:2:25"},"payable":false,"returnParameters":{"id":5409,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5408,"name":"","nodeType":"VariableDeclaration","scope":5422,"src":"6303:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5407,"name":"bool","nodeType":"ElementaryTypeName","src":"6303:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6302:6:25"},"scope":5462,"src":"6223:198:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5431,"nodeType":"Block","src":"6583:52:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5427,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6600:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5428,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6627:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6600:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5426,"id":5430,"nodeType":"Return","src":"6593:35:25"}]},"documentation":"@dev Checks if outcome was challenged\n @return Is challenged?","id":5432,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallenged","nodeType":"FunctionDefinition","parameters":{"id":5423,"nodeType":"ParameterList","parameters":[],"src":"6525:2:25"},"payable":false,"returnParameters":{"id":5426,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5425,"name":"","nodeType":"VariableDeclaration","scope":5432,"src":"6573:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5424,"name":"bool","nodeType":"ElementaryTypeName","src":"6573:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6572:6:25"},"scope":5462,"src":"6504:131:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5447,"nodeType":"Block","src":"6799:113:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5445,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5442,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5437,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"6819:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6819:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"6846:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5439,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"6847:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5440,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6847:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:42:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5443,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"6880:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5444,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6880:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:86:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5436,"id":5446,"nodeType":"Return","src":"6809:96:25"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":5448,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":5433,"nodeType":"ParameterList","parameters":[],"src":"6741:2:25"},"payable":false,"returnParameters":{"id":5436,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5435,"name":"","nodeType":"VariableDeclaration","scope":5448,"src":"6789:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5434,"name":"bool","nodeType":"ElementaryTypeName","src":"6789:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6788:6:25"},"scope":5462,"src":"6720:192:25","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":5460,"nodeType":"Block","src":"7055:111:25","statements":[{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5453,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"7069:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7069:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5457,"nodeType":"IfStatement","src":"7065:61:25","trueBody":{"expression":{"argumentTypes":null,"id":5455,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"7115:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5456,"nodeType":"Return","src":"7108:18:25"}},{"expression":{"argumentTypes":null,"id":5458,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"7143:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5459,"nodeType":"Return","src":"7136:23:25"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":5461,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":5449,"nodeType":"ParameterList","parameters":[],"src":"6998:2:25"},"payable":false,"returnParameters":{"id":5452,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5451,"name":"","nodeType":"VariableDeclaration","scope":5461,"src":"7046:3:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5450,"name":"int","nodeType":"ElementaryTypeName","src":"7046:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7045:5:25"},"scope":5462,"src":"6979:187:25","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":5463,"src":"2613:4555:25"}],"src":"0:7169:25"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.032Z"}; /***/ }), @@ -495,10 +857,32 @@ module.exports = {"contract_name":"UltimateOracle","abi":[{"constant":true,"inpu /*!*****************************************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleFactory.json ***! \*****************************************************************************************/ -/*! exports provided: contract_name, abi, networks, schema_version, updated_at, default */ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"UltimateOracleFactory","abi":[{"constant":true,"inputs":[],"name":"ultimateOracleMasterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_ultimateOracleMasterCopy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"ultimateOracle","type":"address"},{"indexed":false,"name":"oracle","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"spreadMultiplier","type":"uint8"},{"indexed":false,"name":"challengePeriod","type":"uint256"},{"indexed":false,"name":"challengeAmount","type":"uint256"},{"indexed":false,"name":"frontRunnerPeriod","type":"uint256"}],"name":"UltimateOracleCreation","type":"event"},{"constant":false,"inputs":[{"name":"oracle","type":"address"},{"name":"collateralToken","type":"address"},{"name":"spreadMultiplier","type":"uint8"},{"name":"challengePeriod","type":"uint256"},{"name":"challengeAmount","type":"uint256"},{"name":"frontRunnerPeriod","type":"uint256"}],"name":"createUltimateOracle","outputs":[{"name":"ultimateOracle","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50604051602080610c0283398101806040528101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610b7f806100836000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632d1dc84914610051578063ce70faec146100a8575b600080fd5b34801561005d57600080fd5b50610066610176565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b50610134600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061019b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168787878787876101cd6103bc565b808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018560ff1660ff168152602001848152602001838152602001828152602001975050505050505050604051809103906000f0801580156102a7573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167fe6ae2b8211e9721c5dae1d93f70be0ba07bd111608ba4db4317742e1a87fff4082898989898989604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018560ff1660ff16815260200184815260200183815260200182815260200197505050505050505060405180910390a29695505050505050565b604051610787806103cd833901905600608060405234801561001057600080fd5b5060405160e080610787833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508660008173ffffffffffffffffffffffffffffffffffffffff161415151561009657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff1614158015610115575060008573ffffffffffffffffffffffffffffffffffffffff1614155b8015610125575060028460ff1610155b80156101315750600083115b801561013d5750600082115b80156101495750600081115b151561015457600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260146101000a81548160ff021916908360ff1602179055508260038190555081600481905550806005819055505050505050505061056b8061021c6000396000f3006080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063061a85c71461011e5780630853f7eb146101755780630f3e9438146101a05780631a39d8ef146101cb5780631ff14311146101f6578063466ae314146102375780638ef8125e14610262578063984a470a1461028d5780639d89e7d4146102b8578063a619486e146102e3578063b2016bd41461033a578063c427af9b14610391578063d84d2a47146103f2578063f3f480d914610423575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610119573d6000f35b3d6000fd5b34801561012a57600080fd5b5061013361044e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018157600080fd5b5061018a610474565b6040518082815260200191505060405180910390f35b3480156101ac57600080fd5b506101b561047a565b6040518082815260200191505060405180910390f35b3480156101d757600080fd5b506101e0610480565b6040518082815260200191505060405180910390f35b34801561020257600080fd5b5061022160048036038101908080359060200190929190505050610486565b6040518082815260200191505060405180910390f35b34801561024357600080fd5b5061024c61049e565b6040518082815260200191505060405180910390f35b34801561026e57600080fd5b506102776104a4565b6040518082815260200191505060405180910390f35b34801561029957600080fd5b506102a26104aa565b6040518082815260200191505060405180910390f35b3480156102c457600080fd5b506102cd6104b0565b6040518082815260200191505060405180910390f35b3480156102ef57600080fd5b506102f86104b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034657600080fd5b5061034f6104db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039d57600080fd5b506103dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610501565b6040518082815260200191505060405180910390f35b3480156103fe57600080fd5b50610407610526565b604051808260ff1660ff16815260200191505060405180910390f35b34801561042f57600080fd5b50610438610539565b6040518082815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60085481565b600a5481565b600b6020528060005260406000206000915090505481565b60075481565b60095481565b60065481565b60045481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c602052816000526040600020602052806000526040600020600091509150505481565b600260149054906101000a900460ff1681565b600354815600a165627a7a723058207764c892e3951a1e670794043278d71b52cd592053b417914dd2226d31fee36a0029a165627a7a72305820ae3ca8c0ce0b1e2abb68274bb95a35d38892fb9064ee708d2285054be16a0f3d0029","deployedBytecode":"0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632d1dc84914610051578063ce70faec146100a8575b600080fd5b34801561005d57600080fd5b50610066610176565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b50610134600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061019b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168787878787876101cd6103bc565b808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018560ff1660ff168152602001848152602001838152602001828152602001975050505050505050604051809103906000f0801580156102a7573d6000803e3d6000fd5b5090503373ffffffffffffffffffffffffffffffffffffffff167fe6ae2b8211e9721c5dae1d93f70be0ba07bd111608ba4db4317742e1a87fff4082898989898989604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018560ff1660ff16815260200184815260200183815260200182815260200197505050505050505060405180910390a29695505050505050565b604051610787806103cd833901905600608060405234801561001057600080fd5b5060405160e080610787833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508660008173ffffffffffffffffffffffffffffffffffffffff161415151561009657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff1614158015610115575060008573ffffffffffffffffffffffffffffffffffffffff1614155b8015610125575060028460ff1610155b80156101315750600083115b801561013d5750600082115b80156101495750600081115b151561015457600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260146101000a81548160ff021916908360ff1602179055508260038190555081600481905550806005819055505050505050505061056b8061021c6000396000f3006080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063061a85c71461011e5780630853f7eb146101755780630f3e9438146101a05780631a39d8ef146101cb5780631ff14311146101f6578063466ae314146102375780638ef8125e14610262578063984a470a1461028d5780639d89e7d4146102b8578063a619486e146102e3578063b2016bd41461033a578063c427af9b14610391578063d84d2a47146103f2578063f3f480d914610423575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610119573d6000f35b3d6000fd5b34801561012a57600080fd5b5061013361044e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018157600080fd5b5061018a610474565b6040518082815260200191505060405180910390f35b3480156101ac57600080fd5b506101b561047a565b6040518082815260200191505060405180910390f35b3480156101d757600080fd5b506101e0610480565b6040518082815260200191505060405180910390f35b34801561020257600080fd5b5061022160048036038101908080359060200190929190505050610486565b6040518082815260200191505060405180910390f35b34801561024357600080fd5b5061024c61049e565b6040518082815260200191505060405180910390f35b34801561026e57600080fd5b506102776104a4565b6040518082815260200191505060405180910390f35b34801561029957600080fd5b506102a26104aa565b6040518082815260200191505060405180910390f35b3480156102c457600080fd5b506102cd6104b0565b6040518082815260200191505060405180910390f35b3480156102ef57600080fd5b506102f86104b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034657600080fd5b5061034f6104db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039d57600080fd5b506103dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610501565b6040518082815260200191505060405180910390f35b3480156103fe57600080fd5b50610407610526565b604051808260ff1660ff16815260200191505060405180910390f35b34801561042f57600080fd5b50610438610539565b6040518082815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60085481565b600a5481565b600b6020528060005260406000206000915090505481565b60075481565b60095481565b60065481565b60045481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c602052816000526040600020602052806000526040600020600091509150505481565b600260149054906101000a900460ff1681565b600354815600a165627a7a723058207764c892e3951a1e670794043278d71b52cd592053b417914dd2226d31fee36a0029a165627a7a72305820ae3ca8c0ce0b1e2abb68274bb95a35d38892fb9064ee708d2285054be16a0f3d0029","sourceMap":"203:1940:26:-;;;686:142;8:9:-1;5:2;;;30:1;27;20:12;5:2;686:142:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;796:25;769:24;;:52;;;;;;;;;;;;;;;;;;686:142;203:1940;;;;;;","deployedSourceMap":"203:1940:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;593:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;593:46:26;;;;;;;;;;;;;;;;;;;;;;;;;;;1304:837;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1304:837:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;593:46;;;;;;;;;;;;;:::o;1304:837::-;1550:29;1664:24;;;;;;;;;;;1702:6;1722:15;1751:16;1781:15;1810;1839:17;1627:239;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1627:239:26;1595:272;;1918:10;1882:252;;;1942:14;1970:6;1990:15;2019:16;2049:15;2078;2107:17;1882:252;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1304:837;;;;;;;;:::o;203:1940::-;;;;;;;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/UltimateOracle.sol\";\n\n\n/// @title Ultimate oracle factory contract - Allows to create ultimate oracle contracts\n/// @author Stefan George - \ncontract UltimateOracleFactory {\n\n /*\n * Events\n */\n event UltimateOracleCreation(\n address indexed creator,\n UltimateOracle ultimateOracle,\n Oracle oracle,\n ERC20 collateralToken,\n uint8 spreadMultiplier,\n uint challengePeriod,\n uint challengeAmount,\n uint frontRunnerPeriod\n );\n\n /*\n * Storage\n */\n UltimateOracle public ultimateOracleMasterCopy;\n\n /*\n * Public functions\n */\n constructor(UltimateOracle _ultimateOracleMasterCopy)\n public\n {\n ultimateOracleMasterCopy = _ultimateOracleMasterCopy;\n }\n\n /// @dev Creates a new ultimate Oracle contract\n /// @param oracle Oracle address\n /// @param collateralToken Collateral token address\n /// @param spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n /// @param challengePeriod Time to challenge oracle outcome\n /// @param challengeAmount Amount to challenge the outcome\n /// @param frontRunnerPeriod Time to overbid the front-runner\n /// @return Oracle contract\n function createUltimateOracle(\n Oracle oracle,\n ERC20 collateralToken,\n uint8 spreadMultiplier,\n uint challengePeriod,\n uint challengeAmount,\n uint frontRunnerPeriod\n )\n public\n returns (UltimateOracle ultimateOracle)\n {\n ultimateOracle = UltimateOracle(new UltimateOracleProxy(\n ultimateOracleMasterCopy,\n oracle,\n collateralToken,\n spreadMultiplier,\n challengePeriod,\n challengeAmount,\n frontRunnerPeriod\n ));\n emit UltimateOracleCreation(\n msg.sender,\n ultimateOracle,\n oracle,\n collateralToken,\n spreadMultiplier,\n challengePeriod,\n challengeAmount,\n frontRunnerPeriod\n );\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracleFactory.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracleFactory.sol","exportedSymbols":{"UltimateOracleFactory":[5541]},"id":5542,"nodeType":"SourceUnit","nodes":[{"id":5464,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:26"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","file":"../Oracles/UltimateOracle.sol","id":5465,"nodeType":"ImportDirective","scope":5542,"sourceUnit":5463,"src":"25:39:26","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[5116],"contractKind":"contract","documentation":"@title Ultimate oracle factory contract - Allows to create ultimate oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":5541,"linearizedBaseContracts":[5541],"name":"UltimateOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":5483,"name":"UltimateOracleCreation","nodeType":"EventDefinition","parameters":{"id":5482,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5467,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":5483,"src":"309:23:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5466,"name":"address","nodeType":"ElementaryTypeName","src":"309:7:26","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5469,"indexed":false,"name":"ultimateOracle","nodeType":"VariableDeclaration","scope":5483,"src":"342:29:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},"typeName":{"contractScope":null,"id":5468,"name":"UltimateOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":5462,"src":"342:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5471,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":5483,"src":"381:13:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5470,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"381:6:26","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5473,"indexed":false,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5483,"src":"404:21:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5472,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"404:5:26","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5475,"indexed":false,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5483,"src":"435:22:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5474,"name":"uint8","nodeType":"ElementaryTypeName","src":"435:5:26","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5477,"indexed":false,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5483,"src":"467:20:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5476,"name":"uint","nodeType":"ElementaryTypeName","src":"467:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5479,"indexed":false,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5483,"src":"497:20:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5478,"name":"uint","nodeType":"ElementaryTypeName","src":"497:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5481,"indexed":false,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5483,"src":"527:22:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5480,"name":"uint","nodeType":"ElementaryTypeName","src":"527:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:256:26"},"src":"271:285:26"},{"constant":false,"id":5485,"name":"ultimateOracleMasterCopy","nodeType":"VariableDeclaration","scope":5541,"src":"593:46:26","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},"typeName":{"contractScope":null,"id":5484,"name":"UltimateOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":5462,"src":"593:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"value":null,"visibility":"public"},{"body":{"id":5494,"nodeType":"Block","src":"759:69:26","statements":[{"expression":{"argumentTypes":null,"id":5492,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5490,"name":"ultimateOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5485,"src":"769:24:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5491,"name":"_ultimateOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5487,"src":"796:25:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"src":"769:52:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"id":5493,"nodeType":"ExpressionStatement","src":"769:52:26"}]},"documentation":null,"id":5495,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5488,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5487,"name":"_ultimateOracleMasterCopy","nodeType":"VariableDeclaration","scope":5495,"src":"698:40:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},"typeName":{"contractScope":null,"id":5486,"name":"UltimateOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":5462,"src":"698:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"value":null,"visibility":"internal"}],"src":"697:42:26"},"payable":false,"returnParameters":{"id":5489,"nodeType":"ParameterList","parameters":[],"src":"759:0:26"},"scope":5541,"src":"686:142:26","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5539,"nodeType":"Block","src":"1585:556:26","statements":[{"expression":{"argumentTypes":null,"id":5525,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5512,"name":"ultimateOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5510,"src":"1595:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5516,"name":"ultimateOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5485,"src":"1664:24:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5517,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5497,"src":"1702:6:26","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":5518,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5499,"src":"1722:15:26","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":5519,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5501,"src":"1751:16:26","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":5520,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5503,"src":"1781:15:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":5521,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5505,"src":"1810:15:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":5522,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5507,"src":"1839:17:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5515,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1627:23:26","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_contract$_Oracle_$4717_$_t_contract$_ERC20_$7328_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_contract$_UltimateOracleProxy_$5116_$","typeString":"function (address,contract Oracle,contract ERC20,uint8,uint256,uint256,uint256) returns (contract UltimateOracleProxy)"},"typeName":{"contractScope":null,"id":5514,"name":"UltimateOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5116,"src":"1631:19:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleProxy_$5116","typeString":"contract UltimateOracleProxy"}}},"id":5523,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1627:239:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleProxy_$5116","typeString":"contract UltimateOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_UltimateOracleProxy_$5116","typeString":"contract UltimateOracleProxy"}],"id":5513,"name":"UltimateOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5462,"src":"1612:14:26","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_UltimateOracle_$5462_$","typeString":"type(contract UltimateOracle)"}},"id":5524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1612:255:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"src":"1595:272:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"id":5526,"nodeType":"ExpressionStatement","src":"1595:272:26"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5528,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1918:3:26","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1918:10:26","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5530,"name":"ultimateOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5510,"src":"1942:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5531,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5497,"src":"1970:6:26","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":5532,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5499,"src":"1990:15:26","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":5533,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5501,"src":"2019:16:26","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":5534,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5503,"src":"2049:15:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":5535,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5505,"src":"2078:15:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":5536,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5507,"src":"2107:17:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5527,"name":"UltimateOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5483,"src":"1882:22:26","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_UltimateOracle_$5462_$_t_contract$_Oracle_$4717_$_t_contract$_ERC20_$7328_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,contract UltimateOracle,contract Oracle,contract ERC20,uint8,uint256,uint256,uint256)"}},"id":5537,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1882:252:26","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5538,"nodeType":"EmitStatement","src":"1877:257:26"}]},"documentation":"@dev Creates a new ultimate Oracle contract\n @param oracle Oracle address\n @param collateralToken Collateral token address\n @param spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n @param challengePeriod Time to challenge oracle outcome\n @param challengeAmount Amount to challenge the outcome\n @param frontRunnerPeriod Time to overbid the front-runner\n @return Oracle contract","id":5540,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createUltimateOracle","nodeType":"FunctionDefinition","parameters":{"id":5508,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5497,"name":"oracle","nodeType":"VariableDeclaration","scope":5540,"src":"1343:13:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5496,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1343:6:26","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5499,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5540,"src":"1366:21:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5498,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1366:5:26","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5501,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5540,"src":"1397:22:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5500,"name":"uint8","nodeType":"ElementaryTypeName","src":"1397:5:26","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5503,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5540,"src":"1429:20:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5502,"name":"uint","nodeType":"ElementaryTypeName","src":"1429:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5505,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5540,"src":"1459:20:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5504,"name":"uint","nodeType":"ElementaryTypeName","src":"1459:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5507,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5540,"src":"1489:22:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5506,"name":"uint","nodeType":"ElementaryTypeName","src":"1489:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1333:184:26"},"payable":false,"returnParameters":{"id":5511,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5510,"name":"ultimateOracle","nodeType":"VariableDeclaration","scope":5540,"src":"1550:29:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},"typeName":{"contractScope":null,"id":5509,"name":"UltimateOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":5462,"src":"1550:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"value":null,"visibility":"internal"}],"src":"1549:31:26"},"scope":5541,"src":"1304:837:26","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5542,"src":"203:1940:26"}],"src":"0:2144:26"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracleFactory.sol","exportedSymbols":{"UltimateOracleFactory":[5541]},"id":5542,"nodeType":"SourceUnit","nodes":[{"id":5464,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:26"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","file":"../Oracles/UltimateOracle.sol","id":5465,"nodeType":"ImportDirective","scope":5542,"sourceUnit":5463,"src":"25:39:26","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[5116],"contractKind":"contract","documentation":"@title Ultimate oracle factory contract - Allows to create ultimate oracle contracts\n @author Stefan George - ","fullyImplemented":true,"id":5541,"linearizedBaseContracts":[5541],"name":"UltimateOracleFactory","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":5483,"name":"UltimateOracleCreation","nodeType":"EventDefinition","parameters":{"id":5482,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5467,"indexed":true,"name":"creator","nodeType":"VariableDeclaration","scope":5483,"src":"309:23:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5466,"name":"address","nodeType":"ElementaryTypeName","src":"309:7:26","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5469,"indexed":false,"name":"ultimateOracle","nodeType":"VariableDeclaration","scope":5483,"src":"342:29:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},"typeName":{"contractScope":null,"id":5468,"name":"UltimateOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":5462,"src":"342:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5471,"indexed":false,"name":"oracle","nodeType":"VariableDeclaration","scope":5483,"src":"381:13:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5470,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"381:6:26","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5473,"indexed":false,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5483,"src":"404:21:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5472,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"404:5:26","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5475,"indexed":false,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5483,"src":"435:22:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5474,"name":"uint8","nodeType":"ElementaryTypeName","src":"435:5:26","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5477,"indexed":false,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5483,"src":"467:20:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5476,"name":"uint","nodeType":"ElementaryTypeName","src":"467:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5479,"indexed":false,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5483,"src":"497:20:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5478,"name":"uint","nodeType":"ElementaryTypeName","src":"497:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5481,"indexed":false,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5483,"src":"527:22:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5480,"name":"uint","nodeType":"ElementaryTypeName","src":"527:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"299:256:26"},"src":"271:285:26"},{"constant":false,"id":5485,"name":"ultimateOracleMasterCopy","nodeType":"VariableDeclaration","scope":5541,"src":"593:46:26","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},"typeName":{"contractScope":null,"id":5484,"name":"UltimateOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":5462,"src":"593:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"value":null,"visibility":"public"},{"body":{"id":5494,"nodeType":"Block","src":"759:69:26","statements":[{"expression":{"argumentTypes":null,"id":5492,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5490,"name":"ultimateOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5485,"src":"769:24:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5491,"name":"_ultimateOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5487,"src":"796:25:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"src":"769:52:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"id":5493,"nodeType":"ExpressionStatement","src":"769:52:26"}]},"documentation":null,"id":5495,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5488,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5487,"name":"_ultimateOracleMasterCopy","nodeType":"VariableDeclaration","scope":5495,"src":"698:40:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},"typeName":{"contractScope":null,"id":5486,"name":"UltimateOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":5462,"src":"698:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"value":null,"visibility":"internal"}],"src":"697:42:26"},"payable":false,"returnParameters":{"id":5489,"nodeType":"ParameterList","parameters":[],"src":"759:0:26"},"scope":5541,"src":"686:142:26","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5539,"nodeType":"Block","src":"1585:556:26","statements":[{"expression":{"argumentTypes":null,"id":5525,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5512,"name":"ultimateOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5510,"src":"1595:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5516,"name":"ultimateOracleMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5485,"src":"1664:24:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5517,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5497,"src":"1702:6:26","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":5518,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5499,"src":"1722:15:26","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":5519,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5501,"src":"1751:16:26","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":5520,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5503,"src":"1781:15:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":5521,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5505,"src":"1810:15:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":5522,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5507,"src":"1839:17:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5515,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"NewExpression","src":"1627:23:26","typeDescriptions":{"typeIdentifier":"t_function_creation_nonpayable$_t_address_$_t_contract$_Oracle_$4717_$_t_contract$_ERC20_$7328_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_contract$_UltimateOracleProxy_$5116_$","typeString":"function (address,contract Oracle,contract ERC20,uint8,uint256,uint256,uint256) returns (contract UltimateOracleProxy)"},"typeName":{"contractScope":null,"id":5514,"name":"UltimateOracleProxy","nodeType":"UserDefinedTypeName","referencedDeclaration":5116,"src":"1631:19:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleProxy_$5116","typeString":"contract UltimateOracleProxy"}}},"id":5523,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1627:239:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleProxy_$5116","typeString":"contract UltimateOracleProxy"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_UltimateOracleProxy_$5116","typeString":"contract UltimateOracleProxy"}],"id":5513,"name":"UltimateOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5462,"src":"1612:14:26","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_UltimateOracle_$5462_$","typeString":"type(contract UltimateOracle)"}},"id":5524,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1612:255:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"src":"1595:272:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"id":5526,"nodeType":"ExpressionStatement","src":"1595:272:26"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5528,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"1918:3:26","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5529,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1918:10:26","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5530,"name":"ultimateOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5510,"src":"1942:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5531,"name":"oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5497,"src":"1970:6:26","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},{"argumentTypes":null,"id":5532,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5499,"src":"1990:15:26","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},{"argumentTypes":null,"id":5533,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5501,"src":"2019:16:26","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},{"argumentTypes":null,"id":5534,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5503,"src":"2049:15:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":5535,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5505,"src":"2078:15:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"argumentTypes":null,"id":5536,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5507,"src":"2107:17:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},{"typeIdentifier":"t_uint8","typeString":"uint8"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5527,"name":"UltimateOracleCreation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5483,"src":"1882:22:26","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_contract$_UltimateOracle_$5462_$_t_contract$_Oracle_$4717_$_t_contract$_ERC20_$7328_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$","typeString":"function (address,contract UltimateOracle,contract Oracle,contract ERC20,uint8,uint256,uint256,uint256)"}},"id":5537,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1882:252:26","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5538,"nodeType":"EmitStatement","src":"1877:257:26"}]},"documentation":"@dev Creates a new ultimate Oracle contract\n @param oracle Oracle address\n @param collateralToken Collateral token address\n @param spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n @param challengePeriod Time to challenge oracle outcome\n @param challengeAmount Amount to challenge the outcome\n @param frontRunnerPeriod Time to overbid the front-runner\n @return Oracle contract","id":5540,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"createUltimateOracle","nodeType":"FunctionDefinition","parameters":{"id":5508,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5497,"name":"oracle","nodeType":"VariableDeclaration","scope":5540,"src":"1343:13:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5496,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1343:6:26","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5499,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5540,"src":"1366:21:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5498,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1366:5:26","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5501,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5540,"src":"1397:22:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5500,"name":"uint8","nodeType":"ElementaryTypeName","src":"1397:5:26","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5503,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5540,"src":"1429:20:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5502,"name":"uint","nodeType":"ElementaryTypeName","src":"1429:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5505,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5540,"src":"1459:20:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5504,"name":"uint","nodeType":"ElementaryTypeName","src":"1459:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5507,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5540,"src":"1489:22:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5506,"name":"uint","nodeType":"ElementaryTypeName","src":"1489:4:26","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1333:184:26"},"payable":false,"returnParameters":{"id":5511,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5510,"name":"ultimateOracle","nodeType":"VariableDeclaration","scope":5540,"src":"1550:29:26","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},"typeName":{"contractScope":null,"id":5509,"name":"UltimateOracle","nodeType":"UserDefinedTypeName","referencedDeclaration":5462,"src":"1550:14:26","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},"value":null,"visibility":"internal"}],"src":"1549:31:26"},"scope":5541,"src":"1304:837:26","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5542,"src":"203:1940:26"}],"src":"0:2144:26"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"3":{"address":"0x14117b1502c254b65e637d85cbf0feee5d9a1463","transactionHash":"0x40dede8018bd9e89fb0ff9de768cb0b07726cbecb62e1f5c08af1fc577cdba6b"},"4":{"address":"0x498369ed3eb732d787d10c1e7c70e38a83215b7e","transactionHash":"0x68abe4785ab05590fc7c57471fe8991f7ea9dca3696656397bd4bfc1660f1184"},"42":{"address":"0xe4cc089577aaef6fd6793acc70520a4bc19e2f81","transactionHash":"0x38df4507c39238b60bdb2ecd2599fab5ec1e66aeedbd96c9c4476f87ef9b9c1d"},"437894314312":{"address":"0xa94b7f0465e98609391c623d0560c5720a3f2d33","transactionHash":"0x0b6282019dac5b4b7ce7da18b888634ee27047a673b28c0f68c082861a30be81"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-23T00:04:46.801Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleProxy.json": +/*!***************************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/UltimateOracleProxy.json ***! + \***************************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ +/***/ (function(module) { + +module.exports = {"contractName":"UltimateOracleProxy","abi":[{"constant":true,"inputs":[],"name":"forwardedOracle","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunnerPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunner","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"int256"}],"name":"totalOutcomeAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"forwardedOutcomeSetTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frontRunnerSetTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"forwardedOutcome","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"challengeAmount","outputs":[{"name":"","type":"uint256"}],"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":"","type":"address"},{"name":"","type":"int256"}],"name":"outcomeAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spreadMultiplier","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"challengePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"proxied","type":"address"},{"name":"_forwardedOracle","type":"address"},{"name":"_collateralToken","type":"address"},{"name":"_spreadMultiplier","type":"uint8"},{"name":"_challengePeriod","type":"uint256"},{"name":"_challengeAmount","type":"uint256"},{"name":"_frontRunnerPeriod","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"outcome","type":"int256"}],"name":"ForwardedOracleOutcomeAssignment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"outcome","type":"int256"}],"name":"OutcomeChallenge","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"outcome","type":"int256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"OutcomeVote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"}],"bytecode":"0x608060405234801561001057600080fd5b5060405160e080610787833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508660008173ffffffffffffffffffffffffffffffffffffffff161415151561009657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008673ffffffffffffffffffffffffffffffffffffffff1614158015610115575060008573ffffffffffffffffffffffffffffffffffffffff1614155b8015610125575060028460ff1610155b80156101315750600083115b801561013d5750600082115b80156101495750600081115b151561015457600080fd5b85600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260146101000a81548160ff021916908360ff1602179055508260038190555081600481905550806005819055505050505050505061056b8061021c6000396000f3006080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063061a85c71461011e5780630853f7eb146101755780630f3e9438146101a05780631a39d8ef146101cb5780631ff14311146101f6578063466ae314146102375780638ef8125e14610262578063984a470a1461028d5780639d89e7d4146102b8578063a619486e146102e3578063b2016bd41461033a578063c427af9b14610391578063d84d2a47146103f2578063f3f480d914610423575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610119573d6000f35b3d6000fd5b34801561012a57600080fd5b5061013361044e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018157600080fd5b5061018a610474565b6040518082815260200191505060405180910390f35b3480156101ac57600080fd5b506101b561047a565b6040518082815260200191505060405180910390f35b3480156101d757600080fd5b506101e0610480565b6040518082815260200191505060405180910390f35b34801561020257600080fd5b5061022160048036038101908080359060200190929190505050610486565b6040518082815260200191505060405180910390f35b34801561024357600080fd5b5061024c61049e565b6040518082815260200191505060405180910390f35b34801561026e57600080fd5b506102776104a4565b6040518082815260200191505060405180910390f35b34801561029957600080fd5b506102a26104aa565b6040518082815260200191505060405180910390f35b3480156102c457600080fd5b506102cd6104b0565b6040518082815260200191505060405180910390f35b3480156102ef57600080fd5b506102f86104b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034657600080fd5b5061034f6104db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039d57600080fd5b506103dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610501565b6040518082815260200191505060405180910390f35b3480156103fe57600080fd5b50610407610526565b604051808260ff1660ff16815260200191505060405180910390f35b34801561042f57600080fd5b50610438610539565b6040518082815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60085481565b600a5481565b600b6020528060005260406000206000915090505481565b60075481565b60095481565b60065481565b60045481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c602052816000526040600020602052806000526040600020600091509150505481565b600260149054906101000a900460ff1681565b600354815600a165627a7a723058207764c892e3951a1e670794043278d71b52cd592053b417914dd2226d31fee36a0029","deployedBytecode":"0x6080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063061a85c71461011e5780630853f7eb146101755780630f3e9438146101a05780631a39d8ef146101cb5780631ff14311146101f6578063466ae314146102375780638ef8125e14610262578063984a470a1461028d5780639d89e7d4146102b8578063a619486e146102e3578063b2016bd41461033a578063c427af9b14610391578063d84d2a47146103f2578063f3f480d914610423575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e8060008114610119573d6000f35b3d6000fd5b34801561012a57600080fd5b5061013361044e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018157600080fd5b5061018a610474565b6040518082815260200191505060405180910390f35b3480156101ac57600080fd5b506101b561047a565b6040518082815260200191505060405180910390f35b3480156101d757600080fd5b506101e0610480565b6040518082815260200191505060405180910390f35b34801561020257600080fd5b5061022160048036038101908080359060200190929190505050610486565b6040518082815260200191505060405180910390f35b34801561024357600080fd5b5061024c61049e565b6040518082815260200191505060405180910390f35b34801561026e57600080fd5b506102776104a4565b6040518082815260200191505060405180910390f35b34801561029957600080fd5b506102a26104aa565b6040518082815260200191505060405180910390f35b3480156102c457600080fd5b506102cd6104b0565b6040518082815260200191505060405180910390f35b3480156102ef57600080fd5b506102f86104b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034657600080fd5b5061034f6104db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039d57600080fd5b506103dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610501565b6040518082815260200191505060405180910390f35b3480156103fe57600080fd5b50610407610526565b604051808260ff1660ff16815260200191505060405180910390f35b34801561042f57600080fd5b50610438610539565b6040518082815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60085481565b600a5481565b600b6020528060005260406000206000915090505481565b60075481565b60095481565b60065481565b60045481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c602052816000526040600020602052806000526040600020600091509150505481565b600260149054906101000a900460ff1681565b600354815600a165627a7a723058207764c892e3951a1e670794043278d71b52cd592053b417914dd2226d31fee36a0029","sourceMap":"1097:1373:25:-;;;1620:848;8:9:-1;5:2;;;30:1;27;20:12;5:2;1620:848:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1870:7;628:1:29;613:11;:16;;;;605:25;;;;;;;;653:11;640:10;;:24;;;;;;;;;;;;;;;;;;543:128;1975:1:25;1954:16;1946:30;;;;:80;;;;;2025:1;2004:16;1996:30;;;;1946:80;:122;;;;;2067:1;2046:17;:22;;;;1946:122;:162;;;;;2107:1;2088:16;:20;1946:162;:202;;;;;2147:1;2128:16;:20;1946:202;:244;;;;;2189:1;2168:18;:22;1946:244;1935:256;;;;;;;;2219:16;2201:15;;:34;;;;;;;;;;;;;;;;;;2263:16;2245:15;;:34;;;;;;;;;;;;;;;;;;2308:17;2289:16;;:36;;;;;;;;;;;;;;;;;;2353:16;2335:15;:34;;;;2397:16;2379:15;:34;;;;2443:18;2423:17;:38;;;;1620:848;;;;;;;1097:1373;;;;;;","deployedSourceMap":"1097:1373:25:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:19:29;853:10;;;;;;;;;;;831:32;;915:14;912:1;909;896:34;1014:1;1011;995:14;992:1;979:11;975:1;971:6;958:58;1050:16;1047:1;1044;1029:38;1087:7;1112:1;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;590:29:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;590:29:25;;;;;;;;;;;;;;;;;;;;;;;;;;;760;;8:9:-1;5:2;;;30:1;27;20:12;5:2;760:29:25;;;;;;;;;;;;;;;;;;;;;;;875:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;875:22:25;;;;;;;;;;;;;;;;;;;;;;;945:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;945:23:25;;;;;;;;;;;;;;;;;;;;;;;974:48;;8:9:-1;5:2;;;30:1;27;20:12;5:2;974:48:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;829:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;829:40:25;;;;;;;;;;;;;;;;;;;;;;;903:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;903:35:25;;;;;;;;;;;;;;;;;;;;;;;796:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;796:27:25;;;;;;;;;;;;;;;;;;;;;;;727;;8:9:-1;5:2;;;30:1;27;20:12;5:2;727:27:25;;;;;;;;;;;;;;;;;;;;;;;197:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:29;;;;;;;;;;;;;;;;;;;;;;;;;;;625:28:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;625:28:25;;;;;;;;;;;;;;;;;;;;;;;;;;;1028:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1028:64:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;659:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;659:29:25;;;;;;;;;;;;;;;;;;;;;;;;;;;694:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;694:27:25;;;;;;;;;;;;;;;;;;;;;;;590:29;;;;;;;;;;;;;:::o;760:::-;;;;:::o;875:22::-;;;;:::o;945:23::-;;;;:::o;974:48::-;;;;;;;;;;;;;;;;;:::o;829:40::-;;;;:::o;903:35::-;;;;:::o;796:27::-;;;;:::o;727:::-;;;;:::o;197:25:29:-;;;;;;;;;;;;;:::o;625:28:25:-;;;;;;;;;;;;;:::o;1028:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;659:29::-;;;;;;;;;;;;;:::o;694:27::-;;;;:::o","source":"pragma solidity ^0.4.24;\nimport \"../Oracles/Oracle.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract UltimateOracleData {\n\n /*\n * Events\n */\n event ForwardedOracleOutcomeAssignment(int outcome);\n event OutcomeChallenge(address indexed sender, int outcome);\n event OutcomeVote(address indexed sender, int outcome, uint amount);\n event Withdrawal(address indexed sender, uint amount);\n\n /*\n * Storage\n */\n Oracle public forwardedOracle;\n ERC20 public collateralToken;\n uint8 public spreadMultiplier;\n uint public challengePeriod;\n uint public challengeAmount;\n uint public frontRunnerPeriod;\n\n int public forwardedOutcome;\n uint public forwardedOutcomeSetTimestamp;\n int public frontRunner;\n uint public frontRunnerSetTimestamp;\n\n uint public totalAmount;\n mapping (int => uint) public totalOutcomeAmounts;\n mapping (address => mapping (int => uint)) public outcomeAmounts;\n}\n\ncontract UltimateOracleProxy is Proxy, UltimateOracleData {\n\n /// @dev Constructor sets ultimate oracle properties\n /// @param _forwardedOracle Oracle address\n /// @param _collateralToken Collateral token address\n /// @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n /// @param _challengePeriod Time to challenge oracle outcome\n /// @param _challengeAmount Amount to challenge the outcome\n /// @param _frontRunnerPeriod Time to overbid the front-runner\n constructor(\n address proxied,\n Oracle _forwardedOracle,\n ERC20 _collateralToken,\n uint8 _spreadMultiplier,\n uint _challengePeriod,\n uint _challengeAmount,\n uint _frontRunnerPeriod\n )\n Proxy(proxied)\n public\n {\n // Validate inputs\n require( address(_forwardedOracle) != 0\n && address(_collateralToken) != 0\n && _spreadMultiplier >= 2\n && _challengePeriod > 0\n && _challengeAmount > 0\n && _frontRunnerPeriod > 0);\n forwardedOracle = _forwardedOracle;\n collateralToken = _collateralToken;\n spreadMultiplier = _spreadMultiplier;\n challengePeriod = _challengePeriod;\n challengeAmount = _challengeAmount;\n frontRunnerPeriod = _frontRunnerPeriod;\n }\n}\n\n/// @title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n/// @author Stefan George - \ncontract UltimateOracle is Proxied, Oracle, UltimateOracleData {\n using SafeMath for *;\n\n /*\n * Public functions\n */\n /// @dev Allows to set oracle outcome\n function setForwardedOutcome()\n public\n {\n // There was no challenge and the outcome was not set yet in the ultimate oracle but in the forwarded oracle\n require( !isChallenged()\n && forwardedOutcomeSetTimestamp == 0\n && forwardedOracle.isOutcomeSet());\n forwardedOutcome = forwardedOracle.getOutcome();\n forwardedOutcomeSetTimestamp = now;\n emit ForwardedOracleOutcomeAssignment(forwardedOutcome);\n }\n\n /// @dev Allows to challenge the oracle outcome\n /// @param _outcome Outcome to bid on\n function challengeOutcome(int _outcome)\n public\n {\n // There was no challenge yet or the challenge period expired\n require( !isChallenged()\n && !isChallengePeriodOver()\n && collateralToken.transferFrom(msg.sender, this, challengeAmount));\n outcomeAmounts[msg.sender][_outcome] = challengeAmount;\n totalOutcomeAmounts[_outcome] = challengeAmount;\n totalAmount = challengeAmount;\n frontRunner = _outcome;\n frontRunnerSetTimestamp = now;\n emit OutcomeChallenge(msg.sender, _outcome);\n }\n\n /// @dev Allows to challenge the oracle outcome\n /// @param _outcome Outcome to bid on\n /// @param amount Amount to bid\n function voteForOutcome(int _outcome, uint amount)\n public\n {\n uint maxAmount = (totalAmount - totalOutcomeAmounts[_outcome]).mul(spreadMultiplier);\n\n if (maxAmount > totalOutcomeAmounts[_outcome])\n maxAmount -= totalOutcomeAmounts[_outcome];\n else\n maxAmount = 0;\n\n if (amount > maxAmount)\n amount = maxAmount;\n // Outcome is challenged and front runner period is not over yet and tokens can be transferred\n require( isChallenged()\n && !isFrontRunnerPeriodOver()\n && collateralToken.transferFrom(msg.sender, this, amount));\n outcomeAmounts[msg.sender][_outcome] = outcomeAmounts[msg.sender][_outcome].add(amount);\n totalOutcomeAmounts[_outcome] = totalOutcomeAmounts[_outcome].add(amount);\n totalAmount = totalAmount.add(amount);\n if (_outcome != frontRunner && totalOutcomeAmounts[_outcome] > totalOutcomeAmounts[frontRunner])\n {\n frontRunner = _outcome;\n frontRunnerSetTimestamp = now;\n }\n emit OutcomeVote(msg.sender, _outcome, amount);\n }\n\n /// @dev Withdraws winnings for user\n /// @return Winnings\n function withdraw()\n public\n returns (uint amount)\n {\n // Outcome was challenged and ultimate outcome decided\n require(isFrontRunnerPeriodOver());\n amount = totalAmount.mul(outcomeAmounts[msg.sender][frontRunner]) / totalOutcomeAmounts[frontRunner];\n outcomeAmounts[msg.sender][frontRunner] = 0;\n // Transfer earnings to contributor\n require(collateralToken.transfer(msg.sender, amount));\n emit Withdrawal(msg.sender, amount);\n }\n\n /// @dev Checks if time to challenge the outcome is over\n /// @return Is challenge period over?\n function isChallengePeriodOver()\n public\n view\n returns (bool)\n {\n return forwardedOutcomeSetTimestamp != 0 && now.sub(forwardedOutcomeSetTimestamp) > challengePeriod;\n }\n\n /// @dev Checks if time to overbid the front runner is over\n /// @return Is front runner period over?\n function isFrontRunnerPeriodOver()\n public\n view\n returns (bool)\n {\n return frontRunnerSetTimestamp != 0 && now.sub(frontRunnerSetTimestamp) > frontRunnerPeriod;\n }\n\n /// @dev Checks if outcome was challenged\n /// @return Is challenged?\n function isChallenged()\n public\n view\n returns (bool)\n {\n return frontRunnerSetTimestamp != 0;\n }\n\n /// @dev Returns if winning outcome is set\n /// @return Is outcome set?\n function isOutcomeSet()\n public\n view\n returns (bool)\n {\n return isChallengePeriodOver() && !isChallenged()\n || isFrontRunnerPeriodOver();\n }\n\n /// @dev Returns winning outcome\n /// @return Outcome\n function getOutcome()\n public\n view\n returns (int)\n {\n if (isFrontRunnerPeriodOver())\n return frontRunner;\n return forwardedOutcome;\n }\n}\n","sourcePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","ast":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","exportedSymbols":{"UltimateOracle":[5462],"UltimateOracleData":[5036],"UltimateOracleProxy":[5116]},"id":5463,"nodeType":"SourceUnit","nodes":[{"id":4975,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:25"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4976,"nodeType":"ImportDirective","scope":5463,"sourceUnit":4718,"src":"25:31:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":4977,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7329,"src":"57:63:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":4978,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7190,"src":"121:59:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4979,"nodeType":"ImportDirective","scope":5463,"sourceUnit":6702,"src":"181:55:25","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5036,"linearizedBaseContracts":[5036],"name":"UltimateOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4983,"name":"ForwardedOracleOutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4982,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4981,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4983,"src":"343:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4980,"name":"int","nodeType":"ElementaryTypeName","src":"343:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"342:13:25"},"src":"304:52:25"},{"anonymous":false,"documentation":null,"id":4989,"name":"OutcomeChallenge","nodeType":"EventDefinition","parameters":{"id":4988,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4985,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4989,"src":"384:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4984,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4987,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4989,"src":"408:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4986,"name":"int","nodeType":"ElementaryTypeName","src":"408:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"383:37:25"},"src":"361:60:25"},{"anonymous":false,"documentation":null,"id":4997,"name":"OutcomeVote","nodeType":"EventDefinition","parameters":{"id":4996,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4991,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4997,"src":"444:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4990,"name":"address","nodeType":"ElementaryTypeName","src":"444:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4993,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4997,"src":"468:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4992,"name":"int","nodeType":"ElementaryTypeName","src":"468:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4995,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":4997,"src":"481:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4994,"name":"uint","nodeType":"ElementaryTypeName","src":"481:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"443:50:25"},"src":"426:68:25"},{"anonymous":false,"documentation":null,"id":5003,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":5002,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4999,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":5003,"src":"516:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4998,"name":"address","nodeType":"ElementaryTypeName","src":"516:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5001,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5003,"src":"540:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5000,"name":"uint","nodeType":"ElementaryTypeName","src":"540:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"515:37:25"},"src":"499:54:25"},{"constant":false,"id":5005,"name":"forwardedOracle","nodeType":"VariableDeclaration","scope":5036,"src":"590:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5004,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"590:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":5007,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5036,"src":"625:28:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5006,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"625:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":5009,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5036,"src":"659:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5008,"name":"uint8","nodeType":"ElementaryTypeName","src":"659:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"constant":false,"id":5011,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5036,"src":"694:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5010,"name":"uint","nodeType":"ElementaryTypeName","src":"694:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5013,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5036,"src":"727:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5012,"name":"uint","nodeType":"ElementaryTypeName","src":"727:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5015,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5036,"src":"760:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5014,"name":"uint","nodeType":"ElementaryTypeName","src":"760:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5017,"name":"forwardedOutcome","nodeType":"VariableDeclaration","scope":5036,"src":"796:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5016,"name":"int","nodeType":"ElementaryTypeName","src":"796:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5019,"name":"forwardedOutcomeSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"829:40:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5018,"name":"uint","nodeType":"ElementaryTypeName","src":"829:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5021,"name":"frontRunner","nodeType":"VariableDeclaration","scope":5036,"src":"875:22:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5020,"name":"int","nodeType":"ElementaryTypeName","src":"875:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5023,"name":"frontRunnerSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"903:35:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5022,"name":"uint","nodeType":"ElementaryTypeName","src":"903:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5025,"name":"totalAmount","nodeType":"VariableDeclaration","scope":5036,"src":"945:23:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5024,"name":"uint","nodeType":"ElementaryTypeName","src":"945:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5029,"name":"totalOutcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"974:48:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"typeName":{"id":5028,"keyType":{"id":5026,"name":"int","nodeType":"ElementaryTypeName","src":"983:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"974:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5027,"name":"uint","nodeType":"ElementaryTypeName","src":"990:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":5035,"name":"outcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"1028:64:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"typeName":{"id":5034,"keyType":{"id":5030,"name":"address","nodeType":"ElementaryTypeName","src":"1037:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1028:42:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"valueType":{"id":5033,"keyType":{"id":5031,"name":"int","nodeType":"ElementaryTypeName","src":"1057:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"1048:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5032,"name":"uint","nodeType":"ElementaryTypeName","src":"1064:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"}],"scope":5463,"src":"239:856:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5037,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1129:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5038,"nodeType":"InheritanceSpecifier","src":"1129:5:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5039,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"1136:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5040,"nodeType":"InheritanceSpecifier","src":"1136:18:25"}],"contractDependencies":[5036,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5116,"linearizedBaseContracts":[5116,5036,6701,6673],"name":"UltimateOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":5114,"nodeType":"Block","src":"1898:570:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5075,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5062,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"1954:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":5061,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1946:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1946:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1975:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1946:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5070,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5067,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2004:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":5066,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1996:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5068,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1996:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2025:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1996:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:80:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":5074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5072,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2046:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5073,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2067:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2046:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:122:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5076,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2088:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5077,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2107:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2088:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:162:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5080,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2128:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5081,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2147:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2128:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:202:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5084,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2168:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5085,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2189:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2168:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:244:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5060,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1935:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1935:256:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5089,"nodeType":"ExpressionStatement","src":"1935:256:25"},{"expression":{"argumentTypes":null,"id":5092,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5090,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"2201:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5091,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"2219:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"2201:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5093,"nodeType":"ExpressionStatement","src":"2201:34:25"},{"expression":{"argumentTypes":null,"id":5096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5094,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"2245:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5095,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2263:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"2245:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5097,"nodeType":"ExpressionStatement","src":"2245:34:25"},{"expression":{"argumentTypes":null,"id":5100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5098,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"2289:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5099,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2308:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2289:36:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":5101,"nodeType":"ExpressionStatement","src":"2289:36:25"},{"expression":{"argumentTypes":null,"id":5104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5102,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"2335:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5103,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2353:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2335:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5105,"nodeType":"ExpressionStatement","src":"2335:34:25"},{"expression":{"argumentTypes":null,"id":5108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5106,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"2379:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5107,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2397:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2379:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5109,"nodeType":"ExpressionStatement","src":"2379:34:25"},{"expression":{"argumentTypes":null,"id":5112,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5110,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"2423:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5111,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2443:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2423:38:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5113,"nodeType":"ExpressionStatement","src":"2423:38:25"}]},"documentation":"@dev Constructor sets ultimate oracle properties\n @param _forwardedOracle Oracle address\n @param _collateralToken Collateral token address\n @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n @param _challengePeriod Time to challenge oracle outcome\n @param _challengeAmount Amount to challenge the outcome\n @param _frontRunnerPeriod Time to overbid the front-runner","id":5115,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5057,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5042,"src":"1870:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5058,"modifierName":{"argumentTypes":null,"id":5056,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1864:5:25","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1864:14:25"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5042,"name":"proxied","nodeType":"VariableDeclaration","scope":5115,"src":"1641:15:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5041,"name":"address","nodeType":"ElementaryTypeName","src":"1641:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5044,"name":"_forwardedOracle","nodeType":"VariableDeclaration","scope":5115,"src":"1666:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5043,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1666:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5046,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":5115,"src":"1699:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5045,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1699:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5048,"name":"_spreadMultiplier","nodeType":"VariableDeclaration","scope":5115,"src":"1731:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5047,"name":"uint8","nodeType":"ElementaryTypeName","src":"1731:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5050,"name":"_challengePeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1764:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5049,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5052,"name":"_challengeAmount","nodeType":"VariableDeclaration","scope":5115,"src":"1795:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5051,"name":"uint","nodeType":"ElementaryTypeName","src":"1795:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5054,"name":"_frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1826:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5053,"name":"uint","nodeType":"ElementaryTypeName","src":"1826:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1631:224:25"},"payable":false,"returnParameters":{"id":5059,"nodeType":"ParameterList","parameters":[],"src":"1898:0:25"},"scope":5116,"src":"1620:848:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5463,"src":"1097:1373:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5117,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2640:7:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5118,"nodeType":"InheritanceSpecifier","src":"2640:7:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5119,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2649:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5120,"nodeType":"InheritanceSpecifier","src":"2649:6:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5121,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"2657:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5122,"nodeType":"InheritanceSpecifier","src":"2657:18:25"}],"contractDependencies":[4717,5036,6673],"contractKind":"contract","documentation":"@title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n @author Stefan George - ","fullyImplemented":true,"id":5462,"linearizedBaseContracts":[5462,5036,4717,6673],"name":"UltimateOracle","nodeType":"ContractDefinition","nodes":[{"id":5124,"libraryName":{"contractScope":null,"id":5123,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2688:8:25","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2682:21:25","typeName":null},{"body":{"id":5155,"nodeType":"Block","src":"2841:430:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5138,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5134,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2979:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5128,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"2980:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2980:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5133,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5131,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3014:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3046:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3014:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:68:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5135,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3067:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"3067:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":5137,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3067:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:118:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5127,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2968:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5139,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2968:130:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5140,"nodeType":"ExpressionStatement","src":"2968:130:25"},{"expression":{"argumentTypes":null,"id":5145,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5141,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3108:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5142,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3127:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5143,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"3127:26:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":5144,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3127:28:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3108:47:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5146,"nodeType":"ExpressionStatement","src":"3108:47:25"},{"expression":{"argumentTypes":null,"id":5149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5147,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3165:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5148,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3196:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3165:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5150,"nodeType":"ExpressionStatement","src":"3165:34:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5152,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3247:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5151,"name":"ForwardedOracleOutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4983,"src":"3214:32:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":5153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:50:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5154,"nodeType":"EmitStatement","src":"3209:55:25"}]},"documentation":"@dev Allows to set oracle outcome","id":5156,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setForwardedOutcome","nodeType":"FunctionDefinition","parameters":{"id":5125,"nodeType":"ParameterList","parameters":[],"src":"2819:2:25"},"payable":false,"returnParameters":{"id":5126,"nodeType":"ParameterList","parameters":[],"src":"2841:0:25"},"scope":5462,"src":"2791:480:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5212,"nodeType":"Block","src":"3430:525:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5176,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3521:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5162,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"3522:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3522:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3556:24:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5165,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"3557:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3557:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:59:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5171,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3629:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3629:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5173,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"3641:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5174,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3647:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5169,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"3600:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3600:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5175,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3600:63:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:142:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5161,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3510:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5177,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3510:154:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5178,"nodeType":"ExpressionStatement","src":"3510:154:25"},{"expression":{"argumentTypes":null,"id":5186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5179,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"3674:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5183,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5180,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3689:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3689:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3674:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5184,"indexExpression":{"argumentTypes":null,"id":5182,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3701:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3674:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5185,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3713:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3674:54:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5187,"nodeType":"ExpressionStatement","src":"3674:54:25"},{"expression":{"argumentTypes":null,"id":5192,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5188,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"3738:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5190,"indexExpression":{"argumentTypes":null,"id":5189,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3758:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3738:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5191,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3770:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3738:47:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5193,"nodeType":"ExpressionStatement","src":"3738:47:25"},{"expression":{"argumentTypes":null,"id":5196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5194,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"3795:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5195,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3809:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3795:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5197,"nodeType":"ExpressionStatement","src":"3795:29:25"},{"expression":{"argumentTypes":null,"id":5200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5198,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"3834:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5199,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3848:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3834:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5201,"nodeType":"ExpressionStatement","src":"3834:22:25"},{"expression":{"argumentTypes":null,"id":5204,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5202,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"3866:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5203,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3892:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3866:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5205,"nodeType":"ExpressionStatement","src":"3866:29:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5207,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3927:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3927:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5209,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3939:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5206,"name":"OutcomeChallenge","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4989,"src":"3910:16:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$returns$__$","typeString":"function (address,int256)"}},"id":5210,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3910:38:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5211,"nodeType":"EmitStatement","src":"3905:43:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on","id":5213,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"challengeOutcome","nodeType":"FunctionDefinition","parameters":{"id":5159,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5158,"name":"_outcome","nodeType":"VariableDeclaration","scope":5213,"src":"3397:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5157,"name":"int","nodeType":"ElementaryTypeName","src":"3397:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3396:14:25"},"payable":false,"returnParameters":{"id":5160,"nodeType":"ParameterList","parameters":[],"src":"3430:0:25"},"scope":5462,"src":"3371:584:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5336,"nodeType":"Block","src":"4161:1064:25","statements":[{"assignments":[5221],"declarations":[{"constant":false,"id":5221,"name":"maxAmount","nodeType":"VariableDeclaration","scope":5337,"src":"4171:14:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5220,"name":"uint","nodeType":"ElementaryTypeName","src":"4171:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5231,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5229,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"4238:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5222,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4189:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5223,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4203:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5225,"indexExpression":{"argumentTypes":null,"id":5224,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4223:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4203:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4189:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5227,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4188:45:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"4188:49:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5230,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4188:67:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"4171:84:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5232,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4270:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5233,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4282:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5235,"indexExpression":{"argumentTypes":null,"id":5234,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4302:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4282:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4270:41:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":5245,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5243,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4394:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5244,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4406:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4394:13:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5246,"nodeType":"ExpressionStatement","src":"4394:13:25"},"id":5247,"nodeType":"IfStatement","src":"4266:141:25","trueBody":{"expression":{"argumentTypes":null,"id":5241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5237,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4325:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5238,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4338:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5240,"indexExpression":{"argumentTypes":null,"id":5239,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4358:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4338:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4325:42:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5242,"nodeType":"ExpressionStatement","src":"4325:42:25"}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5248,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4422:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5249,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4431:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4422:18:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5255,"nodeType":"IfStatement","src":"4418:54:25","trueBody":{"expression":{"argumentTypes":null,"id":5253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5251,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4454:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5252,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4463:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4454:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5254,"nodeType":"ExpressionStatement","src":"4454:18:25"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5257,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"4596:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4596:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5261,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"4630:26:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5259,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"4631:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5260,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:60:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5265,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4705:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4705:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5267,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"4717:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5268,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4723:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5263,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"4676:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"4676:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4676:54:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:134:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5256,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4585:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5271,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4585:146:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5272,"nodeType":"ExpressionStatement","src":"4585:146:25"},{"expression":{"argumentTypes":null,"id":5288,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5273,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4741:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5277,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5274,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4756:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4756:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4741:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5278,"indexExpression":{"argumentTypes":null,"id":5276,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4768:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4741:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5286,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4821:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5279,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4780:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5282,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5280,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4795:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4795:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5284,"indexExpression":{"argumentTypes":null,"id":5283,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4807:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4780:40:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5287,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4780:48:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4741:87:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5289,"nodeType":"ExpressionStatement","src":"4741:87:25"},{"expression":{"argumentTypes":null,"id":5299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5290,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4838:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5292,"indexExpression":{"argumentTypes":null,"id":5291,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4858:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4838:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5297,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4904:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5293,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4870:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5295,"indexExpression":{"argumentTypes":null,"id":5294,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4890:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4870:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4870:33:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:41:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4838:73:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5300,"nodeType":"ExpressionStatement","src":"4838:73:25"},{"expression":{"argumentTypes":null,"id":5306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5301,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4921:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5304,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4951:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5302,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4935:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5303,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4935:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5305,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4935:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4921:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5307,"nodeType":"ExpressionStatement","src":"4921:37:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5318,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5310,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5308,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4972:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":5309,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"4984:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4972:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5311,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4999:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5313,"indexExpression":{"argumentTypes":null,"id":5312,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5019:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4999:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5314,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5031:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5316,"indexExpression":{"argumentTypes":null,"id":5315,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5051:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5031:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:64:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4972:91:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5328,"nodeType":"IfStatement","src":"4968:195:25","trueBody":{"id":5327,"nodeType":"Block","src":"5073:90:25","statements":[{"expression":{"argumentTypes":null,"id":5321,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5319,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5087:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5320,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5101:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5322,"nodeType":"ExpressionStatement","src":"5087:22:25"},{"expression":{"argumentTypes":null,"id":5325,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5323,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"5123:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5324,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5149:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5123:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5326,"nodeType":"ExpressionStatement","src":"5123:29:25"}]}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5330,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5189:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5331,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5189:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5332,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5201:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":5333,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"5211:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5329,"name":"OutcomeVote","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4997,"src":"5177:11:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256,uint256)"}},"id":5334,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5177:41:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5335,"nodeType":"EmitStatement","src":"5172:46:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on\n @param amount Amount to bid","id":5337,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"voteForOutcome","nodeType":"FunctionDefinition","parameters":{"id":5218,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5215,"name":"_outcome","nodeType":"VariableDeclaration","scope":5337,"src":"4115:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5214,"name":"int","nodeType":"ElementaryTypeName","src":"4115:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5217,"name":"amount","nodeType":"VariableDeclaration","scope":5337,"src":"4129:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5216,"name":"uint","nodeType":"ElementaryTypeName","src":"4129:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4114:27:25"},"payable":false,"returnParameters":{"id":5219,"nodeType":"ParameterList","parameters":[],"src":"4161:0:25"},"scope":5462,"src":"4091:1134:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5387,"nodeType":"Block","src":"5366:429:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5343,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"5447:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5344,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5447:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5342,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5439:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5345,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5439:34:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5346,"nodeType":"ExpressionStatement","src":"5439:34:25"},{"expression":{"argumentTypes":null,"id":5361,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5347,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5483:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5350,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5508:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5353,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5351,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5523:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5523:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5355,"indexExpression":{"argumentTypes":null,"id":5354,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5535:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5348,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"5492:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5349,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5492:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5492:56:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5357,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5551:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5359,"indexExpression":{"argumentTypes":null,"id":5358,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5571:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5551:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5492:91:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5483:100:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5362,"nodeType":"ExpressionStatement","src":"5483:100:25"},{"expression":{"argumentTypes":null,"id":5370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5363,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5593:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5367,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5364,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5608:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5608:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5593:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5368,"indexExpression":{"argumentTypes":null,"id":5366,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5620:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5593:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5369,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5635:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5593:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5371,"nodeType":"ExpressionStatement","src":"5593:43:25"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5375,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5723:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5376,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5723:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5377,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5735:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5373,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"5698:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5698:24:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":5378,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5698:44:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5372,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5690:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5379,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5690:53:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5380,"nodeType":"ExpressionStatement","src":"5690:53:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5382,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5769:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5383,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5769:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5384,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5781:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5381,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5003,"src":"5758:10:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5385,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5758:30:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5386,"nodeType":"EmitStatement","src":"5753:35:25"}]},"documentation":"@dev Withdraws winnings for user\n @return Winnings","id":5388,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":5338,"nodeType":"ParameterList","parameters":[],"src":"5314:2:25"},"payable":false,"returnParameters":{"id":5341,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5340,"name":"amount","nodeType":"VariableDeclaration","scope":5388,"src":"5349:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5339,"name":"uint","nodeType":"ElementaryTypeName","src":"5349:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5348:13:25"},"scope":5462,"src":"5297:498:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5404,"nodeType":"Block","src":"5992:116:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5393,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6009:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5394,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6041:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6009:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5398,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6054:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5396,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6046:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6046:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6046:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5400,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"6086:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6046:55:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6009:92:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5392,"id":5403,"nodeType":"Return","src":"6002:99:25"}]},"documentation":"@dev Checks if time to challenge the outcome is over\n @return Is challenge period over?","id":5405,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallengePeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5389,"nodeType":"ParameterList","parameters":[],"src":"5934:2:25"},"payable":false,"returnParameters":{"id":5392,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5391,"name":"","nodeType":"VariableDeclaration","scope":5405,"src":"5982:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5390,"name":"bool","nodeType":"ElementaryTypeName","src":"5982:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5981:6:25"},"scope":5462,"src":"5904:204:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5421,"nodeType":"Block","src":"6313:108:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5419,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5412,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5410,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6330:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5411,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6357:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6330:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5415,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6370:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5413,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6362:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6362:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5416,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6362:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5417,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"6397:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6362:52:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6330:84:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5409,"id":5420,"nodeType":"Return","src":"6323:91:25"}]},"documentation":"@dev Checks if time to overbid the front runner is over\n @return Is front runner period over?","id":5422,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isFrontRunnerPeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5406,"nodeType":"ParameterList","parameters":[],"src":"6255:2:25"},"payable":false,"returnParameters":{"id":5409,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5408,"name":"","nodeType":"VariableDeclaration","scope":5422,"src":"6303:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5407,"name":"bool","nodeType":"ElementaryTypeName","src":"6303:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6302:6:25"},"scope":5462,"src":"6223:198:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5431,"nodeType":"Block","src":"6583:52:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5427,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6600:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5428,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6627:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6600:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5426,"id":5430,"nodeType":"Return","src":"6593:35:25"}]},"documentation":"@dev Checks if outcome was challenged\n @return Is challenged?","id":5432,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallenged","nodeType":"FunctionDefinition","parameters":{"id":5423,"nodeType":"ParameterList","parameters":[],"src":"6525:2:25"},"payable":false,"returnParameters":{"id":5426,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5425,"name":"","nodeType":"VariableDeclaration","scope":5432,"src":"6573:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5424,"name":"bool","nodeType":"ElementaryTypeName","src":"6573:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6572:6:25"},"scope":5462,"src":"6504:131:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5447,"nodeType":"Block","src":"6799:113:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5445,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5442,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5437,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"6819:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6819:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"6846:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5439,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"6847:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5440,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6847:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:42:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5443,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"6880:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5444,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6880:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:86:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5436,"id":5446,"nodeType":"Return","src":"6809:96:25"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":5448,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":5433,"nodeType":"ParameterList","parameters":[],"src":"6741:2:25"},"payable":false,"returnParameters":{"id":5436,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5435,"name":"","nodeType":"VariableDeclaration","scope":5448,"src":"6789:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5434,"name":"bool","nodeType":"ElementaryTypeName","src":"6789:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6788:6:25"},"scope":5462,"src":"6720:192:25","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":5460,"nodeType":"Block","src":"7055:111:25","statements":[{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5453,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"7069:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7069:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5457,"nodeType":"IfStatement","src":"7065:61:25","trueBody":{"expression":{"argumentTypes":null,"id":5455,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"7115:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5456,"nodeType":"Return","src":"7108:18:25"}},{"expression":{"argumentTypes":null,"id":5458,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"7143:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5459,"nodeType":"Return","src":"7136:23:25"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":5461,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":5449,"nodeType":"ParameterList","parameters":[],"src":"6998:2:25"},"payable":false,"returnParameters":{"id":5452,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5451,"name":"","nodeType":"VariableDeclaration","scope":5461,"src":"7046:3:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5450,"name":"int","nodeType":"ElementaryTypeName","src":"7046:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7045:5:25"},"scope":5462,"src":"6979:187:25","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":5463,"src":"2613:4555:25"}],"src":"0:7169:25"},"legacyAST":{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/UltimateOracle.sol","exportedSymbols":{"UltimateOracle":[5462],"UltimateOracleData":[5036],"UltimateOracleProxy":[5116]},"id":5463,"nodeType":"SourceUnit","nodes":[{"id":4975,"literals":["solidity","^","0.4",".24"],"nodeType":"PragmaDirective","src":"0:24:25"},{"absolutePath":"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol","file":"../Oracles/Oracle.sol","id":4976,"nodeType":"ImportDirective","scope":5463,"sourceUnit":4718,"src":"25:31:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","file":"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol","id":4977,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7329,"src":"57:63:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-solidity/contracts/math/SafeMath.sol","file":"openzeppelin-solidity/contracts/math/SafeMath.sol","id":4978,"nodeType":"ImportDirective","scope":5463,"sourceUnit":7190,"src":"121:59:25","symbolAliases":[],"unitAlias":""},{"absolutePath":"@gnosis.pm/util-contracts/contracts/Proxy.sol","file":"@gnosis.pm/util-contracts/contracts/Proxy.sol","id":4979,"nodeType":"ImportDirective","scope":5463,"sourceUnit":6702,"src":"181:55:25","symbolAliases":[],"unitAlias":""},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5036,"linearizedBaseContracts":[5036],"name":"UltimateOracleData","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"documentation":null,"id":4983,"name":"ForwardedOracleOutcomeAssignment","nodeType":"EventDefinition","parameters":{"id":4982,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4981,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4983,"src":"343:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4980,"name":"int","nodeType":"ElementaryTypeName","src":"343:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"342:13:25"},"src":"304:52:25"},{"anonymous":false,"documentation":null,"id":4989,"name":"OutcomeChallenge","nodeType":"EventDefinition","parameters":{"id":4988,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4985,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4989,"src":"384:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4984,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4987,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4989,"src":"408:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4986,"name":"int","nodeType":"ElementaryTypeName","src":"408:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"383:37:25"},"src":"361:60:25"},{"anonymous":false,"documentation":null,"id":4997,"name":"OutcomeVote","nodeType":"EventDefinition","parameters":{"id":4996,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4991,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":4997,"src":"444:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4990,"name":"address","nodeType":"ElementaryTypeName","src":"444:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":4993,"indexed":false,"name":"outcome","nodeType":"VariableDeclaration","scope":4997,"src":"468:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":4992,"name":"int","nodeType":"ElementaryTypeName","src":"468:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":4995,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":4997,"src":"481:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":4994,"name":"uint","nodeType":"ElementaryTypeName","src":"481:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"443:50:25"},"src":"426:68:25"},{"anonymous":false,"documentation":null,"id":5003,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":5002,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4999,"indexed":true,"name":"sender","nodeType":"VariableDeclaration","scope":5003,"src":"516:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4998,"name":"address","nodeType":"ElementaryTypeName","src":"516:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5001,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":5003,"src":"540:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5000,"name":"uint","nodeType":"ElementaryTypeName","src":"540:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"515:37:25"},"src":"499:54:25"},{"constant":false,"id":5005,"name":"forwardedOracle","nodeType":"VariableDeclaration","scope":5036,"src":"590:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5004,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"590:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"public"},{"constant":false,"id":5007,"name":"collateralToken","nodeType":"VariableDeclaration","scope":5036,"src":"625:28:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5006,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"625:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":5009,"name":"spreadMultiplier","nodeType":"VariableDeclaration","scope":5036,"src":"659:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5008,"name":"uint8","nodeType":"ElementaryTypeName","src":"659:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"public"},{"constant":false,"id":5011,"name":"challengePeriod","nodeType":"VariableDeclaration","scope":5036,"src":"694:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5010,"name":"uint","nodeType":"ElementaryTypeName","src":"694:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5013,"name":"challengeAmount","nodeType":"VariableDeclaration","scope":5036,"src":"727:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5012,"name":"uint","nodeType":"ElementaryTypeName","src":"727:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5015,"name":"frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5036,"src":"760:29:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5014,"name":"uint","nodeType":"ElementaryTypeName","src":"760:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5017,"name":"forwardedOutcome","nodeType":"VariableDeclaration","scope":5036,"src":"796:27:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5016,"name":"int","nodeType":"ElementaryTypeName","src":"796:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5019,"name":"forwardedOutcomeSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"829:40:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5018,"name":"uint","nodeType":"ElementaryTypeName","src":"829:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5021,"name":"frontRunner","nodeType":"VariableDeclaration","scope":5036,"src":"875:22:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5020,"name":"int","nodeType":"ElementaryTypeName","src":"875:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"public"},{"constant":false,"id":5023,"name":"frontRunnerSetTimestamp","nodeType":"VariableDeclaration","scope":5036,"src":"903:35:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5022,"name":"uint","nodeType":"ElementaryTypeName","src":"903:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5025,"name":"totalAmount","nodeType":"VariableDeclaration","scope":5036,"src":"945:23:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5024,"name":"uint","nodeType":"ElementaryTypeName","src":"945:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":5029,"name":"totalOutcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"974:48:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"typeName":{"id":5028,"keyType":{"id":5026,"name":"int","nodeType":"ElementaryTypeName","src":"983:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"974:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5027,"name":"uint","nodeType":"ElementaryTypeName","src":"990:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":5035,"name":"outcomeAmounts","nodeType":"VariableDeclaration","scope":5036,"src":"1028:64:25","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"typeName":{"id":5034,"keyType":{"id":5030,"name":"address","nodeType":"ElementaryTypeName","src":"1037:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1028:42:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"},"valueType":{"id":5033,"keyType":{"id":5031,"name":"int","nodeType":"ElementaryTypeName","src":"1057:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Mapping","src":"1048:21:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"},"valueType":{"id":5032,"name":"uint","nodeType":"ElementaryTypeName","src":"1064:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"}],"scope":5463,"src":"239:856:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5037,"name":"Proxy","nodeType":"UserDefinedTypeName","referencedDeclaration":6701,"src":"1129:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxy_$6701","typeString":"contract Proxy"}},"id":5038,"nodeType":"InheritanceSpecifier","src":"1129:5:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5039,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"1136:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5040,"nodeType":"InheritanceSpecifier","src":"1136:18:25"}],"contractDependencies":[5036,6673,6701],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":5116,"linearizedBaseContracts":[5116,5036,6701,6673],"name":"UltimateOracleProxy","nodeType":"ContractDefinition","nodes":[{"body":{"id":5114,"nodeType":"Block","src":"1898:570:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5087,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5083,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5079,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5075,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5071,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5062,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"1954:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}],"id":5061,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1946:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5063,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1946:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5064,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1975:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1946:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":5070,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5067,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2004:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}],"id":5066,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1996:7:25","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":5068,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1996:25:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5069,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2025:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1996:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:80:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint8","typeString":"uint8"},"id":5074,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5072,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2046:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"32","id":5073,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2067:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"2046:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:122:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5078,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5076,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2088:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5077,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2107:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2088:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:162:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5082,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5080,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2128:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5081,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2147:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2128:20:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:202:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5086,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5084,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2168:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5085,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2189:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2168:22:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1946:244:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5060,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"1935:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5088,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1935:256:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5089,"nodeType":"ExpressionStatement","src":"1935:256:25"},{"expression":{"argumentTypes":null,"id":5092,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5090,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"2201:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5091,"name":"_forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5044,"src":"2219:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"src":"2201:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5093,"nodeType":"ExpressionStatement","src":"2201:34:25"},{"expression":{"argumentTypes":null,"id":5096,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5094,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"2245:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5095,"name":"_collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5046,"src":"2263:16:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"src":"2245:34:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5097,"nodeType":"ExpressionStatement","src":"2245:34:25"},{"expression":{"argumentTypes":null,"id":5100,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5098,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"2289:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5099,"name":"_spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5048,"src":"2308:17:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"2289:36:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"id":5101,"nodeType":"ExpressionStatement","src":"2289:36:25"},{"expression":{"argumentTypes":null,"id":5104,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5102,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"2335:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5103,"name":"_challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5050,"src":"2353:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2335:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5105,"nodeType":"ExpressionStatement","src":"2335:34:25"},{"expression":{"argumentTypes":null,"id":5108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5106,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"2379:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5107,"name":"_challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5052,"src":"2397:16:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2379:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5109,"nodeType":"ExpressionStatement","src":"2379:34:25"},{"expression":{"argumentTypes":null,"id":5112,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5110,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"2423:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5111,"name":"_frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5054,"src":"2443:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2423:38:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5113,"nodeType":"ExpressionStatement","src":"2423:38:25"}]},"documentation":"@dev Constructor sets ultimate oracle properties\n @param _forwardedOracle Oracle address\n @param _collateralToken Collateral token address\n @param _spreadMultiplier Defines the spread as a multiple of the money bet on other outcomes\n @param _challengePeriod Time to challenge oracle outcome\n @param _challengeAmount Amount to challenge the outcome\n @param _frontRunnerPeriod Time to overbid the front-runner","id":5115,"implemented":true,"isConstructor":true,"isDeclaredConst":false,"modifiers":[{"arguments":[{"argumentTypes":null,"id":5057,"name":"proxied","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5042,"src":"1870:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"id":5058,"modifierName":{"argumentTypes":null,"id":5056,"name":"Proxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6701,"src":"1864:5:25","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Proxy_$6701_$","typeString":"type(contract Proxy)"}},"nodeType":"ModifierInvocation","src":"1864:14:25"}],"name":"","nodeType":"FunctionDefinition","parameters":{"id":5055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5042,"name":"proxied","nodeType":"VariableDeclaration","scope":5115,"src":"1641:15:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5041,"name":"address","nodeType":"ElementaryTypeName","src":"1641:7:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":5044,"name":"_forwardedOracle","nodeType":"VariableDeclaration","scope":5115,"src":"1666:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"},"typeName":{"contractScope":null,"id":5043,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"1666:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"value":null,"visibility":"internal"},{"constant":false,"id":5046,"name":"_collateralToken","nodeType":"VariableDeclaration","scope":5115,"src":"1699:22:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"},"typeName":{"contractScope":null,"id":5045,"name":"ERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":7328,"src":"1699:5:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":5048,"name":"_spreadMultiplier","nodeType":"VariableDeclaration","scope":5115,"src":"1731:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":5047,"name":"uint8","nodeType":"ElementaryTypeName","src":"1731:5:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":null,"visibility":"internal"},{"constant":false,"id":5050,"name":"_challengePeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1764:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5049,"name":"uint","nodeType":"ElementaryTypeName","src":"1764:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5052,"name":"_challengeAmount","nodeType":"VariableDeclaration","scope":5115,"src":"1795:21:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5051,"name":"uint","nodeType":"ElementaryTypeName","src":"1795:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5054,"name":"_frontRunnerPeriod","nodeType":"VariableDeclaration","scope":5115,"src":"1826:23:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5053,"name":"uint","nodeType":"ElementaryTypeName","src":"1826:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1631:224:25"},"payable":false,"returnParameters":{"id":5059,"nodeType":"ParameterList","parameters":[],"src":"1898:0:25"},"scope":5116,"src":"1620:848:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":5463,"src":"1097:1373:25"},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":5117,"name":"Proxied","nodeType":"UserDefinedTypeName","referencedDeclaration":6673,"src":"2640:7:25","typeDescriptions":{"typeIdentifier":"t_contract$_Proxied_$6673","typeString":"contract Proxied"}},"id":5118,"nodeType":"InheritanceSpecifier","src":"2640:7:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5119,"name":"Oracle","nodeType":"UserDefinedTypeName","referencedDeclaration":4717,"src":"2649:6:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5120,"nodeType":"InheritanceSpecifier","src":"2649:6:25"},{"arguments":null,"baseName":{"contractScope":null,"id":5121,"name":"UltimateOracleData","nodeType":"UserDefinedTypeName","referencedDeclaration":5036,"src":"2657:18:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracleData_$5036","typeString":"contract UltimateOracleData"}},"id":5122,"nodeType":"InheritanceSpecifier","src":"2657:18:25"}],"contractDependencies":[4717,5036,6673],"contractKind":"contract","documentation":"@title Ultimate oracle contract - Allows to swap oracle result for ultimate oracle result\n @author Stefan George - ","fullyImplemented":true,"id":5462,"linearizedBaseContracts":[5462,5036,4717,6673],"name":"UltimateOracle","nodeType":"ContractDefinition","nodes":[{"id":5124,"libraryName":{"contractScope":null,"id":5123,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":7189,"src":"2688:8:25","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$7189","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"2682:21:25","typeName":null},{"body":{"id":5155,"nodeType":"Block","src":"2841:430:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5138,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5134,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5130,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"2979:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5128,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"2980:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2980:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5133,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5131,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3014:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5132,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3046:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3014:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:68:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5135,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3067:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"isOutcomeSet","nodeType":"MemberAccess","referencedDeclaration":4711,"src":"3067:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_bool_$","typeString":"function () view external returns (bool)"}},"id":5137,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3067:30:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2979:118:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5127,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"2968:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5139,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2968:130:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5140,"nodeType":"ExpressionStatement","src":"2968:130:25"},{"expression":{"argumentTypes":null,"id":5145,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5141,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3108:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"expression":{"argumentTypes":null,"id":5142,"name":"forwardedOracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5005,"src":"3127:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_Oracle_$4717","typeString":"contract Oracle"}},"id":5143,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"getOutcome","nodeType":"MemberAccess","referencedDeclaration":4716,"src":"3127:26:25","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_int256_$","typeString":"function () view external returns (int256)"}},"id":5144,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3127:28:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3108:47:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5146,"nodeType":"ExpressionStatement","src":"3108:47:25"},{"expression":{"argumentTypes":null,"id":5149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5147,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"3165:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5148,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3196:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3165:34:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5150,"nodeType":"ExpressionStatement","src":"3165:34:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5152,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"3247:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5151,"name":"ForwardedOracleOutcomeAssignment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4983,"src":"3214:32:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_int256_$returns$__$","typeString":"function (int256)"}},"id":5153,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3214:50:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5154,"nodeType":"EmitStatement","src":"3209:55:25"}]},"documentation":"@dev Allows to set oracle outcome","id":5156,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"setForwardedOutcome","nodeType":"FunctionDefinition","parameters":{"id":5125,"nodeType":"ParameterList","parameters":[],"src":"2819:2:25"},"payable":false,"returnParameters":{"id":5126,"nodeType":"ParameterList","parameters":[],"src":"2841:0:25"},"scope":5462,"src":"2791:480:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5212,"nodeType":"Block","src":"3430:525:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5176,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5168,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3521:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5162,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"3522:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5163,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3522:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5167,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"3556:24:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5165,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"3557:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3557:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:59:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5171,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3629:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5172,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3629:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5173,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"3641:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5174,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3647:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5169,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"3600:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5170,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"3600:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5175,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3600:63:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"3521:142:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5161,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"3510:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5177,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3510:154:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5178,"nodeType":"ExpressionStatement","src":"3510:154:25"},{"expression":{"argumentTypes":null,"id":5186,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5179,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"3674:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5183,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5180,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3689:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3689:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"3674:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5184,"indexExpression":{"argumentTypes":null,"id":5182,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3701:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3674:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5185,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3713:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3674:54:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5187,"nodeType":"ExpressionStatement","src":"3674:54:25"},{"expression":{"argumentTypes":null,"id":5192,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5188,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"3738:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5190,"indexExpression":{"argumentTypes":null,"id":5189,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3758:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3738:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5191,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3770:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3738:47:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5193,"nodeType":"ExpressionStatement","src":"3738:47:25"},{"expression":{"argumentTypes":null,"id":5196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5194,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"3795:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5195,"name":"challengeAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5013,"src":"3809:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3795:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5197,"nodeType":"ExpressionStatement","src":"3795:29:25"},{"expression":{"argumentTypes":null,"id":5200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5198,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"3834:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5199,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3848:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"3834:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5201,"nodeType":"ExpressionStatement","src":"3834:22:25"},{"expression":{"argumentTypes":null,"id":5204,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5202,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"3866:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5203,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"3892:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3866:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5205,"nodeType":"ExpressionStatement","src":"3866:29:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5207,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"3927:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3927:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5209,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5158,"src":"3939:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"}],"id":5206,"name":"OutcomeChallenge","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4989,"src":"3910:16:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$returns$__$","typeString":"function (address,int256)"}},"id":5210,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3910:38:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5211,"nodeType":"EmitStatement","src":"3905:43:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on","id":5213,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"challengeOutcome","nodeType":"FunctionDefinition","parameters":{"id":5159,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5158,"name":"_outcome","nodeType":"VariableDeclaration","scope":5213,"src":"3397:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5157,"name":"int","nodeType":"ElementaryTypeName","src":"3397:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"3396:14:25"},"payable":false,"returnParameters":{"id":5160,"nodeType":"ParameterList","parameters":[],"src":"3430:0:25"},"scope":5462,"src":"3371:584:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5336,"nodeType":"Block","src":"4161:1064:25","statements":[{"assignments":[5221],"declarations":[{"constant":false,"id":5221,"name":"maxAmount","nodeType":"VariableDeclaration","scope":5337,"src":"4171:14:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5220,"name":"uint","nodeType":"ElementaryTypeName","src":"4171:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":5231,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5229,"name":"spreadMultiplier","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5009,"src":"4238:16:25","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint8","typeString":"uint8"}],"expression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5226,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5222,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4189:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5223,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4203:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5225,"indexExpression":{"argumentTypes":null,"id":5224,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4223:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4203:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4189:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":5227,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4188:45:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5228,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"4188:49:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5230,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4188:67:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"4171:84:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5236,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5232,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4270:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5233,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4282:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5235,"indexExpression":{"argumentTypes":null,"id":5234,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4302:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4282:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4270:41:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"argumentTypes":null,"id":5245,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5243,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4394:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5244,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4406:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4394:13:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5246,"nodeType":"ExpressionStatement","src":"4394:13:25"},"id":5247,"nodeType":"IfStatement","src":"4266:141:25","trueBody":{"expression":{"argumentTypes":null,"id":5241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5237,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4325:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5238,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4338:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5240,"indexExpression":{"argumentTypes":null,"id":5239,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4358:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4338:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4325:42:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5242,"nodeType":"ExpressionStatement","src":"4325:42:25"}},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5250,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5248,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4422:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5249,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4431:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4422:18:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5255,"nodeType":"IfStatement","src":"4418:54:25","trueBody":{"expression":{"argumentTypes":null,"id":5253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5251,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4454:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5252,"name":"maxAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5221,"src":"4463:9:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4454:18:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5254,"nodeType":"ExpressionStatement","src":"4454:18:25"}},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5257,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"4596:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5258,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4596:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5261,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"4630:26:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5259,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"4631:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5260,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4631:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:60:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5265,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4705:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4705:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5267,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7749,"src":"4717:4:25","typeDescriptions":{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"}},{"argumentTypes":null,"id":5268,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4723:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_contract$_UltimateOracle_$5462","typeString":"contract UltimateOracle"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5263,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"4676:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transferFrom","nodeType":"MemberAccess","referencedDeclaration":7310,"src":"4676:28:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) external returns (bool)"}},"id":5269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4676:54:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4596:134:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5256,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"4585:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5271,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4585:146:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5272,"nodeType":"ExpressionStatement","src":"4585:146:25"},{"expression":{"argumentTypes":null,"id":5288,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5273,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4741:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5277,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5274,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4756:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4756:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4741:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5278,"indexExpression":{"argumentTypes":null,"id":5276,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4768:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4741:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5286,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4821:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5279,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"4780:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5282,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5280,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"4795:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5281,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4795:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5284,"indexExpression":{"argumentTypes":null,"id":5283,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4807:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4780:36:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5285,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4780:40:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5287,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4780:48:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4741:87:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5289,"nodeType":"ExpressionStatement","src":"4741:87:25"},{"expression":{"argumentTypes":null,"id":5299,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5290,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4838:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5292,"indexExpression":{"argumentTypes":null,"id":5291,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4858:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4838:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5297,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4904:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5293,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4870:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5295,"indexExpression":{"argumentTypes":null,"id":5294,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4890:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4870:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4870:33:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4870:41:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4838:73:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5300,"nodeType":"ExpressionStatement","src":"4838:73:25"},{"expression":{"argumentTypes":null,"id":5306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5301,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4921:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5304,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"4951:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5302,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"4935:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5303,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":7152,"src":"4935:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5305,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4935:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4921:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5307,"nodeType":"ExpressionStatement","src":"4921:37:25"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5318,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_int256","typeString":"int256"},"id":5310,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5308,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"4972:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"id":5309,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"4984:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"4972:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5317,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5311,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"4999:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5313,"indexExpression":{"argumentTypes":null,"id":5312,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5019:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4999:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5314,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5031:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5316,"indexExpression":{"argumentTypes":null,"id":5315,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5051:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5031:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4999:64:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"4972:91:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5328,"nodeType":"IfStatement","src":"4968:195:25","trueBody":{"id":5327,"nodeType":"Block","src":"5073:90:25","statements":[{"expression":{"argumentTypes":null,"id":5321,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5319,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5087:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5320,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5101:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"src":"5087:22:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"id":5322,"nodeType":"ExpressionStatement","src":"5087:22:25"},{"expression":{"argumentTypes":null,"id":5325,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5323,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"5123:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":5324,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"5149:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5123:29:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5326,"nodeType":"ExpressionStatement","src":"5123:29:25"}]}},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5330,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5189:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5331,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5189:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5332,"name":"_outcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5215,"src":"5201:8:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},{"argumentTypes":null,"id":5333,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5217,"src":"5211:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_int256","typeString":"int256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5329,"name":"OutcomeVote","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4997,"src":"5177:11:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_int256_$_t_uint256_$returns$__$","typeString":"function (address,int256,uint256)"}},"id":5334,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5177:41:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5335,"nodeType":"EmitStatement","src":"5172:46:25"}]},"documentation":"@dev Allows to challenge the oracle outcome\n @param _outcome Outcome to bid on\n @param amount Amount to bid","id":5337,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"voteForOutcome","nodeType":"FunctionDefinition","parameters":{"id":5218,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5215,"name":"_outcome","nodeType":"VariableDeclaration","scope":5337,"src":"4115:12:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5214,"name":"int","nodeType":"ElementaryTypeName","src":"4115:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"},{"constant":false,"id":5217,"name":"amount","nodeType":"VariableDeclaration","scope":5337,"src":"4129:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5216,"name":"uint","nodeType":"ElementaryTypeName","src":"4129:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"4114:27:25"},"payable":false,"returnParameters":{"id":5219,"nodeType":"ParameterList","parameters":[],"src":"4161:0:25"},"scope":5462,"src":"4091:1134:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5387,"nodeType":"Block","src":"5366:429:25","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5343,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"5447:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5344,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5447:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5342,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5439:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5345,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5439:34:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5346,"nodeType":"ExpressionStatement","src":"5439:34:25"},{"expression":{"argumentTypes":null,"id":5361,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":5347,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5483:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5360,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5350,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5508:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5353,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5351,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5523:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5352,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5523:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5355,"indexExpression":{"argumentTypes":null,"id":5354,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5535:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5508:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5348,"name":"totalAmount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5025,"src":"5492:11:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5349,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":6992,"src":"5492:15:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5356,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5492:56:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5357,"name":"totalOutcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5029,"src":"5551:19:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5359,"indexExpression":{"argumentTypes":null,"id":5358,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5571:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5551:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5492:91:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5483:100:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5362,"nodeType":"ExpressionStatement","src":"5483:100:25"},{"expression":{"argumentTypes":null,"id":5370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":5363,"name":"outcomeAmounts","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5035,"src":"5593:14:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_int256_$_t_uint256_$_$","typeString":"mapping(address => mapping(int256 => uint256))"}},"id":5367,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5364,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5608:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5365,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5608:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"5593:26:25","typeDescriptions":{"typeIdentifier":"t_mapping$_t_int256_$_t_uint256_$","typeString":"mapping(int256 => uint256)"}},"id":5368,"indexExpression":{"argumentTypes":null,"id":5366,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"5620:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5593:39:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":5369,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5635:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5593:43:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5371,"nodeType":"ExpressionStatement","src":"5593:43:25"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5375,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5723:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5376,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5723:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5377,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5735:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5373,"name":"collateralToken","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5007,"src":"5698:15:25","typeDescriptions":{"typeIdentifier":"t_contract$_ERC20_$7328","typeString":"contract ERC20"}},"id":5374,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":7351,"src":"5698:24:25","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,uint256) external returns (bool)"}},"id":5378,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5698:44:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":5372,"name":"require","nodeType":"Identifier","overloadedDeclarations":[7625,7626],"referencedDeclaration":7625,"src":"5690:7:25","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":5379,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5690:53:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5380,"nodeType":"ExpressionStatement","src":"5690:53:25"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":5382,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7622,"src":"5769:3:25","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":5383,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"5769:10:25","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":5384,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5340,"src":"5781:6:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":5381,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5003,"src":"5758:10:25","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":5385,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5758:30:25","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":5386,"nodeType":"EmitStatement","src":"5753:35:25"}]},"documentation":"@dev Withdraws winnings for user\n @return Winnings","id":5388,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":5338,"nodeType":"ParameterList","parameters":[],"src":"5314:2:25"},"payable":false,"returnParameters":{"id":5341,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5340,"name":"amount","nodeType":"VariableDeclaration","scope":5388,"src":"5349:11:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5339,"name":"uint","nodeType":"ElementaryTypeName","src":"5349:4:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"5348:13:25"},"scope":5462,"src":"5297:498:25","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":5404,"nodeType":"Block","src":"5992:116:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5402,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5393,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6009:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5394,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6041:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6009:33:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5401,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5398,"name":"forwardedOutcomeSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5019,"src":"6054:28:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5396,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6046:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5397,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6046:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5399,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6046:37:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5400,"name":"challengePeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5011,"src":"6086:15:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6046:55:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6009:92:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5392,"id":5403,"nodeType":"Return","src":"6002:99:25"}]},"documentation":"@dev Checks if time to challenge the outcome is over\n @return Is challenge period over?","id":5405,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallengePeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5389,"nodeType":"ParameterList","parameters":[],"src":"5934:2:25"},"payable":false,"returnParameters":{"id":5392,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5391,"name":"","nodeType":"VariableDeclaration","scope":5405,"src":"5982:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5390,"name":"bool","nodeType":"ElementaryTypeName","src":"5982:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"5981:6:25"},"scope":5462,"src":"5904:204:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5421,"nodeType":"Block","src":"6313:108:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5419,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5412,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5410,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6330:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5411,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6357:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6330:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5418,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":5415,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6370:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":5413,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7624,"src":"6362:3:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":5414,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":7092,"src":"6362:7:25","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":5416,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6362:32:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":5417,"name":"frontRunnerPeriod","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5015,"src":"6397:17:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6362:52:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6330:84:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5409,"id":5420,"nodeType":"Return","src":"6323:91:25"}]},"documentation":"@dev Checks if time to overbid the front runner is over\n @return Is front runner period over?","id":5422,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isFrontRunnerPeriodOver","nodeType":"FunctionDefinition","parameters":{"id":5406,"nodeType":"ParameterList","parameters":[],"src":"6255:2:25"},"payable":false,"returnParameters":{"id":5409,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5408,"name":"","nodeType":"VariableDeclaration","scope":5422,"src":"6303:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5407,"name":"bool","nodeType":"ElementaryTypeName","src":"6303:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6302:6:25"},"scope":5462,"src":"6223:198:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5431,"nodeType":"Block","src":"6583:52:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":5429,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":5427,"name":"frontRunnerSetTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5023,"src":"6600:23:25","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":5428,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6627:1:25","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"6600:28:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5426,"id":5430,"nodeType":"Return","src":"6593:35:25"}]},"documentation":"@dev Checks if outcome was challenged\n @return Is challenged?","id":5432,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isChallenged","nodeType":"FunctionDefinition","parameters":{"id":5423,"nodeType":"ParameterList","parameters":[],"src":"6525:2:25"},"payable":false,"returnParameters":{"id":5426,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5425,"name":"","nodeType":"VariableDeclaration","scope":5432,"src":"6573:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5424,"name":"bool","nodeType":"ElementaryTypeName","src":"6573:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6572:6:25"},"scope":5462,"src":"6504:131:25","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":5447,"nodeType":"Block","src":"6799:113:25","statements":[{"expression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5445,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":5442,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5437,"name":"isChallengePeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5405,"src":"6819:21:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5438,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6819:23:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"id":5441,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"6846:15:25","subExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5439,"name":"isChallenged","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5432,"src":"6847:12:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5440,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6847:14:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:42:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"||","rightExpression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5443,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"6880:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5444,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"6880:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6819:86:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":5436,"id":5446,"nodeType":"Return","src":"6809:96:25"}]},"documentation":"@dev Returns if winning outcome is set\n @return Is outcome set?","id":5448,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"isOutcomeSet","nodeType":"FunctionDefinition","parameters":{"id":5433,"nodeType":"ParameterList","parameters":[],"src":"6741:2:25"},"payable":false,"returnParameters":{"id":5436,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5435,"name":"","nodeType":"VariableDeclaration","scope":5448,"src":"6789:4:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5434,"name":"bool","nodeType":"ElementaryTypeName","src":"6789:4:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"6788:6:25"},"scope":5462,"src":"6720:192:25","stateMutability":"view","superFunction":4711,"visibility":"public"},{"body":{"id":5460,"nodeType":"Block","src":"7055:111:25","statements":[{"condition":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":5453,"name":"isFrontRunnerPeriodOver","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5422,"src":"7069:23:25","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$_t_bool_$","typeString":"function () view returns (bool)"}},"id":5454,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"7069:25:25","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":5457,"nodeType":"IfStatement","src":"7065:61:25","trueBody":{"expression":{"argumentTypes":null,"id":5455,"name":"frontRunner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5021,"src":"7115:11:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5456,"nodeType":"Return","src":"7108:18:25"}},{"expression":{"argumentTypes":null,"id":5458,"name":"forwardedOutcome","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5017,"src":"7143:16:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"functionReturnParameters":5452,"id":5459,"nodeType":"Return","src":"7136:23:25"}]},"documentation":"@dev Returns winning outcome\n @return Outcome","id":5461,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"getOutcome","nodeType":"FunctionDefinition","parameters":{"id":5449,"nodeType":"ParameterList","parameters":[],"src":"6998:2:25"},"payable":false,"returnParameters":{"id":5452,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5451,"name":"","nodeType":"VariableDeclaration","scope":5461,"src":"7046:3:25","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":5450,"name":"int","nodeType":"ElementaryTypeName","src":"7046:3:25","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"value":null,"visibility":"internal"}],"src":"7045:5:25"},"scope":5462,"src":"6979:187:25","stateMutability":"view","superFunction":4716,"visibility":"public"}],"scope":5463,"src":"2613:4555:25"}],"src":"0:7169:25"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-10-19T23:26:43.039Z"}; + +/***/ }), + +/***/ "./node_modules/@gnosis.pm/pm-contracts/build/contracts/WETH9.json": +/*!*************************************************************************!*\ + !*** ./node_modules/@gnosis.pm/pm-contracts/build/contracts/WETH9.json ***! + \*************************************************************************/ +/*! exports provided: contractName, abi, bytecode, deployedBytecode, sourceMap, deployedSourceMap, source, sourcePath, ast, legacyAST, compiler, networks, schemaVersion, updatedAt, default */ /***/ (function(module) { -module.exports = {"contract_name":"UltimateOracleFactory","abi":[{"constant":false,"inputs":[{"name":"oracle","type":"address"},{"name":"collateralToken","type":"address"},{"name":"spreadMultiplier","type":"uint8"},{"name":"challengePeriod","type":"uint256"},{"name":"challengeAmount","type":"uint256"},{"name":"frontRunnerPeriod","type":"uint256"}],"name":"createUltimateOracle","outputs":[{"name":"ultimateOracle","type":"address"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"ultimateOracle","type":"address"},{"indexed":false,"name":"oracle","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"spreadMultiplier","type":"uint8"},{"indexed":false,"name":"challengePeriod","type":"uint256"},{"indexed":false,"name":"challengeAmount","type":"uint256"},{"indexed":false,"name":"frontRunnerPeriod","type":"uint256"}],"name":"UltimateOracleCreation","type":"event"}],"networks":{"3":{"address":"0x47c70527aaa5e98ade8da8100aec805e6fda037b","updated_at":1503605014191},"4":{"address":"0xe81424ffc847919efc5f0156e3799edc60ebf715","updated_at":1503603856237},"42":{"address":"0x679ef161af4bb37b14a6d06d2e2a991d3650005c","updated_at":1503602339890},"437894314312":{"address":"0xd833215cbcc3f914bd1c9ece3ee7bf8b14f841bb","updated_at":1507361155410}},"schema_version":"0.0.5","updated_at":1543915159053}; +module.exports = {"contractName":"WETH9","abi":[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"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":"balanceOf","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"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"guy","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Withdrawal","type":"event"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"},{"name":"wad","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"src","type":"address"},{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x60806040526040805190810160405280600d81526020017f57726170706564204574686572000000000000000000000000000000000000008152506000908051906020019061004f9291906100ca565b506040805190810160405280600481526020017f57455448000000000000000000000000000000000000000000000000000000008152506001908051906020019061009b9291906100ca565b506012600260006101000a81548160ff021916908360ff1602179055503480156100c457600080fd5b5061016f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010b57805160ff1916838001178555610139565b82800160010185558215610139579182015b8281111561013857825182559160200191906001019061011d565b5b509050610146919061014a565b5090565b61016c91905b80821115610168576000816000905550600101610150565b5090565b90565b610c848061017e6000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b9578063095ea7b31461014957806318160ddd146101ae57806323b872dd146101d95780632e1a7d4d1461025e578063313ce5671461028b57806370a08231146102bc57806395d89b4114610313578063a9059cbb146103a3578063d0e30db014610408578063dd62ed3e14610412575b6100b7610489565b005b3480156100c557600080fd5b506100ce610526565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561010e5780820151818401526020810190506100f3565b50505050905090810190601f16801561013b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015557600080fd5b50610194600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105c4565b604051808215151515815260200191505060405180910390f35b3480156101ba57600080fd5b506101c36106b6565b6040518082815260200191505060405180910390f35b3480156101e557600080fd5b50610244600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106d5565b604051808215151515815260200191505060405180910390f35b34801561026a57600080fd5b5061028960048036038101908080359060200190929190505050610a22565b005b34801561029757600080fd5b506102a0610b55565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102c857600080fd5b506102fd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b68565b6040518082815260200191505060405180910390f35b34801561031f57600080fd5b50610328610b80565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036857808201518184015260208101905061034d565b50505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103af57600080fd5b506103ee600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c1e565b604051808215151515815260200191505060405180910390f35b610410610489565b005b34801561041e57600080fd5b50610473600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c33565b6040518082815260200191505060405180910390f35b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105bc5780601f10610591576101008083540402835291602001916105bc565b820191906000526020600020905b81548152906001019060200180831161059f57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561072557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156107fd57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156109185781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561088d57600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a7057600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610b03573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c165780601f10610beb57610100808354040283529160200191610c16565b820191906000526020600020905b815481529060010190602001808311610bf957829003601f168201915b505050505081565b6000610c2b3384846106d5565b905092915050565b60046020528160005260406000206020528060005260406000206000915091505054815600a165627a7a72305820291e2063eb87b6f7391bfb2dbfcd0c234cbcde26101eb879dba26937711f4a890029","deployedBytecode":"0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b9578063095ea7b31461014957806318160ddd146101ae57806323b872dd146101d95780632e1a7d4d1461025e578063313ce5671461028b57806370a08231146102bc57806395d89b4114610313578063a9059cbb146103a3578063d0e30db014610408578063dd62ed3e14610412575b6100b7610489565b005b3480156100c557600080fd5b506100ce610526565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561010e5780820151818401526020810190506100f3565b50505050905090810190601f16801561013b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015557600080fd5b50610194600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105c4565b604051808215151515815260200191505060405180910390f35b3480156101ba57600080fd5b506101c36106b6565b6040518082815260200191505060405180910390f35b3480156101e557600080fd5b50610244600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106d5565b604051808215151515815260200191505060405180910390f35b34801561026a57600080fd5b5061028960048036038101908080359060200190929190505050610a22565b005b34801561029757600080fd5b506102a0610b55565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102c857600080fd5b506102fd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b68565b6040518082815260200191505060405180910390f35b34801561031f57600080fd5b50610328610b80565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036857808201518184015260208101905061034d565b50505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103af57600080fd5b506103ee600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c1e565b604051808215151515815260200191505060405180910390f35b610410610489565b005b34801561041e57600080fd5b50610473600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c33565b6040518082815260200191505060405180910390f35b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105bc5780601f10610591576101008083540402835291602001916105bc565b820191906000526020600020905b81548152906001019060200180831161059f57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561072557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156107fd57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156109185781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561088d57600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a7057600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610b03573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c165780601f10610beb57610100808354040283529160200191610c16565b820191906000526020600020905b815481529060010190602001808311610bf957829003601f168201915b505050505081565b6000610c2b3384846106d5565b905092915050565b60046020528160005260406000206020528060005260406000206000915091505054815600a165627a7a72305820291e2063eb87b6f7391bfb2dbfcd0c234cbcde26101eb879dba26937711f4a890029","sourceMap":"712:1807:1:-;;;733:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;779:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;841:2;816:27;;;;;;;;;;;;;;;;;;;;712:1807;8:9:-1;5:2;;;30:1;27;20:12;5:2;712:1807:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;","deployedSourceMap":"712:1807:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1281:9;:7;:9::i;:::-;712:1807;733:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;733:40:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;733:40:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1747:177;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1747:177:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1646:95;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1646:95:1;;;;;;;;;;;;;;;;;;;;;;;2057:460;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2057:460:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1437:203;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1437:203:1;;;;;;;;;;;;;;;;;;;;;;;;;;816:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;816:27:1;;;;;;;;;;;;;;;;;;;;;;;;;;;1102:65;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1102:65:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;779:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;779:31:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;779:31:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1930:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1930:121:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1302:130;;;;;;1173:65;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1173:65:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1302:130;1371:9;1346;:21;1356:10;1346:21;;;;;;;;;;;;;;;;:34;;;;;;;;;;;1403:10;1395:30;;;1415:9;1395:30;;;;;;;;;;;;;;;;;;1302:130::o;733:40::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1747:177::-;1803:4;1848:3;1819:9;:21;1829:10;1819:21;;;;;;;;;;;;;;;:26;1841:3;1819:26;;;;;;;;;;;;;;;:32;;;;1887:3;1866:30;;1875:10;1866:30;;;1892:3;1866:30;;;;;;;;;;;;;;;;;;1913:4;1906:11;;1747:177;;;;:::o;1646:95::-;1690:4;1721;1713:21;;;1706:28;;1646:95;:::o;2057:460::-;2147:4;2193:3;2175:9;:14;2185:3;2175:14;;;;;;;;;;;;;;;;:21;;2167:30;;;;;;;;2219:10;2212:17;;:3;:17;;;;:59;;;;;2268:2;2233:9;:14;2243:3;2233:14;;;;;;;;;;;;;;;:26;2248:10;2233:26;;;;;;;;;;;;;;;;:38;;2212:59;2208:179;;;2325:3;2295:9;:14;2305:3;2295:14;;;;;;;;;;;;;;;:26;2310:10;2295:26;;;;;;;;;;;;;;;;:33;;2287:42;;;;;;;;2373:3;2343:9;:14;2353:3;2343:14;;;;;;;;;;;;;;;:26;2358:10;2343:26;;;;;;;;;;;;;;;;:33;;;;;;;;;;;2208:179;2415:3;2397:9;:14;2407:3;2397:14;;;;;;;;;;;;;;;;:21;;;;;;;;;;;2446:3;2428:9;:14;2438:3;2428:14;;;;;;;;;;;;;;;;:21;;;;;;;;;;;2479:3;2465:23;;2474:3;2465:23;;;2484:3;2465:23;;;;;;;;;;;;;;;;;;2506:4;2499:11;;2057:460;;;;;:::o;1437:203::-;1515:3;1490:9;:21;1500:10;1490:21;;;;;;;;;;;;;;;;:28;;1482:37;;;;;;;;1554:3;1529:9;:21;1539:10;1529:21;;;;;;;;;;;;;;;;:28;;;;;;;;;;;1567:10;:19;;:24;1587:3;1567:24;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1567:24:1;1617:10;1606:27;;;1629:3;1606:27;;;;;;;;;;;;;;;;;;1437:203;:::o;816:27::-;;;;;;;;;;;;;:::o;1102:65::-;;;;;;;;;;;;;;;;;:::o;779:31::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1930:121::-;1987:4;2010:34;2023:10;2035:3;2040;2010:12;:34::i;:::-;2003:41;;1930:121;;;;:::o;1173:65::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o","source":"// Copyright (C) 2015, 2016, 2017 Dapphub\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.4.18;\n\ncontract WETH9 {\n string public name = \"Wrapped Ether\";\n string public symbol = \"WETH\";\n uint8 public decimals = 18;\n\n event Approval(address indexed src, address indexed guy, uint wad);\n event Transfer(address indexed src, address indexed dst, uint wad);\n event Deposit(address indexed dst, uint wad);\n event Withdrawal(address indexed src, uint wad);\n\n mapping (address => uint) public balanceOf;\n mapping (address => mapping (address => uint)) public allowance;\n\n function() public payable {\n deposit();\n }\n function deposit() public payable {\n balanceOf[msg.sender] += msg.value;\n emit Deposit(msg.sender, msg.value);\n }\n function withdraw(uint wad) public {\n require(balanceOf[msg.sender] >= wad);\n balanceOf[msg.sender] -= wad;\n msg.sender.transfer(wad);\n emit Withdrawal(msg.sender, wad);\n }\n\n function totalSupply() public view returns (uint) {\n return address(this).balance;\n }\n\n function approve(address guy, uint wad) public returns (bool) {\n allowance[msg.sender][guy] = wad;\n emit Approval(msg.sender, guy, wad);\n return true;\n }\n\n function transfer(address dst, uint wad) public returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint wad)\n public\n returns (bool)\n {\n require(balanceOf[src] >= wad);\n\n if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n require(allowance[src][msg.sender] >= wad);\n allowance[src][msg.sender] -= wad;\n }\n\n balanceOf[src] -= wad;\n balanceOf[dst] += wad;\n\n emit Transfer(src, dst, wad);\n\n return true;\n }\n}\n\n\n/*\n GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n.\n\n*/","sourcePath":"canonical-weth/contracts/WETH9.sol","ast":{"absolutePath":"canonical-weth/contracts/WETH9.sol","exportedSymbols":{"WETH9":[304]},"id":305,"nodeType":"SourceUnit","nodes":[{"id":60,"literals":["solidity","^","0.4",".18"],"nodeType":"PragmaDirective","src":"686:24:1"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":304,"linearizedBaseContracts":[304],"name":"WETH9","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":63,"name":"name","nodeType":"VariableDeclaration","scope":304,"src":"733:40:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":61,"name":"string","nodeType":"ElementaryTypeName","src":"733:6:1","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":{"argumentTypes":null,"hexValue":"57726170706564204574686572","id":62,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"758:15:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_00cd3d46df44f2cbb950cf84eb2e92aa2ddd23195b1a009173ea59a063357ed3","typeString":"literal_string \"Wrapped Ether\""},"value":"Wrapped Ether"},"visibility":"public"},{"constant":false,"id":66,"name":"symbol","nodeType":"VariableDeclaration","scope":304,"src":"779:31:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":64,"name":"string","nodeType":"ElementaryTypeName","src":"779:6:1","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":{"argumentTypes":null,"hexValue":"57455448","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"804:6:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8","typeString":"literal_string \"WETH\""},"value":"WETH"},"visibility":"public"},{"constant":false,"id":69,"name":"decimals","nodeType":"VariableDeclaration","scope":304,"src":"816:27:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":67,"name":"uint8","nodeType":"ElementaryTypeName","src":"816:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"3138","id":68,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"841:2:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18_by_1","typeString":"int_const 18"},"value":"18"},"visibility":"public"},{"anonymous":false,"documentation":null,"id":77,"name":"Approval","nodeType":"EventDefinition","parameters":{"id":76,"nodeType":"ParameterList","parameters":[{"constant":false,"id":71,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":77,"src":"866:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":70,"name":"address","nodeType":"ElementaryTypeName","src":"866:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":73,"indexed":true,"name":"guy","nodeType":"VariableDeclaration","scope":77,"src":"887:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":72,"name":"address","nodeType":"ElementaryTypeName","src":"887:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":75,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":77,"src":"908:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":74,"name":"uint","nodeType":"ElementaryTypeName","src":"908:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"865:52:1"},"src":"850:68:1"},{"anonymous":false,"documentation":null,"id":85,"name":"Transfer","nodeType":"EventDefinition","parameters":{"id":84,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":85,"src":"939:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":78,"name":"address","nodeType":"ElementaryTypeName","src":"939:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":81,"indexed":true,"name":"dst","nodeType":"VariableDeclaration","scope":85,"src":"960:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":80,"name":"address","nodeType":"ElementaryTypeName","src":"960:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":83,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":85,"src":"981:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":82,"name":"uint","nodeType":"ElementaryTypeName","src":"981:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"938:52:1"},"src":"923:68:1"},{"anonymous":false,"documentation":null,"id":91,"name":"Deposit","nodeType":"EventDefinition","parameters":{"id":90,"nodeType":"ParameterList","parameters":[{"constant":false,"id":87,"indexed":true,"name":"dst","nodeType":"VariableDeclaration","scope":91,"src":"1011:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"1011:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":89,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":91,"src":"1032:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":88,"name":"uint","nodeType":"ElementaryTypeName","src":"1032:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1010:31:1"},"src":"996:46:1"},{"anonymous":false,"documentation":null,"id":97,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":96,"nodeType":"ParameterList","parameters":[{"constant":false,"id":93,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":97,"src":"1065:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":92,"name":"address","nodeType":"ElementaryTypeName","src":"1065:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":95,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":97,"src":"1086:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":94,"name":"uint","nodeType":"ElementaryTypeName","src":"1086:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1064:31:1"},"src":"1047:49:1"},{"constant":false,"id":101,"name":"balanceOf","nodeType":"VariableDeclaration","scope":304,"src":"1102:65:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":100,"keyType":{"id":98,"name":"address","nodeType":"ElementaryTypeName","src":"1111:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1102:25:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":99,"name":"uint","nodeType":"ElementaryTypeName","src":"1122:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":107,"name":"allowance","nodeType":"VariableDeclaration","scope":304,"src":"1173:65:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":106,"keyType":{"id":102,"name":"address","nodeType":"ElementaryTypeName","src":"1182:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1173:46:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":105,"keyType":{"id":103,"name":"address","nodeType":"ElementaryTypeName","src":"1202:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1193:25:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":104,"name":"uint","nodeType":"ElementaryTypeName","src":"1213:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"},{"body":{"id":113,"nodeType":"Block","src":"1271:26:1","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":110,"name":"deposit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":133,"src":"1281:7:1","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1281:9:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":112,"nodeType":"ExpressionStatement","src":"1281:9:1"}]},"documentation":null,"id":114,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":108,"nodeType":"ParameterList","parameters":[],"src":"1253:2:1"},"payable":true,"returnParameters":{"id":109,"nodeType":"ParameterList","parameters":[],"src":"1271:0:1"},"scope":304,"src":"1245:52:1","stateMutability":"payable","superFunction":null,"visibility":"public"},{"body":{"id":132,"nodeType":"Block","src":"1336:96:1","statements":[{"expression":{"argumentTypes":null,"id":123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":117,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1346:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":120,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":118,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1356:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1356:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1346:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":121,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1371:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"value","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1371:9:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1346:34:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":124,"nodeType":"ExpressionStatement","src":"1346:34:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":126,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1403:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":127,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1403:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":128,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1415:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"value","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1415:9:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":125,"name":"Deposit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":91,"src":"1395:7:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":130,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1395:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":131,"nodeType":"EmitStatement","src":"1390:35:1"}]},"documentation":null,"id":133,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"deposit","nodeType":"FunctionDefinition","parameters":{"id":115,"nodeType":"ParameterList","parameters":[],"src":"1318:2:1"},"payable":true,"returnParameters":{"id":116,"nodeType":"ParameterList","parameters":[],"src":"1336:0:1"},"scope":304,"src":"1302:130:1","stateMutability":"payable","superFunction":null,"visibility":"public"},{"body":{"id":168,"nodeType":"Block","src":"1472:168:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":144,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":139,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1490:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":142,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":140,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1500:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":141,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1500:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1490:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":143,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1515:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1490:28:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":138,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"1482:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":145,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1482:37:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":146,"nodeType":"ExpressionStatement","src":"1482:37:1"},{"expression":{"argumentTypes":null,"id":152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":147,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1529:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":150,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":148,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1539:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1539:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1529:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":151,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1554:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1529:28:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":153,"nodeType":"ExpressionStatement","src":"1529:28:1"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":159,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1587:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":154,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1567:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1567:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":158,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1567:19:1","typeDescriptions":{"typeIdentifier":"t_function_transfer_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":160,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1567:24:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":161,"nodeType":"ExpressionStatement","src":"1567:24:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":163,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1617:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1617:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":165,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1629:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":162,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":97,"src":"1606:10:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1606:27:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":167,"nodeType":"EmitStatement","src":"1601:32:1"}]},"documentation":null,"id":169,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":136,"nodeType":"ParameterList","parameters":[{"constant":false,"id":135,"name":"wad","nodeType":"VariableDeclaration","scope":169,"src":"1455:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":134,"name":"uint","nodeType":"ElementaryTypeName","src":"1455:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1454:10:1"},"payable":false,"returnParameters":{"id":137,"nodeType":"ParameterList","parameters":[],"src":"1472:0:1"},"scope":304,"src":"1437:203:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":179,"nodeType":"Block","src":"1696:45:1","statements":[{"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":175,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":441,"src":"1721:4:1","typeDescriptions":{"typeIdentifier":"t_contract$_WETH9_$304","typeString":"contract WETH9"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_WETH9_$304","typeString":"contract WETH9"}],"id":174,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1713:7:1","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":176,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1713:13:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":177,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balance","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1713:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":173,"id":178,"nodeType":"Return","src":"1706:28:1"}]},"documentation":null,"id":180,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"totalSupply","nodeType":"FunctionDefinition","parameters":{"id":170,"nodeType":"ParameterList","parameters":[],"src":"1666:2:1"},"payable":false,"returnParameters":{"id":173,"nodeType":"ParameterList","parameters":[{"constant":false,"id":172,"name":"","nodeType":"VariableDeclaration","scope":180,"src":"1690:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":171,"name":"uint","nodeType":"ElementaryTypeName","src":"1690:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1689:6:1"},"scope":304,"src":"1646:95:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":207,"nodeType":"Block","src":"1809:115:1","statements":[{"expression":{"argumentTypes":null,"id":196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":189,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"1819:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":193,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":190,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1829:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":191,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1829:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1819:21:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":194,"indexExpression":{"argumentTypes":null,"id":192,"name":"guy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"1841:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1819:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":195,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1848:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1819:32:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":197,"nodeType":"ExpressionStatement","src":"1819:32:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":199,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1875:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1875:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":201,"name":"guy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"1887:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":202,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1892:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":198,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":77,"src":"1866:8:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":203,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1866:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":204,"nodeType":"EmitStatement","src":"1861:35:1"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":205,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1913:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":188,"id":206,"nodeType":"Return","src":"1906:11:1"}]},"documentation":null,"id":208,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":185,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"name":"guy","nodeType":"VariableDeclaration","scope":208,"src":"1764:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":181,"name":"address","nodeType":"ElementaryTypeName","src":"1764:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":184,"name":"wad","nodeType":"VariableDeclaration","scope":208,"src":"1777:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":183,"name":"uint","nodeType":"ElementaryTypeName","src":"1777:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1763:23:1"},"payable":false,"returnParameters":{"id":188,"nodeType":"ParameterList","parameters":[{"constant":false,"id":187,"name":"","nodeType":"VariableDeclaration","scope":208,"src":"1803:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":186,"name":"bool","nodeType":"ElementaryTypeName","src":"1803:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1802:6:1"},"scope":304,"src":"1747:177:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":224,"nodeType":"Block","src":"1993:58:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":218,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2023:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":219,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2023:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":220,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":210,"src":"2035:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":221,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":212,"src":"2040:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":217,"name":"transferFrom","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":303,"src":"2010:12:1","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) returns (bool)"}},"id":222,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2010:34:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":216,"id":223,"nodeType":"Return","src":"2003:41:1"}]},"documentation":null,"id":225,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transfer","nodeType":"FunctionDefinition","parameters":{"id":213,"nodeType":"ParameterList","parameters":[{"constant":false,"id":210,"name":"dst","nodeType":"VariableDeclaration","scope":225,"src":"1948:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":209,"name":"address","nodeType":"ElementaryTypeName","src":"1948:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":212,"name":"wad","nodeType":"VariableDeclaration","scope":225,"src":"1961:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":211,"name":"uint","nodeType":"ElementaryTypeName","src":"1961:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1947:23:1"},"payable":false,"returnParameters":{"id":216,"nodeType":"ParameterList","parameters":[{"constant":false,"id":215,"name":"","nodeType":"VariableDeclaration","scope":225,"src":"1987:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":214,"name":"bool","nodeType":"ElementaryTypeName","src":"1987:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1986:6:1"},"scope":304,"src":"1930:121:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":302,"nodeType":"Block","src":"2157:360:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":237,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2175:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":239,"indexExpression":{"argumentTypes":null,"id":238,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2185:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2175:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":240,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2193:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2175:21:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"2167:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":242,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2167:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":243,"nodeType":"ExpressionStatement","src":"2167:30:1"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":259,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":247,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":244,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2212:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":245,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2219:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2219:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2212:17:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":248,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2233:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":250,"indexExpression":{"argumentTypes":null,"id":249,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2243:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2233:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":253,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":251,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2248:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":252,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2248:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2233:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":256,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"2268:2:1","subExpression":{"argumentTypes":null,"hexValue":"31","id":255,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2269:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}],"id":254,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2263:4:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2263:8:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2233:38:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2212:59:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":281,"nodeType":"IfStatement","src":"2208:179:1","trueBody":{"id":280,"nodeType":"Block","src":"2273:114:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":261,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2295:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":263,"indexExpression":{"argumentTypes":null,"id":262,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2305:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2295:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":266,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":264,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2310:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":265,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2310:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2295:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":267,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2325:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2295:33:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":260,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"2287:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2287:42:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":270,"nodeType":"ExpressionStatement","src":"2287:42:1"},{"expression":{"argumentTypes":null,"id":278,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":271,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2343:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":275,"indexExpression":{"argumentTypes":null,"id":272,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2353:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2343:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":276,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":273,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2358:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":274,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2358:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2343:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":277,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2373:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2343:33:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":279,"nodeType":"ExpressionStatement","src":"2343:33:1"}]}},{"expression":{"argumentTypes":null,"id":286,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":282,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2397:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":284,"indexExpression":{"argumentTypes":null,"id":283,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2407:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2397:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":285,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2415:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2397:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":287,"nodeType":"ExpressionStatement","src":"2397:21:1"},{"expression":{"argumentTypes":null,"id":292,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":288,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2428:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":290,"indexExpression":{"argumentTypes":null,"id":289,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":229,"src":"2438:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2428:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"id":291,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2446:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2428:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":293,"nodeType":"ExpressionStatement","src":"2428:21:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":295,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2474:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":296,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":229,"src":"2479:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":297,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2484:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":294,"name":"Transfer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"2465:8:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2465:23:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":299,"nodeType":"EmitStatement","src":"2460:28:1"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":300,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2506:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":235,"id":301,"nodeType":"Return","src":"2499:11:1"}]},"documentation":null,"id":303,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":232,"nodeType":"ParameterList","parameters":[{"constant":false,"id":227,"name":"src","nodeType":"VariableDeclaration","scope":303,"src":"2079:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":226,"name":"address","nodeType":"ElementaryTypeName","src":"2079:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":229,"name":"dst","nodeType":"VariableDeclaration","scope":303,"src":"2092:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":228,"name":"address","nodeType":"ElementaryTypeName","src":"2092:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":231,"name":"wad","nodeType":"VariableDeclaration","scope":303,"src":"2105:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":230,"name":"uint","nodeType":"ElementaryTypeName","src":"2105:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2078:36:1"},"payable":false,"returnParameters":{"id":235,"nodeType":"ParameterList","parameters":[{"constant":false,"id":234,"name":"","nodeType":"VariableDeclaration","scope":303,"src":"2147:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":233,"name":"bool","nodeType":"ElementaryTypeName","src":"2147:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2146:6:1"},"scope":304,"src":"2057:460:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":305,"src":"712:1807:1"}],"src":"686:36989:1"},"legacyAST":{"absolutePath":"canonical-weth/contracts/WETH9.sol","exportedSymbols":{"WETH9":[304]},"id":305,"nodeType":"SourceUnit","nodes":[{"id":60,"literals":["solidity","^","0.4",".18"],"nodeType":"PragmaDirective","src":"686:24:1"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":304,"linearizedBaseContracts":[304],"name":"WETH9","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":63,"name":"name","nodeType":"VariableDeclaration","scope":304,"src":"733:40:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":61,"name":"string","nodeType":"ElementaryTypeName","src":"733:6:1","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":{"argumentTypes":null,"hexValue":"57726170706564204574686572","id":62,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"758:15:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_00cd3d46df44f2cbb950cf84eb2e92aa2ddd23195b1a009173ea59a063357ed3","typeString":"literal_string \"Wrapped Ether\""},"value":"Wrapped Ether"},"visibility":"public"},{"constant":false,"id":66,"name":"symbol","nodeType":"VariableDeclaration","scope":304,"src":"779:31:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":64,"name":"string","nodeType":"ElementaryTypeName","src":"779:6:1","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":{"argumentTypes":null,"hexValue":"57455448","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"804:6:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8","typeString":"literal_string \"WETH\""},"value":"WETH"},"visibility":"public"},{"constant":false,"id":69,"name":"decimals","nodeType":"VariableDeclaration","scope":304,"src":"816:27:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":67,"name":"uint8","nodeType":"ElementaryTypeName","src":"816:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"value":{"argumentTypes":null,"hexValue":"3138","id":68,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"841:2:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_18_by_1","typeString":"int_const 18"},"value":"18"},"visibility":"public"},{"anonymous":false,"documentation":null,"id":77,"name":"Approval","nodeType":"EventDefinition","parameters":{"id":76,"nodeType":"ParameterList","parameters":[{"constant":false,"id":71,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":77,"src":"866:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":70,"name":"address","nodeType":"ElementaryTypeName","src":"866:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":73,"indexed":true,"name":"guy","nodeType":"VariableDeclaration","scope":77,"src":"887:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":72,"name":"address","nodeType":"ElementaryTypeName","src":"887:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":75,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":77,"src":"908:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":74,"name":"uint","nodeType":"ElementaryTypeName","src":"908:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"865:52:1"},"src":"850:68:1"},{"anonymous":false,"documentation":null,"id":85,"name":"Transfer","nodeType":"EventDefinition","parameters":{"id":84,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":85,"src":"939:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":78,"name":"address","nodeType":"ElementaryTypeName","src":"939:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":81,"indexed":true,"name":"dst","nodeType":"VariableDeclaration","scope":85,"src":"960:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":80,"name":"address","nodeType":"ElementaryTypeName","src":"960:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":83,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":85,"src":"981:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":82,"name":"uint","nodeType":"ElementaryTypeName","src":"981:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"938:52:1"},"src":"923:68:1"},{"anonymous":false,"documentation":null,"id":91,"name":"Deposit","nodeType":"EventDefinition","parameters":{"id":90,"nodeType":"ParameterList","parameters":[{"constant":false,"id":87,"indexed":true,"name":"dst","nodeType":"VariableDeclaration","scope":91,"src":"1011:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"1011:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":89,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":91,"src":"1032:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":88,"name":"uint","nodeType":"ElementaryTypeName","src":"1032:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1010:31:1"},"src":"996:46:1"},{"anonymous":false,"documentation":null,"id":97,"name":"Withdrawal","nodeType":"EventDefinition","parameters":{"id":96,"nodeType":"ParameterList","parameters":[{"constant":false,"id":93,"indexed":true,"name":"src","nodeType":"VariableDeclaration","scope":97,"src":"1065:19:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":92,"name":"address","nodeType":"ElementaryTypeName","src":"1065:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":95,"indexed":false,"name":"wad","nodeType":"VariableDeclaration","scope":97,"src":"1086:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":94,"name":"uint","nodeType":"ElementaryTypeName","src":"1086:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1064:31:1"},"src":"1047:49:1"},{"constant":false,"id":101,"name":"balanceOf","nodeType":"VariableDeclaration","scope":304,"src":"1102:65:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":100,"keyType":{"id":98,"name":"address","nodeType":"ElementaryTypeName","src":"1111:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1102:25:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":99,"name":"uint","nodeType":"ElementaryTypeName","src":"1122:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":107,"name":"allowance","nodeType":"VariableDeclaration","scope":304,"src":"1173:65:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"typeName":{"id":106,"keyType":{"id":102,"name":"address","nodeType":"ElementaryTypeName","src":"1182:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1173:46:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"},"valueType":{"id":105,"keyType":{"id":103,"name":"address","nodeType":"ElementaryTypeName","src":"1202:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"1193:25:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":104,"name":"uint","nodeType":"ElementaryTypeName","src":"1213:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}}},"value":null,"visibility":"public"},{"body":{"id":113,"nodeType":"Block","src":"1271:26:1","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":110,"name":"deposit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":133,"src":"1281:7:1","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1281:9:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":112,"nodeType":"ExpressionStatement","src":"1281:9:1"}]},"documentation":null,"id":114,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":108,"nodeType":"ParameterList","parameters":[],"src":"1253:2:1"},"payable":true,"returnParameters":{"id":109,"nodeType":"ParameterList","parameters":[],"src":"1271:0:1"},"scope":304,"src":"1245:52:1","stateMutability":"payable","superFunction":null,"visibility":"public"},{"body":{"id":132,"nodeType":"Block","src":"1336:96:1","statements":[{"expression":{"argumentTypes":null,"id":123,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":117,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1346:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":120,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":118,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1356:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1356:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1346:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":121,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1371:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"value","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1371:9:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1346:34:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":124,"nodeType":"ExpressionStatement","src":"1346:34:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":126,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1403:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":127,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1403:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"expression":{"argumentTypes":null,"id":128,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1415:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"value","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1415:9:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":125,"name":"Deposit","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":91,"src":"1395:7:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":130,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1395:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":131,"nodeType":"EmitStatement","src":"1390:35:1"}]},"documentation":null,"id":133,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"deposit","nodeType":"FunctionDefinition","parameters":{"id":115,"nodeType":"ParameterList","parameters":[],"src":"1318:2:1"},"payable":true,"returnParameters":{"id":116,"nodeType":"ParameterList","parameters":[],"src":"1336:0:1"},"scope":304,"src":"1302:130:1","stateMutability":"payable","superFunction":null,"visibility":"public"},{"body":{"id":168,"nodeType":"Block","src":"1472:168:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":144,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":139,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1490:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":142,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":140,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1500:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":141,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1500:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1490:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":143,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1515:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1490:28:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":138,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"1482:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":145,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1482:37:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":146,"nodeType":"ExpressionStatement","src":"1482:37:1"},{"expression":{"argumentTypes":null,"id":152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":147,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"1529:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":150,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":148,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1539:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":149,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1539:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1529:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":151,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1554:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1529:28:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":153,"nodeType":"ExpressionStatement","src":"1529:28:1"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":159,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1587:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":154,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1567:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":157,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1567:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":158,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"transfer","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1567:19:1","typeDescriptions":{"typeIdentifier":"t_function_transfer_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":160,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1567:24:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":161,"nodeType":"ExpressionStatement","src":"1567:24:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":163,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1617:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":164,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1617:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":165,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":135,"src":"1629:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":162,"name":"Withdrawal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":97,"src":"1606:10:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":166,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1606:27:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":167,"nodeType":"EmitStatement","src":"1601:32:1"}]},"documentation":null,"id":169,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"withdraw","nodeType":"FunctionDefinition","parameters":{"id":136,"nodeType":"ParameterList","parameters":[{"constant":false,"id":135,"name":"wad","nodeType":"VariableDeclaration","scope":169,"src":"1455:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":134,"name":"uint","nodeType":"ElementaryTypeName","src":"1455:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1454:10:1"},"payable":false,"returnParameters":{"id":137,"nodeType":"ParameterList","parameters":[],"src":"1472:0:1"},"scope":304,"src":"1437:203:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":179,"nodeType":"Block","src":"1696:45:1","statements":[{"expression":{"argumentTypes":null,"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":175,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":441,"src":"1721:4:1","typeDescriptions":{"typeIdentifier":"t_contract$_WETH9_$304","typeString":"contract WETH9"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_WETH9_$304","typeString":"contract WETH9"}],"id":174,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1713:7:1","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":176,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1713:13:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":177,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balance","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1713:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":173,"id":178,"nodeType":"Return","src":"1706:28:1"}]},"documentation":null,"id":180,"implemented":true,"isConstructor":false,"isDeclaredConst":true,"modifiers":[],"name":"totalSupply","nodeType":"FunctionDefinition","parameters":{"id":170,"nodeType":"ParameterList","parameters":[],"src":"1666:2:1"},"payable":false,"returnParameters":{"id":173,"nodeType":"ParameterList","parameters":[{"constant":false,"id":172,"name":"","nodeType":"VariableDeclaration","scope":180,"src":"1690:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":171,"name":"uint","nodeType":"ElementaryTypeName","src":"1690:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1689:6:1"},"scope":304,"src":"1646:95:1","stateMutability":"view","superFunction":null,"visibility":"public"},{"body":{"id":207,"nodeType":"Block","src":"1809:115:1","statements":[{"expression":{"argumentTypes":null,"id":196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":189,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"1819:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":193,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":190,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1829:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":191,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1829:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1819:21:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":194,"indexExpression":{"argumentTypes":null,"id":192,"name":"guy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"1841:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1819:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":195,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1848:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1819:32:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":197,"nodeType":"ExpressionStatement","src":"1819:32:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":199,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"1875:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1875:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":201,"name":"guy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"1887:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":202,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1892:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":198,"name":"Approval","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":77,"src":"1866:8:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":203,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1866:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":204,"nodeType":"EmitStatement","src":"1861:35:1"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":205,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1913:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":188,"id":206,"nodeType":"Return","src":"1906:11:1"}]},"documentation":null,"id":208,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"approve","nodeType":"FunctionDefinition","parameters":{"id":185,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"name":"guy","nodeType":"VariableDeclaration","scope":208,"src":"1764:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":181,"name":"address","nodeType":"ElementaryTypeName","src":"1764:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":184,"name":"wad","nodeType":"VariableDeclaration","scope":208,"src":"1777:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":183,"name":"uint","nodeType":"ElementaryTypeName","src":"1777:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1763:23:1"},"payable":false,"returnParameters":{"id":188,"nodeType":"ParameterList","parameters":[{"constant":false,"id":187,"name":"","nodeType":"VariableDeclaration","scope":208,"src":"1803:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":186,"name":"bool","nodeType":"ElementaryTypeName","src":"1803:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1802:6:1"},"scope":304,"src":"1747:177:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":224,"nodeType":"Block","src":"1993:58:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":218,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2023:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":219,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2023:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":220,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":210,"src":"2035:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":221,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":212,"src":"2040:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":217,"name":"transferFrom","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":303,"src":"2010:12:1","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$","typeString":"function (address,address,uint256) returns (bool)"}},"id":222,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2010:34:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":216,"id":223,"nodeType":"Return","src":"2003:41:1"}]},"documentation":null,"id":225,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transfer","nodeType":"FunctionDefinition","parameters":{"id":213,"nodeType":"ParameterList","parameters":[{"constant":false,"id":210,"name":"dst","nodeType":"VariableDeclaration","scope":225,"src":"1948:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":209,"name":"address","nodeType":"ElementaryTypeName","src":"1948:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":212,"name":"wad","nodeType":"VariableDeclaration","scope":225,"src":"1961:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":211,"name":"uint","nodeType":"ElementaryTypeName","src":"1961:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1947:23:1"},"payable":false,"returnParameters":{"id":216,"nodeType":"ParameterList","parameters":[{"constant":false,"id":215,"name":"","nodeType":"VariableDeclaration","scope":225,"src":"1987:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":214,"name":"bool","nodeType":"ElementaryTypeName","src":"1987:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1986:6:1"},"scope":304,"src":"1930:121:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":302,"nodeType":"Block","src":"2157:360:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":241,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":237,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2175:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":239,"indexExpression":{"argumentTypes":null,"id":238,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2185:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2175:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":240,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2193:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2175:21:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":236,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"2167:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":242,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2167:30:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":243,"nodeType":"ExpressionStatement","src":"2167:30:1"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":259,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":247,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":244,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2212:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":245,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2219:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2219:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2212:17:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":248,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2233:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":250,"indexExpression":{"argumentTypes":null,"id":249,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2243:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2233:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":253,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":251,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2248:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":252,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2248:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2233:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":256,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"-","prefix":true,"src":"2268:2:1","subExpression":{"argumentTypes":null,"hexValue":"31","id":255,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2269:1:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"typeDescriptions":{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_-1_by_1","typeString":"int_const -1"}],"id":254,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2263:4:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":"uint"},"id":257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2263:8:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2233:38:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"2212:59:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":281,"nodeType":"IfStatement","src":"2208:179:1","trueBody":{"id":280,"nodeType":"Block","src":"2273:114:1","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":261,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2295:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":263,"indexExpression":{"argumentTypes":null,"id":262,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2305:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2295:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":266,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":264,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2310:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":265,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2310:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2295:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":267,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2325:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2295:33:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":260,"name":"require","nodeType":"Identifier","overloadedDeclarations":[431,432],"referencedDeclaration":431,"src":"2287:7:1","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2287:42:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":270,"nodeType":"ExpressionStatement","src":"2287:42:1"},{"expression":{"argumentTypes":null,"id":278,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":271,"name":"allowance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"2343:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$","typeString":"mapping(address => mapping(address => uint256))"}},"id":275,"indexExpression":{"argumentTypes":null,"id":272,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2353:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2343:14:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":276,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":273,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":428,"src":"2358:3:1","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":274,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2358:10:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2343:26:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":277,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2373:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2343:33:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":279,"nodeType":"ExpressionStatement","src":"2343:33:1"}]}},{"expression":{"argumentTypes":null,"id":286,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":282,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2397:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":284,"indexExpression":{"argumentTypes":null,"id":283,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2407:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2397:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":285,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2415:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2397:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":287,"nodeType":"ExpressionStatement","src":"2397:21:1"},{"expression":{"argumentTypes":null,"id":292,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":288,"name":"balanceOf","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"2428:9:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":290,"indexExpression":{"argumentTypes":null,"id":289,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":229,"src":"2438:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2428:14:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"id":291,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2446:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2428:21:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":293,"nodeType":"ExpressionStatement","src":"2428:21:1"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":295,"name":"src","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2474:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":296,"name":"dst","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":229,"src":"2479:3:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":297,"name":"wad","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":231,"src":"2484:3:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":294,"name":"Transfer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"2465:8:1","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,address,uint256)"}},"id":298,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2465:23:1","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":299,"nodeType":"EmitStatement","src":"2460:28:1"},{"expression":{"argumentTypes":null,"hexValue":"74727565","id":300,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2506:4:1","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":235,"id":301,"nodeType":"Return","src":"2499:11:1"}]},"documentation":null,"id":303,"implemented":true,"isConstructor":false,"isDeclaredConst":false,"modifiers":[],"name":"transferFrom","nodeType":"FunctionDefinition","parameters":{"id":232,"nodeType":"ParameterList","parameters":[{"constant":false,"id":227,"name":"src","nodeType":"VariableDeclaration","scope":303,"src":"2079:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":226,"name":"address","nodeType":"ElementaryTypeName","src":"2079:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":229,"name":"dst","nodeType":"VariableDeclaration","scope":303,"src":"2092:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":228,"name":"address","nodeType":"ElementaryTypeName","src":"2092:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":231,"name":"wad","nodeType":"VariableDeclaration","scope":303,"src":"2105:8:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":230,"name":"uint","nodeType":"ElementaryTypeName","src":"2105:4:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2078:36:1"},"payable":false,"returnParameters":{"id":235,"nodeType":"ParameterList","parameters":[{"constant":false,"id":234,"name":"","nodeType":"VariableDeclaration","scope":303,"src":"2147:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":233,"name":"bool","nodeType":"ElementaryTypeName","src":"2147:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2146:6:1"},"scope":304,"src":"2057:460:1","stateMutability":"nonpayable","superFunction":null,"visibility":"public"}],"scope":305,"src":"712:1807:1"}],"src":"686:36989:1"},"compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{"1":{"address":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","transactionHash":"0xb95343413e459a0f97461812111254163ae53467855c0d73e0f1e7c5b8442fa3"},"3":{"address":"0xc778417e063141139fce010982780140aa0cd5ab","transactionHash":"0x19ae7fb1bd96c6f623741f76573a3e97d8a863358dafb1d773a8f9ad98b424b4"},"4":{"address":"0xc778417e063141139fce010982780140aa0cd5ab","transactionHash":"0x7bc8e85f99556aa23a41dd3c107e92ec76f057e4cea39f376ffb1b15d514b11f"},"42":{"address":"0xd0a1e359811322d97991e03f863a0c30c2cf029c","transactionHash":"0x0e8d602b350e2a896134d79b48b8a59488a0a70933d46c5736c47b468877be35"},"437894314312":{"address":"0xcfeb869f69431e42cdb54a4f4f105c19c080a601","transactionHash":"0xbde58e255830705b09f384278a5bd2d3ee2217c43496b07b5150922be2b1459f"}},"schemaVersion":"2.0.1","updatedAt":"2018-10-29T15:25:24.154Z"}; /***/ }), @@ -506,10 +890,10 @@ module.exports = {"contract_name":"UltimateOracleFactory","abi":[{"constant":fal /*!*******************************************************************!*\ !*** ./node_modules/@gnosis.pm/pm-contracts/build/gas-stats.json ***! \*******************************************************************/ -/*! exports provided: EventFactory, CentralizedOracleFactory, StandardMarketFactory, LMSRMarketMaker, EtherToken, OutcomeToken, StandardMarket, CategoricalEvent, ScalarEvent, CentralizedOracle, Campaign, CampaignFactory, Math, DifficultyOracle, DifficultyOracleFactory, MajorityOracle, MajorityOracleFactory, UltimateOracle, UltimateOracleFactory, FutarchyOracle, FutarchyOracleFactory, StandardMarketWithPriceLogger, Event, Market, MarketMaker, Oracle, StandardToken, Token, default */ +/*! exports provided: CategoricalEvent, ScalarEvent, EventFactory, OutcomeToken, WETH9, CentralizedOracle, CentralizedOracleFactory, StandardMarketFactory, LMSRMarketMaker, StandardMarket, Campaign, CampaignFactory, DifficultyOracle, DifficultyOracleFactory, MajorityOracle, MajorityOracleFactory, UltimateOracle, UltimateOracleFactory, FutarchyOracle, FutarchyOracleFactory, StandardMarketWithPriceLogger, Event, Market, MarketMaker, Oracle, StandardToken, ERC20, EtherToken, Token, default */ /***/ (function(module) { -module.exports = {"EventFactory":{"createCategoricalEvent":{"averageGasUsed":1976518,"min":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":1976518},"max":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":1976518},"median":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":1976518}},"createScalarEvent":{"averageGasUsed":2245471,"min":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":2245471},"max":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":2245471},"median":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":2245471}}},"CentralizedOracleFactory":{"createCentralizedOracle":{"averageGasUsed":350373,"min":{"args":["QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG"],"gasUsed":350373},"max":{"args":["QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG"],"gasUsed":350373},"median":{"args":["QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG"],"gasUsed":350373}}},"StandardMarketFactory":{"createMarket":{"averageGasUsed":1660105.5714285714,"min":{"args":["0xbef81e74f82c7ed1735c4b3e61476f64d83b94ce"],"gasUsed":1660069},"max":{"args":["0xf8a8de3abf591d6565e1c3ba98e94d3319ca2fe2"],"gasUsed":1660197},"median":{"args":["0x11ad27d66d2c188e5c06efc98f6b179bbe0cd716"],"gasUsed":1660069}}},"LMSRMarketMaker":{"calcProfit":{"averageGasUsed":141889.11111111112,"min":{"args":["0x6ca2101fa00b47e104f92a0b5bac040332f135a9"],"gasUsed":141839},"max":{"args":["0x10fc2cbfd0aacddefecbae8f551a70edb99138a1"],"gasUsed":141903},"median":{"args":["0x10fc2cbfd0aacddefecbae8f551a70edb99138a1"],"gasUsed":141903}},"calcMarginalPrice":{"averageGasUsed":79167.44444444444,"min":{"args":["0x877f88fc5b2d0195346d72e618c699ba8dadf060"],"gasUsed":76791},"max":{"args":["0xbce73ce89e6ea0ac20888df4261f8fb19159384c"],"gasUsed":80096},"median":{"args":["0x6ca2101fa00b47e104f92a0b5bac040332f135a9"],"gasUsed":80096}},"calcCost":{"averageGasUsed":140075.72727272726,"min":{"args":["0x877f88fc5b2d0195346d72e618c699ba8dadf060"],"gasUsed":135410},"max":{"args":["0x60d3fcb0c0c43b55abdf8715480e2af04ee7d56b"],"gasUsed":142687},"median":{"args":["0xbce73ce89e6ea0ac20888df4261f8fb19159384c"],"gasUsed":141792}}},"EtherToken":{"deposit":{"averageGasUsed":52442.28571428572,"min":{"args":[],"gasUsed":37978},"max":{"args":[],"gasUsed":67978},"median":{"args":[],"gasUsed":52978}},"balanceOf":{"averageGasUsed":23458.162790697676,"min":{"args":["0x0b44ea000422656f11dd3605b3f23517f5383d53"],"gasUsed":23415},"max":{"args":["0xd88abf130c5e38a3db63aa6ed51e6a80f045a424"],"gasUsed":23479},"median":{"args":["0xbef81e74f82c7ed1735c4b3e61476f64d83b94ce"],"gasUsed":23479}},"approve":{"averageGasUsed":43583.70909090909,"min":{"args":["0x6ca2101fa00b47e104f92a0b5bac040332f135a9"],"gasUsed":30608},"max":{"args":["0x11ad27d66d2c188e5c06efc98f6b179bbe0cd716"],"gasUsed":45672},"median":{"args":["0xc2cc06a620e1b9b03b6a0bede206a75abadaff00"],"gasUsed":45544}}},"OutcomeToken":{"approve":{"averageGasUsed":45594,"min":{"args":["0x10fc2cbfd0aacddefecbae8f551a70edb99138a1"],"gasUsed":45586},"max":{"args":["0x60d3fcb0c0c43b55abdf8715480e2af04ee7d56b"],"gasUsed":45650},"median":{"args":["0x10fc2cbfd0aacddefecbae8f551a70edb99138a1"],"gasUsed":45586}},"balanceOf":{"averageGasUsed":23379.117647058825,"min":{"args":["0x0b44ea000422656f11dd3605b3f23517f5383d53"],"gasUsed":23349},"max":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":23413},"median":{"args":["0x7d9eee48f963cb142d0025913417097d8cdddc61"],"gasUsed":23349}}},"StandardMarket":{"fund":{"averageGasUsed":222766.85714285713,"min":{"args":[],"gasUsed":222584},"max":{"args":[],"gasUsed":222904},"median":{"args":[],"gasUsed":222904}},"sell":{"averageGasUsed":260341.42857142858,"min":{"args":[0],"gasUsed":243302},"max":{"args":[1],"gasUsed":288430},"median":{"args":[1],"gasUsed":258110}},"netOutcomeTokensSold":{"averageGasUsed":22322,"min":{"args":[0],"gasUsed":22290},"max":{"args":[1],"gasUsed":22354},"median":{"args":[1],"gasUsed":22354}},"buy":{"averageGasUsed":286544.7878787879,"min":{"args":[1],"gasUsed":271452},"max":{"args":[1],"gasUsed":384998},"median":{"args":[1],"gasUsed":277514}},"close":{"averageGasUsed":87469,"min":{"args":[],"gasUsed":87469},"max":{"args":[],"gasUsed":87469},"median":{"args":[],"gasUsed":87469}},"calcMarketFee":{"averageGasUsed":22534.6,"min":{"args":["500086643396031"],"gasUsed":22517},"max":{"args":["500086643396031"],"gasUsed":22605},"median":{"args":["499913356603969"],"gasUsed":22517}},"shortSell":{"averageGasUsed":481186,"min":{"args":[0],"gasUsed":481186},"max":{"args":[0],"gasUsed":481186},"median":{"args":[0],"gasUsed":481186}},"eventContract":{"averageGasUsed":22276,"min":{"args":[],"gasUsed":22276},"max":{"args":[],"gasUsed":22276},"median":{"args":[],"gasUsed":22276}}},"CategoricalEvent":{"outcomeTokens":{"averageGasUsed":22502.333333333332,"min":{"args":[0],"gasUsed":22465},"max":{"args":[1],"gasUsed":22529},"median":{"args":[1],"gasUsed":22529}},"buyAllOutcomes":{"averageGasUsed":96840.43478260869,"min":{"args":[],"gasUsed":60982},"max":{"args":[],"gasUsed":165982},"median":{"args":[],"gasUsed":90982}},"sellAllOutcomes":{"averageGasUsed":45446,"min":{"args":[],"gasUsed":41616},"max":{"args":[],"gasUsed":49276},"median":{"args":[],"gasUsed":49276}},"getOutcomeCount":{"averageGasUsed":21847,"min":{"args":[],"gasUsed":21847},"max":{"args":[],"gasUsed":21847},"median":{"args":[],"gasUsed":21847}},"getOutcomeTokens":{"averageGasUsed":23351,"min":{"args":[],"gasUsed":23351},"max":{"args":[],"gasUsed":23351},"median":{"args":[],"gasUsed":23351}},"getOutcomeTokenDistribution":{"averageGasUsed":30234,"min":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":30234},"max":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":30234},"median":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":30234}},"setOutcome":{"averageGasUsed":52955.333333333336,"min":{"args":[],"gasUsed":52884},"max":{"args":[],"gasUsed":53098},"median":{"args":[],"gasUsed":52884}},"outcome":{"averageGasUsed":21727,"min":{"args":[],"gasUsed":21727},"max":{"args":[],"gasUsed":21727},"median":{"args":[],"gasUsed":21727}},"isOutcomeSet":{"averageGasUsed":22011,"min":{"args":[],"gasUsed":22011},"max":{"args":[],"gasUsed":22011},"median":{"args":[],"gasUsed":22011}},"redeemWinnings":{"averageGasUsed":40809,"min":{"args":[{"from":"0x0b44ea000422656f11dd3605b3f23517f5383d53"}],"gasUsed":40809},"max":{"args":[{"from":"0x0b44ea000422656f11dd3605b3f23517f5383d53"}],"gasUsed":40809},"median":{"args":[{"from":"0x0b44ea000422656f11dd3605b3f23517f5383d53"}],"gasUsed":40809}}},"ScalarEvent":{"buyAllOutcomes":{"averageGasUsed":135662,"min":{"args":[],"gasUsed":135662},"max":{"args":[],"gasUsed":135662},"median":{"args":[],"gasUsed":135662}},"outcomeTokens":{"averageGasUsed":22541,"min":{"args":[0],"gasUsed":22509},"max":{"args":[1],"gasUsed":22573},"median":{"args":[1],"gasUsed":22573}},"setOutcome":{"averageGasUsed":45258,"min":{"args":[],"gasUsed":37758},"max":{"args":[],"gasUsed":52758},"median":{"args":[],"gasUsed":52758}},"outcome":{"averageGasUsed":21727,"min":{"args":[],"gasUsed":21727},"max":{"args":[],"gasUsed":21727},"median":{"args":[],"gasUsed":21727}},"isOutcomeSet":{"averageGasUsed":22058,"min":{"args":[],"gasUsed":22058},"max":{"args":[],"gasUsed":22058},"median":{"args":[],"gasUsed":22058}},"redeemWinnings":{"averageGasUsed":56244,"min":{"args":[{"from":"0x9150a1c46a0708aa4200c46ab2c33f7e1b58146b"}],"gasUsed":56244},"max":{"args":[{"from":"0x9150a1c46a0708aa4200c46ab2c33f7e1b58146b"}],"gasUsed":56244},"median":{"args":[{"from":"0x9150a1c46a0708aa4200c46ab2c33f7e1b58146b"}],"gasUsed":56244}}},"CentralizedOracle":{"setOutcome":{"averageGasUsed":61986.666666666664,"min":{"args":[],"gasUsed":48376},"max":{"args":[],"gasUsed":65424},"median":{"args":[],"gasUsed":63440}},"getOutcome":{"averageGasUsed":21687,"min":{"args":[],"gasUsed":21687},"max":{"args":[],"gasUsed":21687},"median":{"args":[],"gasUsed":21687}},"isOutcomeSet":{"averageGasUsed":21809,"min":{"args":[],"gasUsed":21809},"max":{"args":[],"gasUsed":21809},"median":{"args":[],"gasUsed":21809}},"owner":{"averageGasUsed":21861,"min":{"args":[],"gasUsed":21861},"max":{"args":[],"gasUsed":21861},"median":{"args":[],"gasUsed":21861}},"replaceOwner":{"averageGasUsed":29970,"min":{"args":[],"gasUsed":29970},"max":{"args":[],"gasUsed":29970},"median":{"args":[],"gasUsed":29970}},"ipfsHash":{"averageGasUsed":23190,"min":{"args":[],"gasUsed":23190},"max":{"args":[],"gasUsed":23190},"median":{"args":[],"gasUsed":23190}}},"Campaign":{"stage":{"averageGasUsed":21951,"min":{"args":[],"gasUsed":21951},"max":{"args":[],"gasUsed":21951},"median":{"args":[],"gasUsed":21951}},"fund":{"averageGasUsed":71872,"min":{"args":[],"gasUsed":70124},"max":{"args":[],"gasUsed":75368},"median":{"args":[],"gasUsed":70124}},"createMarket":{"averageGasUsed":1903625,"min":{"args":[],"gasUsed":1903625},"max":{"args":[],"gasUsed":1903625},"median":{"args":[],"gasUsed":1903625}},"closeMarket":{"averageGasUsed":157749,"min":{"args":[],"gasUsed":157749},"max":{"args":[],"gasUsed":157749},"median":{"args":[],"gasUsed":157749}},"finalBalance":{"averageGasUsed":21749,"min":{"args":[],"gasUsed":21749},"max":{"args":[],"gasUsed":21749},"median":{"args":[],"gasUsed":21749}},"withdrawFees":{"averageGasUsed":50194,"min":{"args":[{"from":"0x9150a1c46a0708aa4200c46ab2c33f7e1b58146b"}],"gasUsed":38969},"max":{"args":[{"from":"0x0b44ea000422656f11dd3605b3f23517f5383d53"}],"gasUsed":53969},"median":{"args":[{"from":"0x9150a1c46a0708aa4200c46ab2c33f7e1b58146b"}],"gasUsed":53919}},"refund":{"averageGasUsed":54150,"min":{"args":[{"from":"0xd50de030398eb595484d74137d759ac6a7891582"}],"gasUsed":51423},"max":{"args":[{"from":"0xd50de030398eb595484d74137d759ac6a7891582"}],"gasUsed":56877},"median":{"args":[{"from":"0xd50de030398eb595484d74137d759ac6a7891582"}],"gasUsed":56877}}},"CampaignFactory":{"createCampaign":{"averageGasUsed":1066303,"min":{"args":["0x11ad27d66d2c188e5c06efc98f6b179bbe0cd716"],"gasUsed":1066303},"max":{"args":["0x0f2dbc0b6bc01839188d3fad510e52e8ccf5bf8b"],"gasUsed":1066303},"median":{"args":["0x0f2dbc0b6bc01839188d3fad510e52e8ccf5bf8b"],"gasUsed":1066303}}},"Math":{"ln":{"averageGasUsed":28450.571428571428,"min":{"args":[1],"gasUsed":26432},"max":{"args":["6.5875617225350458507164291711491267568489414131416679303040466650929355994124e+76"],"gasUsed":28858},"median":{"args":["1.08337594647590153502256770852424721707223051080078957796243635758330252596358e+77"],"gasUsed":28858}},"exp":{"averageGasUsed":24399.64285714286,"min":{"args":["-5.7896044618658097711785492504343953926634992332820282019728792003956564819967e+76"],"gasUsed":22181},"max":{"args":["-818323753292969962227"],"gasUsed":27288},"median":{"args":["-4.948708049799658172145659786585123648106840583991726753314769419303231476566e+76"],"gasUsed":24101}},"max":{"averageGasUsed":34348.8,"min":{"args":[["37","-57","0","64","48","47","-89","41","-15","73"]],"gasUsed":31712},"max":{"args":[["-100","-9","25","95","77","-27","-80","-100","-1","31"]],"gasUsed":37791},"median":{"args":[["77","-42","-85","22","48","64","-12","-75","-90","82"]],"gasUsed":35681}}},"DifficultyOracle":{"isOutcomeSet":{"averageGasUsed":21728,"min":{"args":[],"gasUsed":21728},"max":{"args":[],"gasUsed":21728},"median":{"args":[],"gasUsed":21728}}},"DifficultyOracleFactory":{"createDifficultyOracle":{"averageGasUsed":163589,"min":{"args":[117],"gasUsed":163589},"max":{"args":[117],"gasUsed":163589},"median":{"args":[117],"gasUsed":163589}}},"MajorityOracle":{"isOutcomeSet":{"averageGasUsed":36450.333333333336,"min":{"args":[],"gasUsed":33387},"max":{"args":[],"gasUsed":39471},"median":{"args":[],"gasUsed":36493}},"getOutcome":{"averageGasUsed":39443,"min":{"args":[],"gasUsed":39443},"max":{"args":[],"gasUsed":39443},"median":{"args":[],"gasUsed":39443}}},"MajorityOracleFactory":{"createMajorityOracle":{"averageGasUsed":374286,"min":{"args":[["0xc7483f771e0b6675c33b33a9065923b1d0658da8","0x1455fdeb96c567fb4d26484776a007d34633e470","0x202a258048e8ebc3a0fa14d1e989c33ea3c145da"]],"gasUsed":374286},"max":{"args":[["0xc7483f771e0b6675c33b33a9065923b1d0658da8","0x1455fdeb96c567fb4d26484776a007d34633e470","0x202a258048e8ebc3a0fa14d1e989c33ea3c145da"]],"gasUsed":374286},"median":{"args":[["0xc7483f771e0b6675c33b33a9065923b1d0658da8","0x1455fdeb96c567fb4d26484776a007d34633e470","0x202a258048e8ebc3a0fa14d1e989c33ea3c145da"]],"gasUsed":374286}}},"UltimateOracle":{"setForwardedOutcome":{"averageGasUsed":67994,"min":{"args":[],"gasUsed":67994},"max":{"args":[],"gasUsed":67994},"median":{"args":[],"gasUsed":67994}},"forwardedOutcome":{"averageGasUsed":21969,"min":{"args":[],"gasUsed":21969},"max":{"args":[],"gasUsed":21969},"median":{"args":[],"gasUsed":21969}},"isOutcomeSet":{"averageGasUsed":26053.4,"min":{"args":[],"gasUsed":25013},"max":{"args":[],"gasUsed":27587},"median":{"args":[],"gasUsed":25040}},"challengeOutcome":{"averageGasUsed":155190,"min":{"args":[],"gasUsed":155190},"max":{"args":[],"gasUsed":155190},"median":{"args":[],"gasUsed":155190}},"voteForOutcome":{"averageGasUsed":84903.66666666667,"min":{"args":[],"gasUsed":81137},"max":{"args":[],"gasUsed":92157},"median":{"args":[],"gasUsed":81417}},"outcomeAmounts":{"averageGasUsed":23904,"min":{"args":["0xd88abf130c5e38a3db63aa6ed51e6a80f045a424"],"gasUsed":23904},"max":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":23904},"median":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":23904}},"getOutcome":{"averageGasUsed":23497.5,"min":{"args":[],"gasUsed":22216},"max":{"args":[],"gasUsed":24779},"median":{"args":[],"gasUsed":24779}},"withdraw":{"averageGasUsed":27354,"min":{"args":[{"from":"0xd44b41505462752f91e06f5186e704a78f69f842"}],"gasUsed":27354},"max":{"args":[{"from":"0xd44b41505462752f91e06f5186e704a78f69f842"}],"gasUsed":27354},"median":{"args":[{"from":"0xd44b41505462752f91e06f5186e704a78f69f842"}],"gasUsed":27354}}},"UltimateOracleFactory":{"createUltimateOracle":{"averageGasUsed":914536,"min":{"args":["0x9232d9b189ca788c348c5da1cd0165e91719f976"],"gasUsed":914536},"max":{"args":["0x300c50e51038b793815b561e77629b9e8fdf7e07"],"gasUsed":914536},"median":{"args":["0x300c50e51038b793815b561e77629b9e8fdf7e07"],"gasUsed":914536}}},"FutarchyOracle":{"fund":{"averageGasUsed":649515,"min":{"args":[],"gasUsed":649515},"max":{"args":[],"gasUsed":649515},"median":{"args":[],"gasUsed":649515}},"markets":{"averageGasUsed":22485,"min":{"args":[1],"gasUsed":22485},"max":{"args":[1],"gasUsed":22485},"median":{"args":[1],"gasUsed":22485}},"categoricalEvent":{"averageGasUsed":21990,"min":{"args":[],"gasUsed":21990},"max":{"args":[],"gasUsed":21990},"median":{"args":[],"gasUsed":21990}},"setOutcome":{"averageGasUsed":74665,"min":{"args":[],"gasUsed":74665},"max":{"args":[],"gasUsed":74665},"median":{"args":[],"gasUsed":74665}},"isOutcomeSet":{"averageGasUsed":21916,"min":{"args":[],"gasUsed":21916},"max":{"args":[],"gasUsed":21916},"median":{"args":[],"gasUsed":21916}},"getOutcome":{"averageGasUsed":21794,"min":{"args":[],"gasUsed":21794},"max":{"args":[],"gasUsed":21794},"median":{"args":[],"gasUsed":21794}},"close":{"averageGasUsed":261420,"min":{"args":[],"gasUsed":261420},"max":{"args":[],"gasUsed":261420},"median":{"args":[],"gasUsed":261420}}},"FutarchyOracleFactory":{"createFutarchyOracle":{"averageGasUsed":11074695,"min":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":11074548},"max":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":11074842},"median":{"args":["0x59a3d734e879a9cd731a5a17b17612c0e7421976"],"gasUsed":11074842}}},"StandardMarketWithPriceLogger":{"calcMarketFee":{"averageGasUsed":22605,"min":{"args":["500086643396031"],"gasUsed":22605},"max":{"args":["500086643396031"],"gasUsed":22605},"median":{"args":["500086643396031"],"gasUsed":22605}},"buy":{"averageGasUsed":384998,"min":{"args":[1],"gasUsed":384998},"max":{"args":[1],"gasUsed":384998},"median":{"args":[1],"gasUsed":384998}},"eventContract":{"averageGasUsed":22276,"min":{"args":[],"gasUsed":22276},"max":{"args":[],"gasUsed":22276},"median":{"args":[],"gasUsed":22276}}},"Event":{"outcomeTokens":{"averageGasUsed":22507.85714285714,"min":{"args":[0],"gasUsed":22465},"max":{"args":[1],"gasUsed":22573},"median":{"args":[1],"gasUsed":22529}},"buyAllOutcomes":{"averageGasUsed":98458,"min":{"args":[],"gasUsed":60982},"max":{"args":[],"gasUsed":165982},"median":{"args":[],"gasUsed":90982}},"sellAllOutcomes":{"averageGasUsed":45446,"min":{"args":[],"gasUsed":41616},"max":{"args":[],"gasUsed":49276},"median":{"args":[],"gasUsed":49276}},"getOutcomeCount":{"averageGasUsed":21847,"min":{"args":[],"gasUsed":21847},"max":{"args":[],"gasUsed":21847},"median":{"args":[],"gasUsed":21847}},"getOutcomeTokens":{"averageGasUsed":23351,"min":{"args":[],"gasUsed":23351},"max":{"args":[],"gasUsed":23351},"median":{"args":[],"gasUsed":23351}},"getOutcomeTokenDistribution":{"averageGasUsed":30234,"min":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":30234},"max":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":30234},"median":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":30234}},"setOutcome":{"averageGasUsed":49876.4,"min":{"args":[],"gasUsed":37758},"max":{"args":[],"gasUsed":53098},"median":{"args":[],"gasUsed":52884}},"outcome":{"averageGasUsed":21727,"min":{"args":[],"gasUsed":21727},"max":{"args":[],"gasUsed":21727},"median":{"args":[],"gasUsed":21727}},"isOutcomeSet":{"averageGasUsed":22034.5,"min":{"args":[],"gasUsed":22011},"max":{"args":[],"gasUsed":22058},"median":{"args":[],"gasUsed":22058}},"redeemWinnings":{"averageGasUsed":48526.5,"min":{"args":[{"from":"0x0b44ea000422656f11dd3605b3f23517f5383d53"}],"gasUsed":40809},"max":{"args":[{"from":"0x9150a1c46a0708aa4200c46ab2c33f7e1b58146b"}],"gasUsed":56244},"median":{"args":[{"from":"0x9150a1c46a0708aa4200c46ab2c33f7e1b58146b"}],"gasUsed":56244}}},"Market":{"fund":{"averageGasUsed":222766.85714285713,"min":{"args":[],"gasUsed":222584},"max":{"args":[],"gasUsed":222904},"median":{"args":[],"gasUsed":222904}},"sell":{"averageGasUsed":260341.42857142858,"min":{"args":[0],"gasUsed":243302},"max":{"args":[1],"gasUsed":288430},"median":{"args":[1],"gasUsed":258110}},"netOutcomeTokensSold":{"averageGasUsed":22322,"min":{"args":[0],"gasUsed":22290},"max":{"args":[1],"gasUsed":22354},"median":{"args":[1],"gasUsed":22354}},"buy":{"averageGasUsed":286544.7878787879,"min":{"args":[1],"gasUsed":271452},"max":{"args":[1],"gasUsed":384998},"median":{"args":[1],"gasUsed":277514}},"close":{"averageGasUsed":87469,"min":{"args":[],"gasUsed":87469},"max":{"args":[],"gasUsed":87469},"median":{"args":[],"gasUsed":87469}},"calcMarketFee":{"averageGasUsed":22534.6,"min":{"args":["500086643396031"],"gasUsed":22517},"max":{"args":["500086643396031"],"gasUsed":22605},"median":{"args":["499913356603969"],"gasUsed":22517}},"shortSell":{"averageGasUsed":481186,"min":{"args":[0],"gasUsed":481186},"max":{"args":[0],"gasUsed":481186},"median":{"args":[0],"gasUsed":481186}},"eventContract":{"averageGasUsed":22276,"min":{"args":[],"gasUsed":22276},"max":{"args":[],"gasUsed":22276},"median":{"args":[],"gasUsed":22276}}},"MarketMaker":{"calcProfit":{"averageGasUsed":141889.11111111112,"min":{"args":["0x6ca2101fa00b47e104f92a0b5bac040332f135a9"],"gasUsed":141839},"max":{"args":["0x10fc2cbfd0aacddefecbae8f551a70edb99138a1"],"gasUsed":141903},"median":{"args":["0x10fc2cbfd0aacddefecbae8f551a70edb99138a1"],"gasUsed":141903}},"calcMarginalPrice":{"averageGasUsed":79167.44444444444,"min":{"args":["0x877f88fc5b2d0195346d72e618c699ba8dadf060"],"gasUsed":76791},"max":{"args":["0xbce73ce89e6ea0ac20888df4261f8fb19159384c"],"gasUsed":80096},"median":{"args":["0x6ca2101fa00b47e104f92a0b5bac040332f135a9"],"gasUsed":80096}},"calcCost":{"averageGasUsed":140075.72727272726,"min":{"args":["0x877f88fc5b2d0195346d72e618c699ba8dadf060"],"gasUsed":135410},"max":{"args":["0x60d3fcb0c0c43b55abdf8715480e2af04ee7d56b"],"gasUsed":142687},"median":{"args":["0xbce73ce89e6ea0ac20888df4261f8fb19159384c"],"gasUsed":141792}}},"Oracle":{"setOutcome":{"averageGasUsed":63254.5,"min":{"args":[],"gasUsed":48376},"max":{"args":[],"gasUsed":74665},"median":{"args":[],"gasUsed":63440}},"getOutcome":{"averageGasUsed":24074.11111111111,"min":{"args":[],"gasUsed":21687},"max":{"args":[],"gasUsed":39443},"median":{"args":[],"gasUsed":21687}},"isOutcomeSet":{"averageGasUsed":26464.14285714286,"min":{"args":[],"gasUsed":21728},"max":{"args":[],"gasUsed":39471},"median":{"args":[],"gasUsed":25040}},"owner":{"averageGasUsed":21861,"min":{"args":[],"gasUsed":21861},"max":{"args":[],"gasUsed":21861},"median":{"args":[],"gasUsed":21861}},"replaceOwner":{"averageGasUsed":29970,"min":{"args":[],"gasUsed":29970},"max":{"args":[],"gasUsed":29970},"median":{"args":[],"gasUsed":29970}},"ipfsHash":{"averageGasUsed":23190,"min":{"args":[],"gasUsed":23190},"max":{"args":[],"gasUsed":23190},"median":{"args":[],"gasUsed":23190}},"fund":{"averageGasUsed":649515,"min":{"args":[],"gasUsed":649515},"max":{"args":[],"gasUsed":649515},"median":{"args":[],"gasUsed":649515}},"markets":{"averageGasUsed":22485,"min":{"args":[1],"gasUsed":22485},"max":{"args":[1],"gasUsed":22485},"median":{"args":[1],"gasUsed":22485}},"categoricalEvent":{"averageGasUsed":21990,"min":{"args":[],"gasUsed":21990},"max":{"args":[],"gasUsed":21990},"median":{"args":[],"gasUsed":21990}},"close":{"averageGasUsed":261420,"min":{"args":[],"gasUsed":261420},"max":{"args":[],"gasUsed":261420},"median":{"args":[],"gasUsed":261420}},"setForwardedOutcome":{"averageGasUsed":67994,"min":{"args":[],"gasUsed":67994},"max":{"args":[],"gasUsed":67994},"median":{"args":[],"gasUsed":67994}},"forwardedOutcome":{"averageGasUsed":21969,"min":{"args":[],"gasUsed":21969},"max":{"args":[],"gasUsed":21969},"median":{"args":[],"gasUsed":21969}},"challengeOutcome":{"averageGasUsed":155190,"min":{"args":[],"gasUsed":155190},"max":{"args":[],"gasUsed":155190},"median":{"args":[],"gasUsed":155190}},"voteForOutcome":{"averageGasUsed":84903.66666666667,"min":{"args":[],"gasUsed":81137},"max":{"args":[],"gasUsed":92157},"median":{"args":[],"gasUsed":81417}},"outcomeAmounts":{"averageGasUsed":23904,"min":{"args":["0xd88abf130c5e38a3db63aa6ed51e6a80f045a424"],"gasUsed":23904},"max":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":23904},"median":{"args":["0xd44b41505462752f91e06f5186e704a78f69f842"],"gasUsed":23904}},"withdraw":{"averageGasUsed":27354,"min":{"args":[{"from":"0xd44b41505462752f91e06f5186e704a78f69f842"}],"gasUsed":27354},"max":{"args":[{"from":"0xd44b41505462752f91e06f5186e704a78f69f842"}],"gasUsed":27354},"median":{"args":[{"from":"0xd44b41505462752f91e06f5186e704a78f69f842"}],"gasUsed":27354}}},"StandardToken":{"deposit":{"averageGasUsed":52442.28571428572,"min":{"args":[],"gasUsed":37978},"max":{"args":[],"gasUsed":67978},"median":{"args":[],"gasUsed":52978}},"balanceOf":{"averageGasUsed":23435.766666666666,"min":{"args":["0x0b44ea000422656f11dd3605b3f23517f5383d53"],"gasUsed":23349},"max":{"args":["0xd88abf130c5e38a3db63aa6ed51e6a80f045a424"],"gasUsed":23479},"median":{"args":["0x7d9eee48f963cb142d0025913417097d8cdddc61"],"gasUsed":23415}},"approve":{"averageGasUsed":43838.98412698413,"min":{"args":["0x6ca2101fa00b47e104f92a0b5bac040332f135a9"],"gasUsed":30608},"max":{"args":["0x11ad27d66d2c188e5c06efc98f6b179bbe0cd716"],"gasUsed":45672},"median":{"args":["0x10fc2cbfd0aacddefecbae8f551a70edb99138a1"],"gasUsed":45586}}},"Token":{"deposit":{"averageGasUsed":52442.28571428572,"min":{"args":[],"gasUsed":37978},"max":{"args":[],"gasUsed":67978},"median":{"args":[],"gasUsed":52978}},"balanceOf":{"averageGasUsed":23435.766666666666,"min":{"args":["0x0b44ea000422656f11dd3605b3f23517f5383d53"],"gasUsed":23349},"max":{"args":["0xd88abf130c5e38a3db63aa6ed51e6a80f045a424"],"gasUsed":23479},"median":{"args":["0x7d9eee48f963cb142d0025913417097d8cdddc61"],"gasUsed":23415}},"approve":{"averageGasUsed":43838.98412698413,"min":{"args":["0x6ca2101fa00b47e104f92a0b5bac040332f135a9"],"gasUsed":30608},"max":{"args":["0x11ad27d66d2c188e5c06efc98f6b179bbe0cd716"],"gasUsed":45672},"median":{"args":["0x10fc2cbfd0aacddefecbae8f551a70edb99138a1"],"gasUsed":45586}}}}; +module.exports = {"CategoricalEvent":{"buyAllOutcomes":{"averageGasUsed":92472.58333333333,"min":{"args":[1000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":49184},"max":{"args":[10000000000000000000,{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":185578},"median":{"args":[100000000000000000,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":79184}},"outcomeTokens":{"averageGasUsed":22268.4,"min":{"args":[0],"gasUsed":22230},"max":{"args":[1],"gasUsed":22294},"median":{"args":[1],"gasUsed":22294}},"sellAllOutcomes":{"averageGasUsed":44466.5,"min":{"args":[10000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":44169},"max":{"args":[100,{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":44764},"median":{"args":[100,{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":44764}},"getOutcomeCount":{"averageGasUsed":23046,"min":{"args":[],"gasUsed":23046},"max":{"args":[],"gasUsed":23046},"median":{"args":[],"gasUsed":23046}},"getOutcomeTokens":{"averageGasUsed":24440,"min":{"args":[],"gasUsed":24440},"max":{"args":[],"gasUsed":24440},"median":{"args":[],"gasUsed":24440}},"getOutcomeTokenDistribution":{"averageGasUsed":33097,"min":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732"],"gasUsed":33097},"max":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732"],"gasUsed":33097},"median":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732"],"gasUsed":33097}},"setOutcome":{"averageGasUsed":56763,"min":{"args":[],"gasUsed":56719},"max":{"args":[],"gasUsed":56895},"median":{"args":[],"gasUsed":56719}},"outcome":{"averageGasUsed":21666,"min":{"args":[],"gasUsed":21666},"max":{"args":[],"gasUsed":21666},"median":{"args":[],"gasUsed":21666}},"isOutcomeSet":{"averageGasUsed":21874,"min":{"args":[],"gasUsed":21874},"max":{"args":[],"gasUsed":21874},"median":{"args":[],"gasUsed":21874}},"redeemWinnings":{"averageGasUsed":37771,"min":{"args":[{"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":37771},"max":{"args":[{"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":37771},"median":{"args":[{"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":37771}}},"ScalarEvent":{"buyAllOutcomes":{"averageGasUsed":123974,"min":{"args":[10,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":123974},"max":{"args":[10,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":123974},"median":{"args":[10,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":123974}},"outcomeTokens":{"averageGasUsed":22306,"min":{"args":[0],"gasUsed":22274},"max":{"args":[1],"gasUsed":22338},"median":{"args":[1],"gasUsed":22338}},"setOutcome":{"averageGasUsed":49329,"min":{"args":[],"gasUsed":41829},"max":{"args":[],"gasUsed":56829},"median":{"args":[],"gasUsed":56829}},"outcome":{"averageGasUsed":21666,"min":{"args":[],"gasUsed":21666},"max":{"args":[],"gasUsed":21666},"median":{"args":[],"gasUsed":21666}},"isOutcomeSet":{"averageGasUsed":21984,"min":{"args":[],"gasUsed":21984},"max":{"args":[],"gasUsed":21984},"median":{"args":[],"gasUsed":21984}},"redeemWinnings":{"averageGasUsed":48904,"min":{"args":[{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":48904},"max":{"args":[{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":48904},"median":{"args":[{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":48904}}},"EventFactory":{"createCategoricalEvent":{"averageGasUsed":792534.1333333333,"min":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0x6fe95e08427f67c917f5fe2a158f3bf203ff4559",2],"gasUsed":662788},"max":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0x6fe95e08427f67c917f5fe2a158f3bf203ff4559",4],"gasUsed":987164},"median":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0x937d2ba2e49c47bdd512dbccbe4bfb4a0bd9daf3",3],"gasUsed":824976}},"createScalarEvent":{"averageGasUsed":769762,"min":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0x3114c4188cf1efe0a04f3d58442fa60cef02b39b",-100,100],"gasUsed":769762},"max":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0x3114c4188cf1efe0a04f3d58442fa60cef02b39b",-100,100],"gasUsed":769762},"median":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0x3114c4188cf1efe0a04f3d58442fa60cef02b39b",-100,100],"gasUsed":769762}}},"OutcomeToken":{"balanceOf":{"averageGasUsed":24440,"min":{"args":["0x627306090abab3a6e1400e9345bc60c78a8bef57"],"gasUsed":24440},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5"],"gasUsed":24440},"median":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5"],"gasUsed":24440}},"approve":{"averageGasUsed":47449.666666666664,"min":{"args":["0x883b08ea564ed08cce76fc00d2eaf67da08e098f",1000000000000000,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":46575},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5","1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":48303},"median":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5","1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":48303}}},"WETH9":{"deposit":{"averageGasUsed":40929.645161290326,"min":{"args":[{"value":750000000000000000,"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":28349},"max":{"args":[{"value":150,"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":43349},"median":{"args":[{"value":1000000000000000000,"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":43349}},"balanceOf":{"averageGasUsed":23342.85714285714,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4"],"gasUsed":23280},"max":{"args":["0x627306090abab3a6e1400e9345bc60c78a8bef57"],"gasUsed":23344},"median":{"args":["0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"],"gasUsed":23344}},"approve":{"averageGasUsed":45521.72727272727,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4",10,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":45161},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5","1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":47209},"median":{"args":["0x884d5fa7820763a19f1760472c8c600e03482207",1000000000000000000,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":45545}},"transfer":{"averageGasUsed":27871,"min":{"args":[0,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":20371},"max":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371},"median":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371}}},"CentralizedOracle":{"setOutcome":{"averageGasUsed":63453,"min":{"args":[0],"gasUsed":49697},"max":{"args":[-50],"gasUsed":66745},"median":{"args":[1,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":64761}},"getOutcome":{"averageGasUsed":22916,"min":{"args":[],"gasUsed":22916},"max":{"args":[],"gasUsed":22916},"median":{"args":[],"gasUsed":22916}},"isOutcomeSet":{"averageGasUsed":23096,"min":{"args":[],"gasUsed":23096},"max":{"args":[],"gasUsed":23096},"median":{"args":[],"gasUsed":23096}},"owner":{"averageGasUsed":21736,"min":{"args":[],"gasUsed":21736},"max":{"args":[],"gasUsed":21736},"median":{"args":[],"gasUsed":21736}},"replaceOwner":{"averageGasUsed":31129,"min":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":31129},"max":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":31129},"median":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":31129}},"ipfsHash":{"averageGasUsed":23177,"min":{"args":[],"gasUsed":23177},"max":{"args":[],"gasUsed":23177},"median":{"args":[],"gasUsed":23177}}},"CentralizedOracleFactory":{"createCentralizedOracle":{"averageGasUsed":342463,"min":{"args":["QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG"],"gasUsed":342463},"max":{"args":["QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":342463},"median":{"args":["QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG"],"gasUsed":342463}}},"StandardMarketFactory":{"createMarket":{"averageGasUsed":451056.85714285716,"min":{"args":["0x77499376d6be02a7762e99d3e3fab9c77f27dd82","0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",0,{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":450259},"max":{"args":["0x77499376d6be02a7762e99d3e3fab9c77f27dd82","0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",0,{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":455332},"median":{"args":["0x9335885b93d7d6a94e4853160be29df517303e52","0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",50000,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":450387}}},"LMSRMarketMaker":{"calcNetCost":{"averageGasUsed":153576.7,"min":{"args":["0xdb8cab663bd50c2ce9e5007ed53f53b1ad13ca03",[0,1000000000000000]],"gasUsed":111672},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",["-8763936117312281","-1619981332427774","-2971258616431448"]],"gasUsed":162522},"median":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",["-5007888577321556","2537082333688427","2150953671335903"]],"gasUsed":158844}},"calcCost":{"averageGasUsed":156824.2,"min":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",0,"3043951660839797"],"gasUsed":155633},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",1,"2875111713168261"],"gasUsed":157413},"median":{"args":["0xb5387f36d284555be23bfd087ff03a45147d9765",0,1000000000000000],"gasUsed":156941}},"calcProfit":{"averageGasUsed":156039,"min":{"args":["0x884d5fa7820763a19f1760472c8c600e03482207",0,1000000000000000],"gasUsed":155840},"max":{"args":["0x883b08ea564ed08cce76fc00d2eaf67da08e098f",0,1000000000000000],"gasUsed":156440},"median":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",0,"6655926886228047"],"gasUsed":155976}}},"StandardMarket":{"fund":{"averageGasUsed":253017.2857142857,"min":{"args":[10000000000000000,{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":215675},"max":{"args":[1000000000000000000,{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":297956},"median":{"args":[1000000000000000000,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":251562}},"trade":{"averageGasUsed":348512.9,"min":{"args":[[-1000000000000000,0,0],-316782645448822,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":262421},"max":{"args":[[500000000000000000,-1000000000000000000,-100000000000000000,2000000000000000000],"1128526080115075525",{"from":"0x2191ef87e392377ec08e7c08eb105ef5448eced5"}],"gasUsed":399379},"median":{"args":[["-5007888577321556","2537082333688427","2150953671335903"],"2416009790102938",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":358013}},"close":{"averageGasUsed":109955,"min":{"args":[{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":109955},"max":{"args":[{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":109955},"median":{"args":[{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":109955}},"calcMarketFee":{"averageGasUsed":24003.444444444445,"min":{"args":["333455416261919"],"gasUsed":23979},"max":{"args":["500086643395837"],"gasUsed":24199},"median":{"args":["333455416261919"],"gasUsed":23979}},"buy":{"averageGasUsed":308303.4,"min":{"args":[0,"3043951660839797","48393809541285",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":298719},"max":{"args":[0,1000000000000000,"350128187075014",{"from":"0x0d1d4e623d10f9fba5db95830f7d3839406c6af2"}],"gasUsed":320914},"median":{"args":[1,"2875111713168261","2307028534036597",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":300563}},"sell":{"averageGasUsed":283847.75,"min":{"args":[0,1000000000000000,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":258013},"max":{"args":[2,"880163158964834","284035241931743",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":302564},"median":{"args":[0,"6655926886228047","248075693781371",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":287421}},"shortSell":{"averageGasUsed":521285,"min":{"args":[0,1000000000000000,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":521285},"max":{"args":[0,1000000000000000,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":521285},"median":{"args":[0,1000000000000000,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":521285}},"eventContract":{"averageGasUsed":22022,"min":{"args":[],"gasUsed":22022},"max":{"args":[],"gasUsed":22022},"median":{"args":[],"gasUsed":22022}}},"Campaign":{"stage":{"averageGasUsed":21888,"min":{"args":[],"gasUsed":21888},"max":{"args":[],"gasUsed":21888},"median":{"args":[],"gasUsed":21888}},"fund":{"averageGasUsed":69334.33333333333,"min":{"args":[750000000000000000,{"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":60072},"max":{"args":[250000000000000000,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":80359},"median":{"args":[750000000000000000,{"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":75072}},"createMarket":{"averageGasUsed":723277,"min":{"args":[],"gasUsed":723277},"max":{"args":[],"gasUsed":723277},"median":{"args":[],"gasUsed":723277}},"closeMarket":{"averageGasUsed":170373,"min":{"args":[],"gasUsed":170373},"max":{"args":[],"gasUsed":170373},"median":{"args":[],"gasUsed":170373}},"finalBalance":{"averageGasUsed":21710,"min":{"args":[],"gasUsed":21710},"max":{"args":[],"gasUsed":21710},"median":{"args":[],"gasUsed":21710}},"withdrawFees":{"averageGasUsed":44412,"min":{"args":[{"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":33162},"max":{"args":[{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":48162},"median":{"args":[{"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":48162}},"refund":{"averageGasUsed":46919.5,"min":{"args":[{"from":"0x6330a553fc93768f612722bb8c2ec78ac90b3bbc"}],"gasUsed":38418},"max":{"args":[{"from":"0x6330a553fc93768f612722bb8c2ec78ac90b3bbc"}],"gasUsed":53418},"median":{"args":[{"from":"0x6330a553fc93768f612722bb8c2ec78ac90b3bbc"}],"gasUsed":47921}}},"CampaignFactory":{"createCampaign":{"averageGasUsed":485485,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4","0xa4392264a2d8c998901d10c154c91725b1bf0158","0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",50000,1000000000000000000,1540826764],"gasUsed":485437},"max":{"args":["0xa622bcebc5fd5cb056254afd2eea96d1c1e6f2a3","0xa4392264a2d8c998901d10c154c91725b1bf0158","0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",50000,1000000000000000000,1540826830],"gasUsed":485501},"median":{"args":["0x59c4f2b790f80e19c57e1583e24fcf0a961b6504","0xa4392264a2d8c998901d10c154c91725b1bf0158","0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",50000,1000000000000000000,1540826828],"gasUsed":485501}}},"DifficultyOracle":{"isOutcomeSet":{"averageGasUsed":21780,"min":{"args":[],"gasUsed":21780},"max":{"args":[],"gasUsed":21780},"median":{"args":[],"gasUsed":21780}}},"DifficultyOracleFactory":{"createDifficultyOracle":{"averageGasUsed":173580,"min":{"args":[129],"gasUsed":173580},"max":{"args":[129],"gasUsed":173580},"median":{"args":[129],"gasUsed":173580}}},"MajorityOracle":{"isOutcomeSet":{"averageGasUsed":42214,"min":{"args":[],"gasUsed":38025},"max":{"args":[],"gasUsed":46354},"median":{"args":[],"gasUsed":42263}},"getOutcome":{"averageGasUsed":46298,"min":{"args":[],"gasUsed":46298},"max":{"args":[],"gasUsed":46298},"median":{"args":[],"gasUsed":46298}}},"MajorityOracleFactory":{"createMajorityOracle":{"averageGasUsed":263634,"min":{"args":[["0x3114c4188cf1efe0a04f3d58442fa60cef02b39b","0xb5831ddf5e8246620a6920a3e8a6e876bb012436","0xee0daa4996f3e8c4df29a9b51790fff6f9fe4799"]],"gasUsed":263634},"max":{"args":[["0x3114c4188cf1efe0a04f3d58442fa60cef02b39b","0xb5831ddf5e8246620a6920a3e8a6e876bb012436","0xee0daa4996f3e8c4df29a9b51790fff6f9fe4799"]],"gasUsed":263634},"median":{"args":[["0x3114c4188cf1efe0a04f3d58442fa60cef02b39b","0xb5831ddf5e8246620a6920a3e8a6e876bb012436","0xee0daa4996f3e8c4df29a9b51790fff6f9fe4799"]],"gasUsed":263634}}},"UltimateOracle":{"setForwardedOutcome":{"averageGasUsed":71978,"min":{"args":[],"gasUsed":71978},"max":{"args":[],"gasUsed":71978},"median":{"args":[],"gasUsed":71978}},"forwardedOutcome":{"averageGasUsed":21820,"min":{"args":[],"gasUsed":21820},"max":{"args":[],"gasUsed":21820},"median":{"args":[],"gasUsed":21820}},"isOutcomeSet":{"averageGasUsed":24582,"min":{"args":[],"gasUsed":24364},"max":{"args":[],"gasUsed":24892},"median":{"args":[],"gasUsed":24381}},"challengeOutcome":{"averageGasUsed":148473,"min":{"args":[2],"gasUsed":148473},"max":{"args":[2],"gasUsed":148473},"median":{"args":[2],"gasUsed":148473}},"voteForOutcome":{"averageGasUsed":69789.33333333333,"min":{"args":[2,50,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":65954},"max":{"args":[3,150,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":77100},"median":{"args":[3,150,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":66314}},"outcomeAmounts":{"averageGasUsed":23738,"min":{"args":["0x627306090abab3a6e1400e9345bc60c78a8bef57",2],"gasUsed":23738},"max":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",3],"gasUsed":23738},"median":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",3],"gasUsed":23738}},"getOutcome":{"averageGasUsed":23835.5,"min":{"args":[],"gasUsed":23575},"max":{"args":[],"gasUsed":24096},"median":{"args":[],"gasUsed":24096}},"withdraw":{"averageGasUsed":23699,"min":{"args":[{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":23699},"max":{"args":[{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":23699},"median":{"args":[{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":23699}}},"UltimateOracleFactory":{"createUltimateOracle":{"averageGasUsed":465765,"min":{"args":["0x49495e00c2e4de9075fbfcd9c684e3c11acd5031","0x345ca3e014aaf5dca488057592ee47305d9b3e10",2,200,100,50],"gasUsed":465733},"max":{"args":["0x40a0cb73b65d80e0f7ecd08cdc8b37ad87c412e1","0x345ca3e014aaf5dca488057592ee47305d9b3e10",2,200,100,50],"gasUsed":465797},"median":{"args":["0x40a0cb73b65d80e0f7ecd08cdc8b37ad87c412e1","0x345ca3e014aaf5dca488057592ee47305d9b3e10",2,200,100,50],"gasUsed":465797}}},"FutarchyOracle":{"fund":{"averageGasUsed":604269,"min":{"args":[1000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":604269},"max":{"args":[1000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":604269},"median":{"args":[1000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":604269}},"markets":{"averageGasUsed":22316,"min":{"args":[1],"gasUsed":22316},"max":{"args":[1],"gasUsed":22316},"median":{"args":[1],"gasUsed":22316}},"categoricalEvent":{"averageGasUsed":21802,"min":{"args":[],"gasUsed":21802},"max":{"args":[],"gasUsed":21802},"median":{"args":[],"gasUsed":21802}},"setOutcome":{"averageGasUsed":78538,"min":{"args":[],"gasUsed":78538},"max":{"args":[],"gasUsed":78538},"median":{"args":[],"gasUsed":78538}},"isOutcomeSet":{"averageGasUsed":23184,"min":{"args":[],"gasUsed":23184},"max":{"args":[],"gasUsed":23184},"median":{"args":[],"gasUsed":23184}},"getOutcome":{"averageGasUsed":23004,"min":{"args":[],"gasUsed":23004},"max":{"args":[],"gasUsed":23004},"median":{"args":[],"gasUsed":23004}},"close":{"averageGasUsed":232060,"min":{"args":[{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":232060},"max":{"args":[{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":232060},"median":{"args":[{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":232060}}},"FutarchyOracleFactory":{"createFutarchyOracle":{"averageGasUsed":3660968,"min":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0x937d2ba2e49c47bdd512dbccbe4bfb4a0bd9daf3",2,-100,100,"0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",500000,100,0],"gasUsed":3660818},"max":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0xc9d4517132de69d4d3247fe3848d2219a199c98e",2,-100,100,"0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",500000,100,1540827839],"gasUsed":3661118},"median":{"args":["0x345ca3e014aaf5dca488057592ee47305d9b3e10","0xc9d4517132de69d4d3247fe3848d2219a199c98e",2,-100,100,"0xf25186b5081ff5ce73482ad761db0eb0d25abfbf",500000,100,1540827839],"gasUsed":3661118}}},"StandardMarketWithPriceLogger":{"calcMarketFee":{"averageGasUsed":24199,"min":{"args":["500086643395837"],"gasUsed":24199},"max":{"args":["500086643395837"],"gasUsed":24199},"median":{"args":["500086643395837"],"gasUsed":24199}},"trade":{"averageGasUsed":337228,"min":{"args":[[0,1000000000000000],"750129965093755",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":337228},"max":{"args":[[0,1000000000000000],"750129965093755",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":337228},"median":{"args":[[0,1000000000000000],"750129965093755",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":337228}},"eventContract":{"averageGasUsed":22022,"min":{"args":[],"gasUsed":22022},"max":{"args":[],"gasUsed":22022},"median":{"args":[],"gasUsed":22022}}},"Event":{"buyAllOutcomes":{"averageGasUsed":93732.64,"min":{"args":[1000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":49184},"max":{"args":[10000000000000000000,{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":185578},"median":{"args":[100000000000000000,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":79184}},"outcomeTokens":{"averageGasUsed":22271.81818181818,"min":{"args":[0],"gasUsed":22230},"max":{"args":[1],"gasUsed":22338},"median":{"args":[1],"gasUsed":22294}},"sellAllOutcomes":{"averageGasUsed":44466.5,"min":{"args":[10000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":44169},"max":{"args":[100,{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":44764},"median":{"args":[100,{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":44764}},"getOutcomeCount":{"averageGasUsed":23046,"min":{"args":[],"gasUsed":23046},"max":{"args":[],"gasUsed":23046},"median":{"args":[],"gasUsed":23046}},"getOutcomeTokens":{"averageGasUsed":24440,"min":{"args":[],"gasUsed":24440},"max":{"args":[],"gasUsed":24440},"median":{"args":[],"gasUsed":24440}},"getOutcomeTokenDistribution":{"averageGasUsed":33097,"min":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732"],"gasUsed":33097},"max":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732"],"gasUsed":33097},"median":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732"],"gasUsed":33097}},"setOutcome":{"averageGasUsed":54285,"min":{"args":[],"gasUsed":41829},"max":{"args":[],"gasUsed":56895},"median":{"args":[],"gasUsed":56719}},"outcome":{"averageGasUsed":21666,"min":{"args":[],"gasUsed":21666},"max":{"args":[],"gasUsed":21666},"median":{"args":[],"gasUsed":21666}},"isOutcomeSet":{"averageGasUsed":21929,"min":{"args":[],"gasUsed":21874},"max":{"args":[],"gasUsed":21984},"median":{"args":[],"gasUsed":21984}},"redeemWinnings":{"averageGasUsed":43337.5,"min":{"args":[{"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":37771},"max":{"args":[{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":48904},"median":{"args":[{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":48904}}},"Market":{"fund":{"averageGasUsed":253017.2857142857,"min":{"args":[10000000000000000,{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":215675},"max":{"args":[1000000000000000000,{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":297956},"median":{"args":[1000000000000000000,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":251562}},"trade":{"averageGasUsed":348512.9,"min":{"args":[[-1000000000000000,0,0],-316782645448822,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":262421},"max":{"args":[[500000000000000000,-1000000000000000000,-100000000000000000,2000000000000000000],"1128526080115075525",{"from":"0x2191ef87e392377ec08e7c08eb105ef5448eced5"}],"gasUsed":399379},"median":{"args":[["-5007888577321556","2537082333688427","2150953671335903"],"2416009790102938",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":358013}},"close":{"averageGasUsed":109955,"min":{"args":[{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":109955},"max":{"args":[{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":109955},"median":{"args":[{"from":"0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e"}],"gasUsed":109955}},"calcMarketFee":{"averageGasUsed":24003.444444444445,"min":{"args":["333455416261919"],"gasUsed":23979},"max":{"args":["500086643395837"],"gasUsed":24199},"median":{"args":["333455416261919"],"gasUsed":23979}},"buy":{"averageGasUsed":308303.4,"min":{"args":[0,"3043951660839797","48393809541285",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":298719},"max":{"args":[0,1000000000000000,"350128187075014",{"from":"0x0d1d4e623d10f9fba5db95830f7d3839406c6af2"}],"gasUsed":320914},"median":{"args":[1,"2875111713168261","2307028534036597",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":300563}},"sell":{"averageGasUsed":283847.75,"min":{"args":[0,1000000000000000,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":258013},"max":{"args":[2,"880163158964834","284035241931743",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":302564},"median":{"args":[0,"6655926886228047","248075693781371",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":287421}},"shortSell":{"averageGasUsed":521285,"min":{"args":[0,1000000000000000,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":521285},"max":{"args":[0,1000000000000000,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":521285},"median":{"args":[0,1000000000000000,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":521285}},"eventContract":{"averageGasUsed":22022,"min":{"args":[],"gasUsed":22022},"max":{"args":[],"gasUsed":22022},"median":{"args":[],"gasUsed":22022}}},"MarketMaker":{"calcNetCost":{"averageGasUsed":153576.7,"min":{"args":["0xdb8cab663bd50c2ce9e5007ed53f53b1ad13ca03",[0,1000000000000000]],"gasUsed":111672},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",["-8763936117312281","-1619981332427774","-2971258616431448"]],"gasUsed":162522},"median":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",["-5007888577321556","2537082333688427","2150953671335903"]],"gasUsed":158844}},"calcCost":{"averageGasUsed":156824.2,"min":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",0,"3043951660839797"],"gasUsed":155633},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",1,"2875111713168261"],"gasUsed":157413},"median":{"args":["0xb5387f36d284555be23bfd087ff03a45147d9765",0,1000000000000000],"gasUsed":156941}},"calcProfit":{"averageGasUsed":156039,"min":{"args":["0x884d5fa7820763a19f1760472c8c600e03482207",0,1000000000000000],"gasUsed":155840},"max":{"args":["0x883b08ea564ed08cce76fc00d2eaf67da08e098f",0,1000000000000000],"gasUsed":156440},"median":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5",0,"6655926886228047"],"gasUsed":155976}}},"Oracle":{"setOutcome":{"averageGasUsed":64824.36363636364,"min":{"args":[0],"gasUsed":49697},"max":{"args":[],"gasUsed":78538},"median":{"args":[1,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":64761}},"getOutcome":{"averageGasUsed":25728.11111111111,"min":{"args":[],"gasUsed":22916},"max":{"args":[],"gasUsed":46298},"median":{"args":[],"gasUsed":22916}},"isOutcomeSet":{"averageGasUsed":27635.714285714286,"min":{"args":[],"gasUsed":21780},"max":{"args":[],"gasUsed":46354},"median":{"args":[],"gasUsed":24381}},"owner":{"averageGasUsed":21736,"min":{"args":[],"gasUsed":21736},"max":{"args":[],"gasUsed":21736},"median":{"args":[],"gasUsed":21736}},"replaceOwner":{"averageGasUsed":31129,"min":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":31129},"max":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":31129},"median":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":31129}},"ipfsHash":{"averageGasUsed":23177,"min":{"args":[],"gasUsed":23177},"max":{"args":[],"gasUsed":23177},"median":{"args":[],"gasUsed":23177}},"fund":{"averageGasUsed":604269,"min":{"args":[1000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":604269},"max":{"args":[1000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":604269},"median":{"args":[1000000000000000000,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":604269}},"markets":{"averageGasUsed":22316,"min":{"args":[1],"gasUsed":22316},"max":{"args":[1],"gasUsed":22316},"median":{"args":[1],"gasUsed":22316}},"categoricalEvent":{"averageGasUsed":21802,"min":{"args":[],"gasUsed":21802},"max":{"args":[],"gasUsed":21802},"median":{"args":[],"gasUsed":21802}},"close":{"averageGasUsed":232060,"min":{"args":[{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":232060},"max":{"args":[{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":232060},"median":{"args":[{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":232060}},"setForwardedOutcome":{"averageGasUsed":71978,"min":{"args":[],"gasUsed":71978},"max":{"args":[],"gasUsed":71978},"median":{"args":[],"gasUsed":71978}},"forwardedOutcome":{"averageGasUsed":21820,"min":{"args":[],"gasUsed":21820},"max":{"args":[],"gasUsed":21820},"median":{"args":[],"gasUsed":21820}},"challengeOutcome":{"averageGasUsed":148473,"min":{"args":[2],"gasUsed":148473},"max":{"args":[2],"gasUsed":148473},"median":{"args":[2],"gasUsed":148473}},"voteForOutcome":{"averageGasUsed":69789.33333333333,"min":{"args":[2,50,{"from":"0x627306090abab3a6e1400e9345bc60c78a8bef57"}],"gasUsed":65954},"max":{"args":[3,150,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":77100},"median":{"args":[3,150,{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":66314}},"outcomeAmounts":{"averageGasUsed":23738,"min":{"args":["0x627306090abab3a6e1400e9345bc60c78a8bef57",2],"gasUsed":23738},"max":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",3],"gasUsed":23738},"median":{"args":["0xf17f52151ebef6c7334fad080c5704d77216b732",3],"gasUsed":23738}},"withdraw":{"averageGasUsed":23699,"min":{"args":[{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":23699},"max":{"args":[{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":23699},"median":{"args":[{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":23699}}},"StandardToken":{"deposit":{"averageGasUsed":40929.645161290326,"min":{"args":[{"value":750000000000000000,"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":28349},"max":{"args":[{"value":150,"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":43349},"median":{"args":[{"value":1000000000000000000,"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":43349}},"balanceOf":{"averageGasUsed":23860.377358490565,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4"],"gasUsed":23280},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5"],"gasUsed":24440},"median":{"args":["0x627306090abab3a6e1400e9345bc60c78a8bef57"],"gasUsed":23344}},"approve":{"averageGasUsed":45818.333333333336,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4",10,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":45161},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5","1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":48303},"median":{"args":["0x6a2c6b4b58d15f099321457ffdd33c5c2ba0d9cf",250000000000000000,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":45545}},"transfer":{"averageGasUsed":27871,"min":{"args":[0,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":20371},"max":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371},"median":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371}}},"ERC20":{"deposit":{"averageGasUsed":40929.645161290326,"min":{"args":[{"value":750000000000000000,"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":28349},"max":{"args":[{"value":150,"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":43349},"median":{"args":[{"value":1000000000000000000,"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":43349}},"balanceOf":{"averageGasUsed":23860.377358490565,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4"],"gasUsed":23280},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5"],"gasUsed":24440},"median":{"args":["0x627306090abab3a6e1400e9345bc60c78a8bef57"],"gasUsed":23344}},"approve":{"averageGasUsed":45818.333333333336,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4",10,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":45161},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5","1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":48303},"median":{"args":["0x6a2c6b4b58d15f099321457ffdd33c5c2ba0d9cf",250000000000000000,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":45545}},"transfer":{"averageGasUsed":27871,"min":{"args":[0,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":20371},"max":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371},"median":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371}}},"EtherToken":{"deposit":{"averageGasUsed":40929.645161290326,"min":{"args":[{"value":750000000000000000,"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":28349},"max":{"args":[{"value":150,"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":43349},"median":{"args":[{"value":1000000000000000000,"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":43349}},"balanceOf":{"averageGasUsed":23342.85714285714,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4"],"gasUsed":23280},"max":{"args":["0x627306090abab3a6e1400e9345bc60c78a8bef57"],"gasUsed":23344},"median":{"args":["0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"],"gasUsed":23344}},"approve":{"averageGasUsed":45521.72727272727,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4",10,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":45161},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5","1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":47209},"median":{"args":["0x884d5fa7820763a19f1760472c8c600e03482207",1000000000000000000,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":45545}},"transfer":{"averageGasUsed":27871,"min":{"args":[0,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":20371},"max":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371},"median":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371}}},"Token":{"deposit":{"averageGasUsed":40929.645161290326,"min":{"args":[{"value":750000000000000000,"from":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef"}],"gasUsed":28349},"max":{"args":[{"value":150,"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":43349},"median":{"args":[{"value":1000000000000000000,"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":43349}},"balanceOf":{"averageGasUsed":23860.377358490565,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4"],"gasUsed":23280},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5"],"gasUsed":24440},"median":{"args":["0x627306090abab3a6e1400e9345bc60c78a8bef57"],"gasUsed":23344}},"approve":{"averageGasUsed":45818.333333333336,"min":{"args":["0xd912c4de70417dc8361400d857bb51d2086141e4",10,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":45161},"max":{"args":["0xc09468fc08e750037eb9bd9b904f10bde8b013f5","1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77",{"from":"0x5aeda56215b167893e80b4fe645ba6d5bab767de"}],"gasUsed":48303},"median":{"args":["0x6a2c6b4b58d15f099321457ffdd33c5c2ba0d9cf",250000000000000000,{"from":"0x821aea9a577a9b44299b9c15c88cf3087f3b5544"}],"gasUsed":45545}},"transfer":{"averageGasUsed":27871,"min":{"args":[0,316550716195657,{"from":"0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5"}],"gasUsed":20371},"max":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371},"median":{"args":[0,"316782645448822",{"from":"0xf17f52151ebef6c7334fad080c5704d77216b732"}],"gasUsed":35371}}}}; /***/ }), @@ -7605,13591 +7989,13446 @@ function fromByteArray (uint8) { /***/ }), -/***/ "./node_modules/bignumber.js/bignumber.js": -/*!************************************************!*\ - !*** ./node_modules/bignumber.js/bignumber.js ***! - \************************************************/ +/***/ "./node_modules/bn.js/lib/bn.js": +/*!**************************************!*\ + !*** ./node_modules/bn.js/lib/bn.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var __WEBPACK_AMD_DEFINE_RESULT__;/*! bignumber.js v2.0.7 https://github.com/MikeMcl/bignumber.js/LICENCE */ - -;(function (global) { - 'use strict'; - - /* - bignumber.js v2.0.7 - A JavaScript library for arbitrary-precision arithmetic. - https://github.com/MikeMcl/bignumber.js - Copyright (c) 2015 Michael Mclaughlin - MIT Expat Licence - */ - +/* WEBPACK VAR INJECTION */(function(module) {(function (module, exports) { + 'use strict'; - var BigNumber, crypto, parseNumeric, - isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, - mathceil = Math.ceil, - mathfloor = Math.floor, - notBool = ' not a boolean or binary digit', - roundingMode = 'rounding mode', - tooManyDigits = 'number type has more than 15 significant digits', - ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_', - BASE = 1e14, - LOG_BASE = 14, - MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 - // MAX_INT32 = 0x7fffffff, // 2^31 - 1 - POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], - SQRT_BASE = 1e7, + // Utils + function assert (val, msg) { + if (!val) throw new Error(msg || 'Assertion failed'); + } - /* - * The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and - * the arguments to toExponential, toFixed, toFormat, and toPrecision, beyond which an - * exception is thrown (if ERRORS is true). - */ - MAX = 1E9; // 0 to MAX_INT32 + // Could use `inherits` module, but don't want to move from single file + // architecture yet. + function inherits (ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + // BN - /* - * Create and return a BigNumber constructor. - */ - function another(configObj) { - var div, + function BN (number, base, endian) { + if (BN.isBN(number)) { + return number; + } - // id tracks the caller function, so its name can be included in error messages. - id = 0, - P = BigNumber.prototype, - ONE = new BigNumber(1), + this.negative = 0; + this.words = null; + this.length = 0; + // Reduction context + this.red = null; - /********************************* EDITABLE DEFAULTS **********************************/ + if (number !== null) { + if (base === 'le' || base === 'be') { + endian = base; + base = 10; + } + this._init(number || 0, base || 10, endian || 'be'); + } + } + if (typeof module === 'object') { + module.exports = BN; + } else { + exports.BN = BN; + } - /* - * The default values below must be integers within the inclusive ranges stated. - * The values can also be changed at run-time using BigNumber.config. - */ + BN.BN = BN; + BN.wordSize = 26; - // The maximum number of decimal places for operations involving division. - DECIMAL_PLACES = 20, // 0 to MAX + var Buffer; + try { + Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer; + } catch (e) { + } - /* - * The rounding mode used when rounding to the above decimal places, and when using - * toExponential, toFixed, toFormat and toPrecision, and round (default value). - * UP 0 Away from zero. - * DOWN 1 Towards zero. - * CEIL 2 Towards +Infinity. - * FLOOR 3 Towards -Infinity. - * HALF_UP 4 Towards nearest neighbour. If equidistant, up. - * HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. - * HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. - * HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. - * HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. - */ - ROUNDING_MODE = 4, // 0 to 8 + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } - // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); + }; - // The exponent value at and beneath which toString returns exponential notation. - // Number type: -7 - TO_EXP_NEG = -7, // 0 to -MAX + BN.max = function max (left, right) { + if (left.cmp(right) > 0) return left; + return right; + }; - // The exponent value at and above which toString returns exponential notation. - // Number type: 21 - TO_EXP_POS = 21, // 0 to MAX + BN.min = function min (left, right) { + if (left.cmp(right) < 0) return left; + return right; + }; - // RANGE : [MIN_EXP, MAX_EXP] + BN.prototype._init = function init (number, base, endian) { + if (typeof number === 'number') { + return this._initNumber(number, base, endian); + } - // The minimum exponent value, beneath which underflow to zero occurs. - // Number type: -324 (5e-324) - MIN_EXP = -1e7, // -1 to -MAX + if (typeof number === 'object') { + return this._initArray(number, base, endian); + } - // The maximum exponent value, above which overflow to Infinity occurs. - // Number type: 308 (1.7976931348623157e+308) - // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. - MAX_EXP = 1e7, // 1 to MAX + if (base === 'hex') { + base = 16; + } + assert(base === (base | 0) && base >= 2 && base <= 36); - // Whether BigNumber Errors are ever thrown. - ERRORS = true, // true or false + number = number.toString().replace(/\s+/g, ''); + var start = 0; + if (number[0] === '-') { + start++; + } - // Change to intValidatorNoErrors if ERRORS is false. - isValidInt = intValidatorWithErrors, // intValidatorWithErrors/intValidatorNoErrors + if (base === 16) { + this._parseHex(number, start); + } else { + this._parseBase(number, base, start); + } - // Whether to use cryptographically-secure random number generation, if available. - CRYPTO = false, // true or false + if (number[0] === '-') { + this.negative = 1; + } - /* - * The modulo mode used when calculating the modulus: a mod n. - * The quotient (q = a / n) is calculated according to the corresponding rounding mode. - * The remainder (r) is calculated as: r = a - n * q. - * - * UP 0 The remainder is positive if the dividend is negative, else is negative. - * DOWN 1 The remainder has the same sign as the dividend. - * This modulo mode is commonly known as 'truncated division' and is - * equivalent to (a % n) in JavaScript. - * FLOOR 3 The remainder has the same sign as the divisor (Python %). - * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. - * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). - * The remainder is always positive. - * - * The truncated division, floored division, Euclidian division and IEEE 754 remainder - * modes are commonly used for the modulus operation. - * Although the other rounding modes can also be used, they may not give useful results. - */ - MODULO_MODE = 1, // 0 to 9 + this.strip(); - // The maximum number of significant digits of the result of the toPower operation. - // If POW_PRECISION is 0, there will be unlimited significant digits. - POW_PRECISION = 100, // 0 to MAX + if (endian !== 'le') return; - // The format specification used by the BigNumber.prototype.toFormat method. - FORMAT = { - decimalSeparator: '.', - groupSeparator: ',', - groupSize: 3, - secondaryGroupSize: 0, - fractionGroupSeparator: '\xA0', // non-breaking space - fractionGroupSize: 0 - }; + this._initArray(this.toArray(), base, endian); + }; + BN.prototype._initNumber = function _initNumber (number, base, endian) { + if (number < 0) { + this.negative = 1; + number = -number; + } + if (number < 0x4000000) { + this.words = [ number & 0x3ffffff ]; + this.length = 1; + } else if (number < 0x10000000000000) { + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff + ]; + this.length = 2; + } else { + assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff, + 1 + ]; + this.length = 3; + } - /******************************************************************************************/ + if (endian !== 'le') return; + // Reverse the bytes + this._initArray(this.toArray(), base, endian); + }; - // CONSTRUCTOR + BN.prototype._initArray = function _initArray (number, base, endian) { + // Perhaps a Uint8Array + assert(typeof number.length === 'number'); + if (number.length <= 0) { + this.words = [ 0 ]; + this.length = 1; + return this; + } + this.length = Math.ceil(number.length / 3); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } - /* - * The BigNumber constructor and exported function. - * Create and return a new instance of a BigNumber object. - * - * n {number|string|BigNumber} A numeric value. - * [b] {number} The base of n. Integer, 2 to 64 inclusive. - */ - function BigNumber( n, b ) { - var c, e, i, num, len, str, - x = this; + var j, w; + var off = 0; + if (endian === 'be') { + for (i = number.length - 1, j = 0; i >= 0; i -= 3) { + w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } else if (endian === 'le') { + for (i = 0, j = 0; i < number.length; i += 3) { + w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } + return this.strip(); + }; - // Enable constructor usage without new. - if ( !( x instanceof BigNumber ) ) { + function parseHex (str, start, end) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; - // 'BigNumber() constructor call without new: {n}' - if (ERRORS) raise( 26, 'constructor call without new', n ); - return new BigNumber( n, b ); - } + r <<= 4; - // 'new BigNumber() base not an integer: {b}' - // 'new BigNumber() base out of range: {b}' - if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) { + // 'a' - 'f' + if (c >= 49 && c <= 54) { + r |= c - 49 + 0xa; - // Duplicate. - if ( n instanceof BigNumber ) { - x.s = n.s; - x.e = n.e; - x.c = ( n = n.c ) ? n.slice() : n; - id = 0; - return; - } + // 'A' - 'F' + } else if (c >= 17 && c <= 22) { + r |= c - 17 + 0xa; - if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) { - x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1; + // '0' - '9' + } else { + r |= c & 0xf; + } + } + return r; + } - // Fast path for integers. - if ( n === ~~n ) { - for ( e = 0, i = n; i >= 10; i /= 10, e++ ); - x.e = e; - x.c = [n]; - id = 0; - return; - } + BN.prototype._parseHex = function _parseHex (number, start) { + // Create possibly bigger array to ensure that it fits the number + this.length = Math.ceil((number.length - start) / 6); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } - str = n + ''; - } else { - if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num ); - x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1; - } - } else { - b = b | 0; - str = n + ''; + var j, w; + // Scan 24-bit chunks and add them to the number + var off = 0; + for (i = number.length - 6, j = 0; i >= start; i -= 6) { + w = parseHex(number, i, i + 6); + this.words[j] |= (w << off) & 0x3ffffff; + // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb + this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + if (i + 6 !== start) { + w = parseHex(number, start, i + 6); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; + } + this.strip(); + }; - // Ensure return value is rounded to DECIMAL_PLACES as with other bases. - // Allow exponential notation to be used with base 10 argument. - if ( b == 10 ) { - x = new BigNumber( n instanceof BigNumber ? n : str ); - return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE ); - } + function parseBase (str, start, end, mul) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; - // Avoid potential interpretation of Infinity and NaN as base 44+ values. - // Any number in exponential form will fail due to the [Ee][+-]. - if ( ( num = typeof n == 'number' ) && n * 0 != 0 || - !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) + - '(?:\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) { - return parseNumeric( x, str, num, b ); - } + r *= mul; - if (num) { - x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1; + // 'a' + if (c >= 49) { + r += c - 49 + 0xa; - if ( ERRORS && str.replace( /^0\.0*|\./, '' ).length > 15 ) { + // 'A' + } else if (c >= 17) { + r += c - 17 + 0xa; - // 'new BigNumber() number type has more than 15 significant digits: {n}' - raise( id, tooManyDigits, n ); - } + // '0' - '9' + } else { + r += c; + } + } + return r; + } - // Prevent later check for length on converted number. - num = false; - } else { - x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1; - } + BN.prototype._parseBase = function _parseBase (number, base, start) { + // Initialize as zero + this.words = [ 0 ]; + this.length = 1; - str = convertBase( str, 10, b, x.s ); - } + // Find length of limb in base + for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { + limbLen++; + } + limbLen--; + limbPow = (limbPow / base) | 0; - // Decimal point? - if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' ); + var total = number.length - start; + var mod = total % limbLen; + var end = Math.min(total, total - mod) + start; - // Exponential form? - if ( ( i = str.search( /e/i ) ) > 0 ) { + var word = 0; + for (var i = start; i < end; i += limbLen) { + word = parseBase(number, i, i + limbLen, base); - // Determine exponent. - if ( e < 0 ) e = i; - e += +str.slice( i + 1 ); - str = str.substring( 0, i ); - } else if ( e < 0 ) { + this.imuln(limbPow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } - // Integer. - e = str.length; - } + if (mod !== 0) { + var pow = 1; + word = parseBase(number, i, number.length, base); - // Determine leading zeros. - for ( i = 0; str.charCodeAt(i) === 48; i++ ); + for (i = 0; i < mod; i++) { + pow *= base; + } - // Determine trailing zeros. - for ( len = str.length; str.charCodeAt(--len) === 48; ); - str = str.slice( i, len + 1 ); + this.imuln(pow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + }; - if (str) { - len = str.length; + BN.prototype.copy = function copy (dest) { + dest.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + dest.words[i] = this.words[i]; + } + dest.length = this.length; + dest.negative = this.negative; + dest.red = this.red; + }; - // Disallow numbers with over 15 significant digits if number type. - // 'new BigNumber() number type has more than 15 significant digits: {n}' - if ( num && ERRORS && len > 15 ) raise( id, tooManyDigits, x.s * n ); + BN.prototype.clone = function clone () { + var r = new BN(null); + this.copy(r); + return r; + }; - e = e - i - 1; + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; - // Overflow? - if ( e > MAX_EXP ) { + // Remove leading `0` from `this` + BN.prototype.strip = function strip () { + while (this.length > 1 && this.words[this.length - 1] === 0) { + this.length--; + } + return this._normSign(); + }; - // Infinity. - x.c = x.e = null; + BN.prototype._normSign = function _normSign () { + // -0 = 0 + if (this.length === 1 && this.words[0] === 0) { + this.negative = 0; + } + return this; + }; - // Underflow? - } else if ( e < MIN_EXP ) { + BN.prototype.inspect = function inspect () { + return (this.red ? ''; + }; - // Zero. - x.c = [ x.e = 0 ]; - } else { - x.e = e; - x.c = []; + /* - // Transform base + var zeros = []; + var groupSizes = []; + var groupBases = []; - // e is the base 10 exponent. - // i is where to slice str to get the first element of the coefficient array. - i = ( e + 1 ) % LOG_BASE; - if ( e < 0 ) i += LOG_BASE; + var s = ''; + var i = -1; + while (++i < BN.wordSize) { + zeros[i] = s; + s += '0'; + } + groupSizes[0] = 0; + groupSizes[1] = 0; + groupBases[0] = 0; + groupBases[1] = 0; + var base = 2 - 1; + while (++base < 36 + 1) { + var groupSize = 0; + var groupBase = 1; + while (groupBase < (1 << BN.wordSize) / base) { + groupBase *= base; + groupSize += 1; + } + groupSizes[base] = groupSize; + groupBases[base] = groupBase; + } - if ( i < len ) { - if (i) x.c.push( +str.slice( 0, i ) ); + */ - for ( len -= LOG_BASE; i < len; ) { - x.c.push( +str.slice( i, i += LOG_BASE ) ); - } + var zeros = [ + '', + '0', + '00', + '000', + '0000', + '00000', + '000000', + '0000000', + '00000000', + '000000000', + '0000000000', + '00000000000', + '000000000000', + '0000000000000', + '00000000000000', + '000000000000000', + '0000000000000000', + '00000000000000000', + '000000000000000000', + '0000000000000000000', + '00000000000000000000', + '000000000000000000000', + '0000000000000000000000', + '00000000000000000000000', + '000000000000000000000000', + '0000000000000000000000000' + ]; - str = str.slice(i); - i = LOG_BASE - str.length; - } else { - i -= len; - } + var groupSizes = [ + 0, 0, + 25, 16, 12, 11, 10, 9, 8, + 8, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5 + ]; - for ( ; i--; str += '0' ); - x.c.push( +str ); - } - } else { + var groupBases = [ + 0, 0, + 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, + 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, + 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, + 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, + 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 + ]; - // Zero. - x.c = [ x.e = 0 ]; - } + BN.prototype.toString = function toString (base, padding) { + base = base || 10; + padding = padding | 0 || 1; - id = 0; + var out; + if (base === 16 || base === 'hex') { + out = ''; + var off = 0; + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = this.words[i]; + var word = (((w << off) | carry) & 0xffffff).toString(16); + carry = (w >>> (24 - off)) & 0xffffff; + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + off += 2; + if (off >= 26) { + off -= 26; + i--; } + } + if (carry !== 0) { + out = carry.toString(16) + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + if (base === (base | 0) && base >= 2 && base <= 36) { + // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); + var groupSize = groupSizes[base]; + // var groupBase = Math.pow(base, groupSize); + var groupBase = groupBases[base]; + out = ''; + var c = this.clone(); + c.negative = 0; + while (!c.isZero()) { + var r = c.modn(groupBase).toString(base); + c = c.idivn(groupBase); - // CONSTRUCTOR PROPERTIES + if (!c.isZero()) { + out = zeros[groupSize - r.length] + r + out; + } else { + out = r + out; + } + } + if (this.isZero()) { + out = '0' + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + assert(false, 'Base should be between 2 and 36'); + }; - BigNumber.another = another; + BN.prototype.toNumber = function toNumber () { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { + // NOTE: at this stage it is known that the top bit is set + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { + assert(false, 'Number can only safely store up to 53 bits'); + } + return (this.negative !== 0) ? -ret : ret; + }; - BigNumber.ROUND_UP = 0; - BigNumber.ROUND_DOWN = 1; - BigNumber.ROUND_CEIL = 2; - BigNumber.ROUND_FLOOR = 3; - BigNumber.ROUND_HALF_UP = 4; - BigNumber.ROUND_HALF_DOWN = 5; - BigNumber.ROUND_HALF_EVEN = 6; - BigNumber.ROUND_HALF_CEIL = 7; - BigNumber.ROUND_HALF_FLOOR = 8; - BigNumber.EUCLID = 9; + BN.prototype.toJSON = function toJSON () { + return this.toString(16); + }; + BN.prototype.toBuffer = function toBuffer (endian, length) { + assert(typeof Buffer !== 'undefined'); + return this.toArrayLike(Buffer, endian, length); + }; - /* - * Configure infrequently-changing library-wide settings. - * - * Accept an object or an argument list, with one or many of the following properties or - * parameters respectively: - * - * DECIMAL_PLACES {number} Integer, 0 to MAX inclusive - * ROUNDING_MODE {number} Integer, 0 to 8 inclusive - * EXPONENTIAL_AT {number|number[]} Integer, -MAX to MAX inclusive or - * [integer -MAX to 0 incl., 0 to MAX incl.] - * RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or - * [integer -MAX to -1 incl., integer 1 to MAX incl.] - * ERRORS {boolean|number} true, false, 1 or 0 - * CRYPTO {boolean|number} true, false, 1 or 0 - * MODULO_MODE {number} 0 to 9 inclusive - * POW_PRECISION {number} 0 to MAX inclusive - * FORMAT {object} See BigNumber.prototype.toFormat - * decimalSeparator {string} - * groupSeparator {string} - * groupSize {number} - * secondaryGroupSize {number} - * fractionGroupSeparator {string} - * fractionGroupSize {number} - * - * (The values assigned to the above FORMAT object properties are not checked for validity.) - * - * E.g. - * BigNumber.config(20, 4) is equivalent to - * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) - * - * Ignore properties/parameters set to null or undefined. - * Return an object with the properties current values. - */ - BigNumber.config = function () { - var v, p, - i = 0, - r = {}, - a = arguments, - o = a[0], - has = o && typeof o == 'object' - ? function () { if ( o.hasOwnProperty(p) ) return ( v = o[p] ) != null; } - : function () { if ( a.length > i ) return ( v = a[i++] ) != null; }; + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; - // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. - // 'config() DECIMAL_PLACES not an integer: {v}' - // 'config() DECIMAL_PLACES out of range: {v}' - if ( has( p = 'DECIMAL_PLACES' ) && isValidInt( v, 0, MAX, 2, p ) ) { - DECIMAL_PLACES = v | 0; - } - r[p] = DECIMAL_PLACES; + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + var byteLength = this.byteLength(); + var reqLength = length || Math.max(1, byteLength); + assert(byteLength <= reqLength, 'byte array longer than desired length'); + assert(reqLength > 0, 'Requested array length <= 0'); - // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. - // 'config() ROUNDING_MODE not an integer: {v}' - // 'config() ROUNDING_MODE out of range: {v}' - if ( has( p = 'ROUNDING_MODE' ) && isValidInt( v, 0, 8, 2, p ) ) { - ROUNDING_MODE = v | 0; - } - r[p] = ROUNDING_MODE; + this.strip(); + var littleEndian = endian === 'le'; + var res = new ArrayType(reqLength); - // EXPONENTIAL_AT {number|number[]} - // Integer, -MAX to MAX inclusive or [integer -MAX to 0 inclusive, 0 to MAX inclusive]. - // 'config() EXPONENTIAL_AT not an integer: {v}' - // 'config() EXPONENTIAL_AT out of range: {v}' - if ( has( p = 'EXPONENTIAL_AT' ) ) { + var b, i; + var q = this.clone(); + if (!littleEndian) { + // Assume big-endian + for (i = 0; i < reqLength - byteLength; i++) { + res[i] = 0; + } - if ( isArray(v) ) { - if ( isValidInt( v[0], -MAX, 0, 2, p ) && isValidInt( v[1], 0, MAX, 2, p ) ) { - TO_EXP_NEG = v[0] | 0; - TO_EXP_POS = v[1] | 0; - } - } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) { - TO_EXP_NEG = -( TO_EXP_POS = ( v < 0 ? -v : v ) | 0 ); - } - } - r[p] = [ TO_EXP_NEG, TO_EXP_POS ]; + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); - // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or - // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. - // 'config() RANGE not an integer: {v}' - // 'config() RANGE cannot be zero: {v}' - // 'config() RANGE out of range: {v}' - if ( has( p = 'RANGE' ) ) { + res[reqLength - i - 1] = b; + } + } else { + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); - if ( isArray(v) ) { - if ( isValidInt( v[0], -MAX, -1, 2, p ) && isValidInt( v[1], 1, MAX, 2, p ) ) { - MIN_EXP = v[0] | 0; - MAX_EXP = v[1] | 0; - } - } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) { - if ( v | 0 ) MIN_EXP = -( MAX_EXP = ( v < 0 ? -v : v ) | 0 ); - else if (ERRORS) raise( 2, p + ' cannot be zero', v ); - } - } - r[p] = [ MIN_EXP, MAX_EXP ]; + res[i] = b; + } - // ERRORS {boolean|number} true, false, 1 or 0. - // 'config() ERRORS not a boolean or binary digit: {v}' - if ( has( p = 'ERRORS' ) ) { + for (; i < reqLength; i++) { + res[i] = 0; + } + } - if ( v === !!v || v === 1 || v === 0 ) { - id = 0; - isValidInt = ( ERRORS = !!v ) ? intValidatorWithErrors : intValidatorNoErrors; - } else if (ERRORS) { - raise( 2, p + notBool, v ); - } - } - r[p] = ERRORS; + return res; + }; - // CRYPTO {boolean|number} true, false, 1 or 0. - // 'config() CRYPTO not a boolean or binary digit: {v}' - // 'config() crypto unavailable: {crypto}' - if ( has( p = 'CRYPTO' ) ) { + if (Math.clz32) { + BN.prototype._countBits = function _countBits (w) { + return 32 - Math.clz32(w); + }; + } else { + BN.prototype._countBits = function _countBits (w) { + var t = w; + var r = 0; + if (t >= 0x1000) { + r += 13; + t >>>= 13; + } + if (t >= 0x40) { + r += 7; + t >>>= 7; + } + if (t >= 0x8) { + r += 4; + t >>>= 4; + } + if (t >= 0x02) { + r += 2; + t >>>= 2; + } + return r + t; + }; + } - if ( v === !!v || v === 1 || v === 0 ) { - CRYPTO = !!( v && crypto && typeof crypto == 'object' ); - if ( v && !CRYPTO && ERRORS ) raise( 2, 'crypto unavailable', crypto ); - } else if (ERRORS) { - raise( 2, p + notBool, v ); - } - } - r[p] = CRYPTO; + BN.prototype._zeroBits = function _zeroBits (w) { + // Short-cut + if (w === 0) return 26; - // MODULO_MODE {number} Integer, 0 to 9 inclusive. - // 'config() MODULO_MODE not an integer: {v}' - // 'config() MODULO_MODE out of range: {v}' - if ( has( p = 'MODULO_MODE' ) && isValidInt( v, 0, 9, 2, p ) ) { - MODULO_MODE = v | 0; - } - r[p] = MODULO_MODE; + var t = w; + var r = 0; + if ((t & 0x1fff) === 0) { + r += 13; + t >>>= 13; + } + if ((t & 0x7f) === 0) { + r += 7; + t >>>= 7; + } + if ((t & 0xf) === 0) { + r += 4; + t >>>= 4; + } + if ((t & 0x3) === 0) { + r += 2; + t >>>= 2; + } + if ((t & 0x1) === 0) { + r++; + } + return r; + }; - // POW_PRECISION {number} Integer, 0 to MAX inclusive. - // 'config() POW_PRECISION not an integer: {v}' - // 'config() POW_PRECISION out of range: {v}' - if ( has( p = 'POW_PRECISION' ) && isValidInt( v, 0, MAX, 2, p ) ) { - POW_PRECISION = v | 0; - } - r[p] = POW_PRECISION; + // Return number of used bits in a BN + BN.prototype.bitLength = function bitLength () { + var w = this.words[this.length - 1]; + var hi = this._countBits(w); + return (this.length - 1) * 26 + hi; + }; - // FORMAT {object} - // 'config() FORMAT not an object: {v}' - if ( has( p = 'FORMAT' ) ) { + function toBitArray (num) { + var w = new Array(num.bitLength()); - if ( typeof v == 'object' ) { - FORMAT = v; - } else if (ERRORS) { - raise( 2, p + ' not an object', v ); - } - } - r[p] = FORMAT; + for (var bit = 0; bit < w.length; bit++) { + var off = (bit / 26) | 0; + var wbit = bit % 26; - return r; - }; + w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; + } + return w; + } - /* - * Return a new BigNumber whose value is the maximum of the arguments. - * - * arguments {number|string|BigNumber} - */ - BigNumber.max = function () { return maxOrMin( arguments, P.lt ); }; + // Number of trailing zero bits + BN.prototype.zeroBits = function zeroBits () { + if (this.isZero()) return 0; + var r = 0; + for (var i = 0; i < this.length; i++) { + var b = this._zeroBits(this.words[i]); + r += b; + if (b !== 26) break; + } + return r; + }; - /* - * Return a new BigNumber whose value is the minimum of the arguments. - * - * arguments {number|string|BigNumber} - */ - BigNumber.min = function () { return maxOrMin( arguments, P.gt ); }; + BN.prototype.byteLength = function byteLength () { + return Math.ceil(this.bitLength() / 8); + }; + BN.prototype.toTwos = function toTwos (width) { + if (this.negative !== 0) { + return this.abs().inotn(width).iaddn(1); + } + return this.clone(); + }; - /* - * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, - * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing - * zeros are produced). - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * - * 'random() decimal places not an integer: {dp}' - * 'random() decimal places out of range: {dp}' - * 'random() crypto unavailable: {crypto}' - */ - BigNumber.random = (function () { - var pow2_53 = 0x20000000000000; + BN.prototype.fromTwos = function fromTwos (width) { + if (this.testn(width - 1)) { + return this.notn(width).iaddn(1).ineg(); + } + return this.clone(); + }; - // Return a 53 bit integer n, where 0 <= n < 9007199254740992. - // Check if Math.random() produces more than 32 bits of randomness. - // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. - // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. - var random53bitInt = (Math.random() * pow2_53) & 0x1fffff - ? function () { return mathfloor( Math.random() * pow2_53 ); } - : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + - (Math.random() * 0x800000 | 0); }; + BN.prototype.isNeg = function isNeg () { + return this.negative !== 0; + }; - return function (dp) { - var a, b, e, k, v, - i = 0, - c = [], - rand = new BigNumber(ONE); + // Return negative clone of `this` + BN.prototype.neg = function neg () { + return this.clone().ineg(); + }; - dp = dp == null || !isValidInt( dp, 0, MAX, 14 ) ? DECIMAL_PLACES : dp | 0; - k = mathceil( dp / LOG_BASE ); + BN.prototype.ineg = function ineg () { + if (!this.isZero()) { + this.negative ^= 1; + } - if (CRYPTO) { + return this; + }; - // Browsers supporting crypto.getRandomValues. - if ( crypto && crypto.getRandomValues ) { + // Or `num` with `this` in-place + BN.prototype.iuor = function iuor (num) { + while (this.length < num.length) { + this.words[this.length++] = 0; + } - a = crypto.getRandomValues( new Uint32Array( k *= 2 ) ); + for (var i = 0; i < num.length; i++) { + this.words[i] = this.words[i] | num.words[i]; + } - for ( ; i < k; ) { + return this.strip(); + }; - // 53 bits: - // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) - // 11111 11111111 11111111 11111111 11100000 00000000 00000000 - // ((Math.pow(2, 32) - 1) >>> 11).toString(2) - // 11111 11111111 11111111 - // 0x20000 is 2^21. - v = a[i] * 0x20000 + (a[i + 1] >>> 11); + BN.prototype.ior = function ior (num) { + assert((this.negative | num.negative) === 0); + return this.iuor(num); + }; - // Rejection sampling: - // 0 <= v < 9007199254740992 - // Probability that v >= 9e15, is - // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 - if ( v >= 9e15 ) { - b = crypto.getRandomValues( new Uint32Array(2) ); - a[i] = b[0]; - a[i + 1] = b[1]; - } else { + // Or `num` with `this` + BN.prototype.or = function or (num) { + if (this.length > num.length) return this.clone().ior(num); + return num.clone().ior(this); + }; - // 0 <= v <= 8999999999999999 - // 0 <= (v % 1e14) <= 99999999999999 - c.push( v % 1e14 ); - i += 2; - } - } - i = k / 2; + BN.prototype.uor = function uor (num) { + if (this.length > num.length) return this.clone().iuor(num); + return num.clone().iuor(this); + }; - // Node.js supporting crypto.randomBytes. - } else if ( crypto && crypto.randomBytes ) { + // And `num` with `this` in-place + BN.prototype.iuand = function iuand (num) { + // b = min-length(num, this) + var b; + if (this.length > num.length) { + b = num; + } else { + b = this; + } - // buffer - a = crypto.randomBytes( k *= 7 ); + for (var i = 0; i < b.length; i++) { + this.words[i] = this.words[i] & num.words[i]; + } - for ( ; i < k; ) { + this.length = b.length; - // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 - // 0x100000000 is 2^32, 0x1000000 is 2^24 - // 11111 11111111 11111111 11111111 11111111 11111111 11111111 - // 0 <= v < 9007199254740992 - v = ( ( a[i] & 31 ) * 0x1000000000000 ) + ( a[i + 1] * 0x10000000000 ) + - ( a[i + 2] * 0x100000000 ) + ( a[i + 3] * 0x1000000 ) + - ( a[i + 4] << 16 ) + ( a[i + 5] << 8 ) + a[i + 6]; + return this.strip(); + }; - if ( v >= 9e15 ) { - crypto.randomBytes(7).copy( a, i ); - } else { + BN.prototype.iand = function iand (num) { + assert((this.negative | num.negative) === 0); + return this.iuand(num); + }; - // 0 <= (v % 1e14) <= 99999999999999 - c.push( v % 1e14 ); - i += 7; - } - } - i = k / 7; - } else if (ERRORS) { - raise( 14, 'crypto unavailable', crypto ); - } - } + // And `num` with `this` + BN.prototype.and = function and (num) { + if (this.length > num.length) return this.clone().iand(num); + return num.clone().iand(this); + }; - // Use Math.random: CRYPTO is false or crypto is unavailable and ERRORS is false. - if (!i) { + BN.prototype.uand = function uand (num) { + if (this.length > num.length) return this.clone().iuand(num); + return num.clone().iuand(this); + }; - for ( ; i < k; ) { - v = random53bitInt(); - if ( v < 9e15 ) c[i++] = v % 1e14; - } - } + // Xor `num` with `this` in-place + BN.prototype.iuxor = function iuxor (num) { + // a.length > b.length + var a; + var b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } - k = c[--i]; - dp %= LOG_BASE; + for (var i = 0; i < b.length; i++) { + this.words[i] = a.words[i] ^ b.words[i]; + } - // Convert trailing digits to zeros according to dp. - if ( k && dp ) { - v = POWS_TEN[LOG_BASE - dp]; - c[i] = mathfloor( k / v ) * v; - } + if (this !== a) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } - // Remove trailing elements which are zero. - for ( ; c[i] === 0; c.pop(), i-- ); + this.length = a.length; - // Zero? - if ( i < 0 ) { - c = [ e = 0 ]; - } else { + return this.strip(); + }; - // Remove leading elements which are zero and adjust exponent accordingly. - for ( e = -1 ; c[0] === 0; c.shift(), e -= LOG_BASE); + BN.prototype.ixor = function ixor (num) { + assert((this.negative | num.negative) === 0); + return this.iuxor(num); + }; - // Count the digits of the first element of c to determine leading zeros, and... - for ( i = 1, v = c[0]; v >= 10; v /= 10, i++); + // Xor `num` with `this` + BN.prototype.xor = function xor (num) { + if (this.length > num.length) return this.clone().ixor(num); + return num.clone().ixor(this); + }; - // adjust the exponent accordingly. - if ( i < LOG_BASE ) e -= LOG_BASE - i; - } + BN.prototype.uxor = function uxor (num) { + if (this.length > num.length) return this.clone().iuxor(num); + return num.clone().iuxor(this); + }; - rand.e = e; - rand.c = c; - return rand; - }; - })(); + // Not ``this`` with ``width`` bitwidth + BN.prototype.inotn = function inotn (width) { + assert(typeof width === 'number' && width >= 0); + var bytesNeeded = Math.ceil(width / 26) | 0; + var bitsLeft = width % 26; - // PRIVATE FUNCTIONS + // Extend the buffer with leading zeroes + this._expand(bytesNeeded); + if (bitsLeft > 0) { + bytesNeeded--; + } - // Convert a numeric string of baseIn to a numeric string of baseOut. - function convertBase( str, baseOut, baseIn, sign ) { - var d, e, k, r, x, xc, y, - i = str.indexOf( '.' ), - dp = DECIMAL_PLACES, - rm = ROUNDING_MODE; + // Handle complete words + for (var i = 0; i < bytesNeeded; i++) { + this.words[i] = ~this.words[i] & 0x3ffffff; + } - if ( baseIn < 37 ) str = str.toLowerCase(); + // Handle the residue + if (bitsLeft > 0) { + this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + } - // Non-integer. - if ( i >= 0 ) { - k = POW_PRECISION; + // And remove leading zeroes + return this.strip(); + }; - // Unlimited precision. - POW_PRECISION = 0; - str = str.replace( '.', '' ); - y = new BigNumber(baseIn); - x = y.pow( str.length - i ); - POW_PRECISION = k; + BN.prototype.notn = function notn (width) { + return this.clone().inotn(width); + }; - // Convert str as if an integer, then restore the fraction part by dividing the - // result by its base raised to a power. - y.c = toBaseOut( toFixedPoint( coeffToString( x.c ), x.e ), 10, baseOut ); - y.e = y.c.length; - } + // Set `bit` of `this` + BN.prototype.setn = function setn (bit, val) { + assert(typeof bit === 'number' && bit >= 0); - // Convert the number as integer. - xc = toBaseOut( str, baseIn, baseOut ); - e = k = xc.length; + var off = (bit / 26) | 0; + var wbit = bit % 26; - // Remove trailing zeros. - for ( ; xc[--k] == 0; xc.pop() ); - if ( !xc[0] ) return '0'; + this._expand(off + 1); - if ( i < 0 ) { - --e; - } else { - x.c = xc; - x.e = e; + if (val) { + this.words[off] = this.words[off] | (1 << wbit); + } else { + this.words[off] = this.words[off] & ~(1 << wbit); + } - // sign is needed for correct rounding. - x.s = sign; - x = div( x, y, dp, rm, baseOut ); - xc = x.c; - r = x.r; - e = x.e; - } + return this.strip(); + }; - d = e + dp + 1; + // Add `num` to `this` in-place + BN.prototype.iadd = function iadd (num) { + var r; - // The rounding digit, i.e. the digit to the right of the digit that may be rounded up. - i = xc[d]; - k = baseOut / 2; - r = r || d < 0 || xc[d + 1] != null; - - r = rm < 4 ? ( i != null || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) ) - : i > k || i == k &&( rm == 4 || r || rm == 6 && xc[d - 1] & 1 || - rm == ( x.s < 0 ? 8 : 7 ) ); - - if ( d < 1 || !xc[0] ) { - - // 1^-dp or 0. - str = r ? toFixedPoint( '1', -dp ) : '0'; - } else { - xc.length = d; - - if (r) { - - // Rounding up may mean the previous digit has to be rounded up and so on. - for ( --baseOut; ++xc[--d] > baseOut; ) { - xc[d] = 0; - - if ( !d ) { - ++e; - xc.unshift(1); - } - } - } - - // Determine trailing zeros. - for ( k = xc.length; !xc[--k]; ); - - // E.g. [4, 11, 15] becomes 4bf. - for ( i = 0, str = ''; i <= k; str += ALPHABET.charAt( xc[i++] ) ); - str = toFixedPoint( str, e ); - } - - // The caller will add the sign. - return str; - } - - - // Perform division in the specified base. Called by div and convertBase. - div = (function () { - - // Assume non-zero x and k. - function multiply( x, k, base ) { - var m, temp, xlo, xhi, - carry = 0, - i = x.length, - klo = k % SQRT_BASE, - khi = k / SQRT_BASE | 0; - - for ( x = x.slice(); i--; ) { - xlo = x[i] % SQRT_BASE; - xhi = x[i] / SQRT_BASE | 0; - m = khi * xlo + xhi * klo; - temp = klo * xlo + ( ( m % SQRT_BASE ) * SQRT_BASE ) + carry; - carry = ( temp / base | 0 ) + ( m / SQRT_BASE | 0 ) + khi * xhi; - x[i] = temp % base; - } - - if (carry) x.unshift(carry); - - return x; - } - - function compare( a, b, aL, bL ) { - var i, cmp; - - if ( aL != bL ) { - cmp = aL > bL ? 1 : -1; - } else { - - for ( i = cmp = 0; i < aL; i++ ) { - - if ( a[i] != b[i] ) { - cmp = a[i] > b[i] ? 1 : -1; - break; - } - } - } - return cmp; - } - - function subtract( a, b, aL, base ) { - var i = 0; - - // Subtract b from a. - for ( ; aL--; ) { - a[aL] -= i; - i = a[aL] < b[aL] ? 1 : 0; - a[aL] = i * base + a[aL] - b[aL]; - } - - // Remove leading zeros. - for ( ; !a[0] && a.length > 1; a.shift() ); - } - - // x: dividend, y: divisor. - return function ( x, y, dp, rm, base ) { - var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, - yL, yz, - s = x.s == y.s ? 1 : -1, - xc = x.c, - yc = y.c; - - // Either NaN, Infinity or 0? - if ( !xc || !xc[0] || !yc || !yc[0] ) { - - return new BigNumber( - - // Return NaN if either NaN, or both Infinity or 0. - !x.s || !y.s || ( xc ? yc && xc[0] == yc[0] : !yc ) ? NaN : - - // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. - xc && xc[0] == 0 || !yc ? s * 0 : s / 0 - ); - } - - q = new BigNumber(s); - qc = q.c = []; - e = x.e - y.e; - s = dp + e + 1; - - if ( !base ) { - base = BASE; - e = bitFloor( x.e / LOG_BASE ) - bitFloor( y.e / LOG_BASE ); - s = s / LOG_BASE | 0; - } - - // Result exponent may be one less then the current value of e. - // The coefficients of the BigNumbers from convertBase may have trailing zeros. - for ( i = 0; yc[i] == ( xc[i] || 0 ); i++ ); - if ( yc[i] > ( xc[i] || 0 ) ) e--; - - if ( s < 0 ) { - qc.push(1); - more = true; - } else { - xL = xc.length; - yL = yc.length; - i = 0; - s += 2; - - // Normalise xc and yc so highest order digit of yc is >= base / 2. - - n = mathfloor( base / ( yc[0] + 1 ) ); - - // Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1. - // if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) { - if ( n > 1 ) { - yc = multiply( yc, n, base ); - xc = multiply( xc, n, base ); - yL = yc.length; - xL = xc.length; - } - - xi = yL; - rem = xc.slice( 0, yL ); - remL = rem.length; - - // Add zeros to make remainder as long as divisor. - for ( ; remL < yL; rem[remL++] = 0 ); - yz = yc.slice(); - yz.unshift(0); - yc0 = yc[0]; - if ( yc[1] >= base / 2 ) yc0++; - // Not necessary, but to prevent trial digit n > base, when using base 3. - // else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15; - - do { - n = 0; - - // Compare divisor and remainder. - cmp = compare( yc, rem, yL, remL ); - - // If divisor < remainder. - if ( cmp < 0 ) { - - // Calculate trial digit, n. - - rem0 = rem[0]; - if ( yL != remL ) rem0 = rem0 * base + ( rem[1] || 0 ); + // negative + positive + if (this.negative !== 0 && num.negative === 0) { + this.negative = 0; + r = this.isub(num); + this.negative ^= 1; + return this._normSign(); - // n is how many times the divisor goes into the current remainder. - n = mathfloor( rem0 / yc0 ); + // positive + negative + } else if (this.negative === 0 && num.negative !== 0) { + num.negative = 0; + r = this.isub(num); + num.negative = 1; + return r._normSign(); + } - // Algorithm: - // 1. product = divisor * trial digit (n) - // 2. if product > remainder: product -= divisor, n-- - // 3. remainder -= product - // 4. if product was < remainder at 2: - // 5. compare new remainder and divisor - // 6. If remainder > divisor: remainder -= divisor, n++ + // a.length > b.length + var a, b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } - if ( n > 1 ) { + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) + (b.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } - // n may be > base only when base is 3. - if (n >= base) n = base - 1; + this.length = a.length; + if (carry !== 0) { + this.words[this.length] = carry; + this.length++; + // Copy the rest of the words + } else if (a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } - // product = divisor * trial digit. - prod = multiply( yc, n, base ); - prodL = prod.length; - remL = rem.length; + return this; + }; - // Compare product and remainder. - // If product > remainder. - // Trial digit n too high. - // n is 1 too high about 5% of the time, and is not known to have - // ever been more than 1 too high. - while ( compare( prod, rem, prodL, remL ) == 1 ) { - n--; + // Add `num` to `this` + BN.prototype.add = function add (num) { + var res; + if (num.negative !== 0 && this.negative === 0) { + num.negative = 0; + res = this.sub(num); + num.negative ^= 1; + return res; + } else if (num.negative === 0 && this.negative !== 0) { + this.negative = 0; + res = num.sub(this); + this.negative = 1; + return res; + } - // Subtract divisor from product. - subtract( prod, yL < prodL ? yz : yc, prodL, base ); - prodL = prod.length; - cmp = 1; - } - } else { + if (this.length > num.length) return this.clone().iadd(num); - // n is 0 or 1, cmp is -1. - // If n is 0, there is no need to compare yc and rem again below, - // so change cmp to 1 to avoid it. - // If n is 1, leave cmp as -1, so yc and rem are compared again. - if ( n == 0 ) { + return num.clone().iadd(this); + }; - // divisor < remainder, so n must be at least 1. - cmp = n = 1; - } + // Subtract `num` from `this` in-place + BN.prototype.isub = function isub (num) { + // this - (-num) = this + num + if (num.negative !== 0) { + num.negative = 0; + var r = this.iadd(num); + num.negative = 1; + return r._normSign(); - // product = divisor - prod = yc.slice(); - prodL = prod.length; - } + // -this - num = -(this + num) + } else if (this.negative !== 0) { + this.negative = 0; + this.iadd(num); + this.negative = 1; + return this._normSign(); + } - if ( prodL < remL ) prod.unshift(0); + // At this point both numbers are positive + var cmp = this.cmp(num); - // Subtract product from remainder. - subtract( rem, prod, remL, base ); - remL = rem.length; + // Optimization - zeroify + if (cmp === 0) { + this.negative = 0; + this.length = 1; + this.words[0] = 0; + return this; + } - // If product was < remainder. - if ( cmp == -1 ) { + // a > b + var a, b; + if (cmp > 0) { + a = this; + b = num; + } else { + a = num; + b = this; + } - // Compare divisor and new remainder. - // If divisor < new remainder, subtract divisor from remainder. - // Trial digit n too low. - // n is 1 too low about 5% of the time, and very rarely 2 too low. - while ( compare( yc, rem, yL, remL ) < 1 ) { - n++; + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) - (b.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } - // Subtract divisor from remainder. - subtract( rem, yL < remL ? yz : yc, remL, base ); - remL = rem.length; - } - } - } else if ( cmp === 0 ) { - n++; - rem = [0]; - } // else cmp === 1 and n will be 0 + // Copy rest of the words + if (carry === 0 && i < a.length && a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } - // Add the next digit, n, to the result array. - qc[i++] = n; + this.length = Math.max(this.length, i); - // Update the remainder. - if ( rem[0] ) { - rem[remL++] = xc[xi] || 0; - } else { - rem = [ xc[xi] ]; - remL = 1; - } - } while ( ( xi++ < xL || rem[0] != null ) && s-- ); + if (a !== this) { + this.negative = 1; + } - more = rem[0] != null; + return this.strip(); + }; - // Leading zero? - if ( !qc[0] ) qc.shift(); - } + // Subtract `num` from `this` + BN.prototype.sub = function sub (num) { + return this.clone().isub(num); + }; - if ( base == BASE ) { + function smallMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + var len = (self.length + num.length) | 0; + out.length = len; + len = (len - 1) | 0; - // To calculate q.e, first get the number of digits of qc[0]. - for ( i = 1, s = qc[0]; s >= 10; s /= 10, i++ ); - round( q, dp + ( q.e = i + e * LOG_BASE - 1 ) + 1, rm, more ); + // Peel one iteration (compiler can't do it, because of code complexity) + var a = self.words[0] | 0; + var b = num.words[0] | 0; + var r = a * b; - // Caller is convertBase. - } else { - q.e = e; - q.r = +more; - } + var lo = r & 0x3ffffff; + var carry = (r / 0x4000000) | 0; + out.words[0] = lo; - return q; - }; - })(); + for (var k = 1; k < len; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = carry >>> 26; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = (k - j) | 0; + a = self.words[i] | 0; + b = num.words[j] | 0; + r = a * b + rword; + ncarry += (r / 0x4000000) | 0; + rword = r & 0x3ffffff; + } + out.words[k] = rword | 0; + carry = ncarry | 0; + } + if (carry !== 0) { + out.words[k] = carry | 0; + } else { + out.length--; + } + return out.strip(); + } - /* - * Return a string representing the value of BigNumber n in fixed-point or exponential - * notation rounded to the specified decimal places or significant digits. - * - * n is a BigNumber. - * i is the index of the last digit required (i.e. the digit that may be rounded up). - * rm is the rounding mode. - * caller is caller id: toExponential 19, toFixed 20, toFormat 21, toPrecision 24. - */ - function format( n, i, rm, caller ) { - var c0, e, ne, len, str; + // TODO(indutny): it may be reasonable to omit it for users who don't need + // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit + // multiplication (like elliptic secp256k1). + var comb10MulTo = function comb10MulTo (self, num, out) { + var a = self.words; + var b = num.words; + var o = out.words; + var c = 0; + var lo; + var mid; + var hi; + var a0 = a[0] | 0; + var al0 = a0 & 0x1fff; + var ah0 = a0 >>> 13; + var a1 = a[1] | 0; + var al1 = a1 & 0x1fff; + var ah1 = a1 >>> 13; + var a2 = a[2] | 0; + var al2 = a2 & 0x1fff; + var ah2 = a2 >>> 13; + var a3 = a[3] | 0; + var al3 = a3 & 0x1fff; + var ah3 = a3 >>> 13; + var a4 = a[4] | 0; + var al4 = a4 & 0x1fff; + var ah4 = a4 >>> 13; + var a5 = a[5] | 0; + var al5 = a5 & 0x1fff; + var ah5 = a5 >>> 13; + var a6 = a[6] | 0; + var al6 = a6 & 0x1fff; + var ah6 = a6 >>> 13; + var a7 = a[7] | 0; + var al7 = a7 & 0x1fff; + var ah7 = a7 >>> 13; + var a8 = a[8] | 0; + var al8 = a8 & 0x1fff; + var ah8 = a8 >>> 13; + var a9 = a[9] | 0; + var al9 = a9 & 0x1fff; + var ah9 = a9 >>> 13; + var b0 = b[0] | 0; + var bl0 = b0 & 0x1fff; + var bh0 = b0 >>> 13; + var b1 = b[1] | 0; + var bl1 = b1 & 0x1fff; + var bh1 = b1 >>> 13; + var b2 = b[2] | 0; + var bl2 = b2 & 0x1fff; + var bh2 = b2 >>> 13; + var b3 = b[3] | 0; + var bl3 = b3 & 0x1fff; + var bh3 = b3 >>> 13; + var b4 = b[4] | 0; + var bl4 = b4 & 0x1fff; + var bh4 = b4 >>> 13; + var b5 = b[5] | 0; + var bl5 = b5 & 0x1fff; + var bh5 = b5 >>> 13; + var b6 = b[6] | 0; + var bl6 = b6 & 0x1fff; + var bh6 = b6 >>> 13; + var b7 = b[7] | 0; + var bl7 = b7 & 0x1fff; + var bh7 = b7 >>> 13; + var b8 = b[8] | 0; + var bl8 = b8 & 0x1fff; + var bh8 = b8 >>> 13; + var b9 = b[9] | 0; + var bl9 = b9 & 0x1fff; + var bh9 = b9 >>> 13; - rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode ) - ? rm | 0 : ROUNDING_MODE; + out.negative = self.negative ^ num.negative; + out.length = 19; + /* k = 0 */ + lo = Math.imul(al0, bl0); + mid = Math.imul(al0, bh0); + mid = (mid + Math.imul(ah0, bl0)) | 0; + hi = Math.imul(ah0, bh0); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; + w0 &= 0x3ffffff; + /* k = 1 */ + lo = Math.imul(al1, bl0); + mid = Math.imul(al1, bh0); + mid = (mid + Math.imul(ah1, bl0)) | 0; + hi = Math.imul(ah1, bh0); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; + w1 &= 0x3ffffff; + /* k = 2 */ + lo = Math.imul(al2, bl0); + mid = Math.imul(al2, bh0); + mid = (mid + Math.imul(ah2, bl0)) | 0; + hi = Math.imul(ah2, bh0); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; + w2 &= 0x3ffffff; + /* k = 3 */ + lo = Math.imul(al3, bl0); + mid = Math.imul(al3, bh0); + mid = (mid + Math.imul(ah3, bl0)) | 0; + hi = Math.imul(ah3, bh0); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; + w3 &= 0x3ffffff; + /* k = 4 */ + lo = Math.imul(al4, bl0); + mid = Math.imul(al4, bh0); + mid = (mid + Math.imul(ah4, bl0)) | 0; + hi = Math.imul(ah4, bh0); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; + w4 &= 0x3ffffff; + /* k = 5 */ + lo = Math.imul(al5, bl0); + mid = Math.imul(al5, bh0); + mid = (mid + Math.imul(ah5, bl0)) | 0; + hi = Math.imul(ah5, bh0); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; + w5 &= 0x3ffffff; + /* k = 6 */ + lo = Math.imul(al6, bl0); + mid = Math.imul(al6, bh0); + mid = (mid + Math.imul(ah6, bl0)) | 0; + hi = Math.imul(ah6, bh0); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; + w6 &= 0x3ffffff; + /* k = 7 */ + lo = Math.imul(al7, bl0); + mid = Math.imul(al7, bh0); + mid = (mid + Math.imul(ah7, bl0)) | 0; + hi = Math.imul(ah7, bh0); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; + w7 &= 0x3ffffff; + /* k = 8 */ + lo = Math.imul(al8, bl0); + mid = Math.imul(al8, bh0); + mid = (mid + Math.imul(ah8, bl0)) | 0; + hi = Math.imul(ah8, bh0); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; + w8 &= 0x3ffffff; + /* k = 9 */ + lo = Math.imul(al9, bl0); + mid = Math.imul(al9, bh0); + mid = (mid + Math.imul(ah9, bl0)) | 0; + hi = Math.imul(ah9, bh0); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; + w9 &= 0x3ffffff; + /* k = 10 */ + lo = Math.imul(al9, bl1); + mid = Math.imul(al9, bh1); + mid = (mid + Math.imul(ah9, bl1)) | 0; + hi = Math.imul(ah9, bh1); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; + w10 &= 0x3ffffff; + /* k = 11 */ + lo = Math.imul(al9, bl2); + mid = Math.imul(al9, bh2); + mid = (mid + Math.imul(ah9, bl2)) | 0; + hi = Math.imul(ah9, bh2); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; + w11 &= 0x3ffffff; + /* k = 12 */ + lo = Math.imul(al9, bl3); + mid = Math.imul(al9, bh3); + mid = (mid + Math.imul(ah9, bl3)) | 0; + hi = Math.imul(ah9, bh3); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; + w12 &= 0x3ffffff; + /* k = 13 */ + lo = Math.imul(al9, bl4); + mid = Math.imul(al9, bh4); + mid = (mid + Math.imul(ah9, bl4)) | 0; + hi = Math.imul(ah9, bh4); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; + w13 &= 0x3ffffff; + /* k = 14 */ + lo = Math.imul(al9, bl5); + mid = Math.imul(al9, bh5); + mid = (mid + Math.imul(ah9, bl5)) | 0; + hi = Math.imul(ah9, bh5); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; + w14 &= 0x3ffffff; + /* k = 15 */ + lo = Math.imul(al9, bl6); + mid = Math.imul(al9, bh6); + mid = (mid + Math.imul(ah9, bl6)) | 0; + hi = Math.imul(ah9, bh6); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; + w15 &= 0x3ffffff; + /* k = 16 */ + lo = Math.imul(al9, bl7); + mid = Math.imul(al9, bh7); + mid = (mid + Math.imul(ah9, bl7)) | 0; + hi = Math.imul(ah9, bh7); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; + w16 &= 0x3ffffff; + /* k = 17 */ + lo = Math.imul(al9, bl8); + mid = Math.imul(al9, bh8); + mid = (mid + Math.imul(ah9, bl8)) | 0; + hi = Math.imul(ah9, bh8); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; + w17 &= 0x3ffffff; + /* k = 18 */ + lo = Math.imul(al9, bl9); + mid = Math.imul(al9, bh9); + mid = (mid + Math.imul(ah9, bl9)) | 0; + hi = Math.imul(ah9, bh9); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; + w18 &= 0x3ffffff; + o[0] = w0; + o[1] = w1; + o[2] = w2; + o[3] = w3; + o[4] = w4; + o[5] = w5; + o[6] = w6; + o[7] = w7; + o[8] = w8; + o[9] = w9; + o[10] = w10; + o[11] = w11; + o[12] = w12; + o[13] = w13; + o[14] = w14; + o[15] = w15; + o[16] = w16; + o[17] = w17; + o[18] = w18; + if (c !== 0) { + o[19] = c; + out.length++; + } + return out; + }; - if ( !n.c ) return n.toString(); - c0 = n.c[0]; - ne = n.e; + // Polyfill comb + if (!Math.imul) { + comb10MulTo = smallMulTo; + } - if ( i == null ) { - str = coeffToString( n.c ); - str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG - ? toExponential( str, ne ) - : toFixedPoint( str, ne ); - } else { - n = round( new BigNumber(n), i, rm ); + function bigMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + out.length = self.length + num.length; - // n.e may have changed if the value was rounded up. - e = n.e; + var carry = 0; + var hncarry = 0; + for (var k = 0; k < out.length - 1; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = hncarry; + hncarry = 0; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = k - j; + var a = self.words[i] | 0; + var b = num.words[j] | 0; + var r = a * b; - str = coeffToString( n.c ); - len = str.length; + var lo = r & 0x3ffffff; + ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; + lo = (lo + rword) | 0; + rword = lo & 0x3ffffff; + ncarry = (ncarry + (lo >>> 26)) | 0; - // toPrecision returns exponential notation if the number of significant digits - // specified is less than the number of digits necessary to represent the integer - // part of the value in fixed-point notation. + hncarry += ncarry >>> 26; + ncarry &= 0x3ffffff; + } + out.words[k] = rword; + carry = ncarry; + ncarry = hncarry; + } + if (carry !== 0) { + out.words[k] = carry; + } else { + out.length--; + } - // Exponential notation. - if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) { + return out.strip(); + } - // Append zeros? - for ( ; len < i; str += '0', len++ ); - str = toExponential( str, e ); + function jumboMulTo (self, num, out) { + var fftm = new FFTM(); + return fftm.mulp(self, num, out); + } - // Fixed-point notation. - } else { - i -= ne; - str = toFixedPoint( str, e ); + BN.prototype.mulTo = function mulTo (num, out) { + var res; + var len = this.length + num.length; + if (this.length === 10 && num.length === 10) { + res = comb10MulTo(this, num, out); + } else if (len < 63) { + res = smallMulTo(this, num, out); + } else if (len < 1024) { + res = bigMulTo(this, num, out); + } else { + res = jumboMulTo(this, num, out); + } - // Append zeros? - if ( e + 1 > len ) { - if ( --i > 0 ) for ( str += '.'; i--; str += '0' ); - } else { - i += e - len; - if ( i > 0 ) { - if ( e + 1 == len ) str += '.'; - for ( ; i--; str += '0' ); - } - } - } - } + return res; + }; - return n.s < 0 && c0 ? '-' + str : str; - } + // Cooley-Tukey algorithm for FFT + // slightly revisited to rely on looping instead of recursion + function FFTM (x, y) { + this.x = x; + this.y = y; + } - // Handle BigNumber.max and BigNumber.min. - function maxOrMin( args, method ) { - var m, n, - i = 0; + FFTM.prototype.makeRBT = function makeRBT (N) { + var t = new Array(N); + var l = BN.prototype._countBits(N) - 1; + for (var i = 0; i < N; i++) { + t[i] = this.revBin(i, l, N); + } - if ( isArray( args[0] ) ) args = args[0]; - m = new BigNumber( args[0] ); + return t; + }; - for ( ; ++i < args.length; ) { - n = new BigNumber( args[i] ); + // Returns binary-reversed representation of `x` + FFTM.prototype.revBin = function revBin (x, l, N) { + if (x === 0 || x === N - 1) return x; - // If any number is NaN, return NaN. - if ( !n.s ) { - m = n; - break; - } else if ( method.call( m, n ) ) { - m = n; - } - } + var rb = 0; + for (var i = 0; i < l; i++) { + rb |= (x & 1) << (l - i - 1); + x >>= 1; + } - return m; - } + return rb; + }; + // Performs "tweedling" phase, therefore 'emulating' + // behaviour of the recursive algorithm + FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { + for (var i = 0; i < N; i++) { + rtws[i] = rws[rbt[i]]; + itws[i] = iws[rbt[i]]; + } + }; - /* - * Return true if n is an integer in range, otherwise throw. - * Use for argument validation when ERRORS is true. - */ - function intValidatorWithErrors( n, min, max, caller, name ) { - if ( n < min || n > max || n != truncate(n) ) { - raise( caller, ( name || 'decimal places' ) + - ( n < min || n > max ? ' out of range' : ' not an integer' ), n ); - } + FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { + this.permute(rbt, rws, iws, rtws, itws, N); - return true; - } + for (var s = 1; s < N; s <<= 1) { + var l = s << 1; + var rtwdf = Math.cos(2 * Math.PI / l); + var itwdf = Math.sin(2 * Math.PI / l); - /* - * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. - * Called by minus, plus and times. - */ - function normalise( n, c, e ) { - var i = 1, - j = c.length; + for (var p = 0; p < N; p += l) { + var rtwdf_ = rtwdf; + var itwdf_ = itwdf; - // Remove trailing zeros. - for ( ; !c[--j]; c.pop() ); + for (var j = 0; j < s; j++) { + var re = rtws[p + j]; + var ie = itws[p + j]; - // Calculate the base 10 exponent. First get the number of digits of c[0]. - for ( j = c[0]; j >= 10; j /= 10, i++ ); + var ro = rtws[p + j + s]; + var io = itws[p + j + s]; - // Overflow? - if ( ( e = i + e * LOG_BASE - 1 ) > MAX_EXP ) { + var rx = rtwdf_ * ro - itwdf_ * io; - // Infinity. - n.c = n.e = null; + io = rtwdf_ * io + itwdf_ * ro; + ro = rx; - // Underflow? - } else if ( e < MIN_EXP ) { + rtws[p + j] = re + ro; + itws[p + j] = ie + io; - // Zero. - n.c = [ n.e = 0 ]; - } else { - n.e = e; - n.c = c; - } + rtws[p + j + s] = re - ro; + itws[p + j + s] = ie - io; - return n; - } + /* jshint maxdepth : false */ + if (j !== l) { + rx = rtwdf * rtwdf_ - itwdf * itwdf_; + itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; + rtwdf_ = rx; + } + } + } + } + }; - // Handle values that fail the validity test in BigNumber. - parseNumeric = (function () { - var basePrefix = /^(-?)0([xbo])/i, - dotAfter = /^([^.]+)\.$/, - dotBefore = /^\.([^.]+)$/, - isInfinityOrNaN = /^-?(Infinity|NaN)$/, - whitespaceOrPlus = /^\s*\+|^\s+|\s+$/g; + FFTM.prototype.guessLen13b = function guessLen13b (n, m) { + var N = Math.max(m, n) | 1; + var odd = N & 1; + var i = 0; + for (N = N / 2 | 0; N; N = N >>> 1) { + i++; + } - return function ( x, str, num, b ) { - var base, - s = num ? str : str.replace( whitespaceOrPlus, '' ); + return 1 << i + 1 + odd; + }; - // No exception on ±Infinity or NaN. - if ( isInfinityOrNaN.test(s) ) { - x.s = isNaN(s) ? null : s < 0 ? -1 : 1; - } else { - if ( !num ) { + FFTM.prototype.conjugate = function conjugate (rws, iws, N) { + if (N <= 1) return; - // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i - s = s.replace( basePrefix, function ( m, p1, p2 ) { - base = ( p2 = p2.toLowerCase() ) == 'x' ? 16 : p2 == 'b' ? 2 : 8; - return !b || b == base ? p1 : m; - }); + for (var i = 0; i < N / 2; i++) { + var t = rws[i]; - if (b) { - base = b; + rws[i] = rws[N - i - 1]; + rws[N - i - 1] = t; - // E.g. '1.' to '1', '.1' to '0.1' - s = s.replace( dotAfter, '$1' ).replace( dotBefore, '0.$1' ); - } + t = iws[i]; - if ( str != s ) return new BigNumber( s, base ); - } + iws[i] = -iws[N - i - 1]; + iws[N - i - 1] = -t; + } + }; - // 'new BigNumber() not a number: {n}' - // 'new BigNumber() not a base {b} number: {n}' - if (ERRORS) raise( id, 'not a' + ( b ? ' base ' + b : '' ) + ' number', str ); - x.s = null; - } + FFTM.prototype.normalize13b = function normalize13b (ws, N) { + var carry = 0; + for (var i = 0; i < N / 2; i++) { + var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + + Math.round(ws[2 * i] / N) + + carry; - x.c = x.e = null; - id = 0; - } - })(); + ws[i] = w & 0x3ffffff; + if (w < 0x4000000) { + carry = 0; + } else { + carry = w / 0x4000000 | 0; + } + } - // Throw a BigNumber Error. - function raise( caller, msg, val ) { - var error = new Error( [ - 'new BigNumber', // 0 - 'cmp', // 1 - 'config', // 2 - 'div', // 3 - 'divToInt', // 4 - 'eq', // 5 - 'gt', // 6 - 'gte', // 7 - 'lt', // 8 - 'lte', // 9 - 'minus', // 10 - 'mod', // 11 - 'plus', // 12 - 'precision', // 13 - 'random', // 14 - 'round', // 15 - 'shift', // 16 - 'times', // 17 - 'toDigits', // 18 - 'toExponential', // 19 - 'toFixed', // 20 - 'toFormat', // 21 - 'toFraction', // 22 - 'pow', // 23 - 'toPrecision', // 24 - 'toString', // 25 - 'BigNumber' // 26 - ][caller] + '() ' + msg + ': ' + val ); + return ws; + }; - error.name = 'BigNumber Error'; - id = 0; - throw error; - } + FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { + var carry = 0; + for (var i = 0; i < len; i++) { + carry = carry + (ws[i] | 0); + rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; + rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; + } - /* - * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. - * If r is truthy, it is known that there are more digits after the rounding digit. - */ - function round( x, sd, rm, r ) { - var d, i, j, k, n, ni, rd, - xc = x.c, - pows10 = POWS_TEN; + // Pad with zeroes + for (i = 2 * len; i < N; ++i) { + rws[i] = 0; + } - // if x is not Infinity or NaN... - if (xc) { + assert(carry === 0); + assert((carry & ~0x1fff) === 0); + }; - // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. - // n is a base 1e14 number, the value of the element of array x.c containing rd. - // ni is the index of n within x.c. - // d is the number of digits of n. - // i is the index of rd within n including leading zeros. - // j is the actual index of rd within n (if < 0, rd is a leading zero). - out: { + FFTM.prototype.stub = function stub (N) { + var ph = new Array(N); + for (var i = 0; i < N; i++) { + ph[i] = 0; + } - // Get the number of digits of the first element of xc. - for ( d = 1, k = xc[0]; k >= 10; k /= 10, d++ ); - i = sd - d; + return ph; + }; - // If the rounding digit is in the first element of xc... - if ( i < 0 ) { - i += LOG_BASE; - j = sd; - n = xc[ ni = 0 ]; + FFTM.prototype.mulp = function mulp (x, y, out) { + var N = 2 * this.guessLen13b(x.length, y.length); - // Get the rounding digit at index j of n. - rd = n / pows10[ d - j - 1 ] % 10 | 0; - } else { - ni = mathceil( ( i + 1 ) / LOG_BASE ); + var rbt = this.makeRBT(N); - if ( ni >= xc.length ) { + var _ = this.stub(N); - if (r) { + var rws = new Array(N); + var rwst = new Array(N); + var iwst = new Array(N); - // Needed by sqrt. - for ( ; xc.length <= ni; xc.push(0) ); - n = rd = 0; - d = 1; - i %= LOG_BASE; - j = i - LOG_BASE + 1; - } else { - break out; - } - } else { - n = k = xc[ni]; + var nrws = new Array(N); + var nrwst = new Array(N); + var niwst = new Array(N); - // Get the number of digits of n. - for ( d = 1; k >= 10; k /= 10, d++ ); + var rmws = out.words; + rmws.length = N; - // Get the index of rd within n. - i %= LOG_BASE; + this.convert13b(x.words, x.length, rws, N); + this.convert13b(y.words, y.length, nrws, N); - // Get the index of rd within n, adjusted for leading zeros. - // The number of leading zeros of n is given by LOG_BASE - d. - j = i - LOG_BASE + d; + this.transform(rws, _, rwst, iwst, N, rbt); + this.transform(nrws, _, nrwst, niwst, N, rbt); - // Get the rounding digit at index j of n. - rd = j < 0 ? 0 : n / pows10[ d - j - 1 ] % 10 | 0; - } - } + for (var i = 0; i < N; i++) { + var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; + iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; + rwst[i] = rx; + } - r = r || sd < 0 || + this.conjugate(rwst, iwst, N); + this.transform(rwst, iwst, rmws, _, N, rbt); + this.conjugate(rmws, _, N); + this.normalize13b(rmws, N); - // Are there any non-zero digits after the rounding digit? - // The expression n % pows10[ d - j - 1 ] returns all digits of n to the right - // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. - xc[ni + 1] != null || ( j < 0 ? n : n % pows10[ d - j - 1 ] ); + out.negative = x.negative ^ y.negative; + out.length = x.length + y.length; + return out.strip(); + }; - r = rm < 4 - ? ( rd || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) ) - : rd > 5 || rd == 5 && ( rm == 4 || r || rm == 6 && + // Multiply `this` by `num` + BN.prototype.mul = function mul (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return this.mulTo(num, out); + }; - // Check whether the digit to the left of the rounding digit is odd. - ( ( i > 0 ? j > 0 ? n / pows10[ d - j ] : 0 : xc[ni - 1] ) % 10 ) & 1 || - rm == ( x.s < 0 ? 8 : 7 ) ); + // Multiply employing FFT + BN.prototype.mulf = function mulf (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return jumboMulTo(this, num, out); + }; - if ( sd < 1 || !xc[0] ) { - xc.length = 0; + // In-place Multiplication + BN.prototype.imul = function imul (num) { + return this.clone().mulTo(num, this); + }; - if (r) { + BN.prototype.imuln = function imuln (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); - // Convert sd to decimal places. - sd -= x.e + 1; + // Carry + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = (this.words[i] | 0) * num; + var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); + carry >>= 26; + carry += (w / 0x4000000) | 0; + // NOTE: lo is 27bit maximum + carry += lo >>> 26; + this.words[i] = lo & 0x3ffffff; + } - // 1, 0.1, 0.01, 0.001, 0.0001 etc. - xc[0] = pows10[ sd % LOG_BASE ]; - x.e = -sd || 0; - } else { + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } - // Zero. - xc[0] = x.e = 0; - } + return this; + }; - return x; - } + BN.prototype.muln = function muln (num) { + return this.clone().imuln(num); + }; - // Remove excess digits. - if ( i == 0 ) { - xc.length = ni; - k = 1; - ni--; - } else { - xc.length = ni + 1; - k = pows10[ LOG_BASE - i ]; + // `this` * `this` + BN.prototype.sqr = function sqr () { + return this.mul(this); + }; - // E.g. 56700 becomes 56000 if 7 is the rounding digit. - // j > 0 means i > number of leading zeros of n. - xc[ni] = j > 0 ? mathfloor( n / pows10[ d - j ] % pows10[j] ) * k : 0; - } + // `this` * `this` in-place + BN.prototype.isqr = function isqr () { + return this.imul(this.clone()); + }; - // Round up? - if (r) { + // Math.pow(`this`, `num`) + BN.prototype.pow = function pow (num) { + var w = toBitArray(num); + if (w.length === 0) return new BN(1); - for ( ; ; ) { + // Skip leading zeroes + var res = this; + for (var i = 0; i < w.length; i++, res = res.sqr()) { + if (w[i] !== 0) break; + } - // If the digit to be rounded up is in the first element of xc... - if ( ni == 0 ) { - - // i will be the length of xc[0] before k is added. - for ( i = 1, j = xc[0]; j >= 10; j /= 10, i++ ); - j = xc[0] += k; - for ( k = 1; j >= 10; j /= 10, k++ ); + if (++i < w.length) { + for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { + if (w[i] === 0) continue; - // if i != k the length has increased. - if ( i != k ) { - x.e++; - if ( xc[0] == BASE ) xc[0] = 1; - } + res = res.mul(q); + } + } - break; - } else { - xc[ni] += k; - if ( xc[ni] != BASE ) break; - xc[ni--] = 0; - k = 1; - } - } - } + return res; + }; - // Remove trailing zeros. - for ( i = xc.length; xc[--i] === 0; xc.pop() ); - } + // Shift-left in-place + BN.prototype.iushln = function iushln (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); + var i; - // Overflow? Infinity. - if ( x.e > MAX_EXP ) { - x.c = x.e = null; + if (r !== 0) { + var carry = 0; - // Underflow? Zero. - } else if ( x.e < MIN_EXP ) { - x.c = [ x.e = 0 ]; - } - } + for (i = 0; i < this.length; i++) { + var newCarry = this.words[i] & carryMask; + var c = ((this.words[i] | 0) - newCarry) << r; + this.words[i] = c | carry; + carry = newCarry >>> (26 - r); + } - return x; - } + if (carry) { + this.words[i] = carry; + this.length++; + } + } + if (s !== 0) { + for (i = this.length - 1; i >= 0; i--) { + this.words[i + s] = this.words[i]; + } - // PROTOTYPE/INSTANCE METHODS + for (i = 0; i < s; i++) { + this.words[i] = 0; + } + this.length += s; + } - /* - * Return a new BigNumber whose value is the absolute value of this BigNumber. - */ - P.absoluteValue = P.abs = function () { - var x = new BigNumber(this); - if ( x.s < 0 ) x.s = 1; - return x; - }; + return this.strip(); + }; + BN.prototype.ishln = function ishln (bits) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushln(bits); + }; - /* - * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole - * number in the direction of Infinity. - */ - P.ceil = function () { - return round( new BigNumber(this), this.e + 1, 2 ); - }; + // Shift-right in-place + // NOTE: `hint` is a lowest bit before trailing zeroes + // NOTE: if `extended` is present - it will be filled with destroyed bits + BN.prototype.iushrn = function iushrn (bits, hint, extended) { + assert(typeof bits === 'number' && bits >= 0); + var h; + if (hint) { + h = (hint - (hint % 26)) / 26; + } else { + h = 0; + } + var r = bits % 26; + var s = Math.min((bits - r) / 26, this.length); + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + var maskedWords = extended; - /* - * Return - * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), - * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), - * 0 if they have the same value, - * or null if the value of either is NaN. - */ - P.comparedTo = P.cmp = function ( y, b ) { - id = 1; - return compare( this, new BigNumber( y, b ) ); - }; + h -= s; + h = Math.max(0, h); + // Extended mode, copy masked part + if (maskedWords) { + for (var i = 0; i < s; i++) { + maskedWords.words[i] = this.words[i]; + } + maskedWords.length = s; + } - /* - * Return the number of decimal places of the value of this BigNumber, or null if the value - * of this BigNumber is ±Infinity or NaN. - */ - P.decimalPlaces = P.dp = function () { - var n, v, - c = this.c; + if (s === 0) { + // No-op, we should not move anything at all + } else if (this.length > s) { + this.length -= s; + for (i = 0; i < this.length; i++) { + this.words[i] = this.words[i + s]; + } + } else { + this.words[0] = 0; + this.length = 1; + } - if ( !c ) return null; - n = ( ( v = c.length - 1 ) - bitFloor( this.e / LOG_BASE ) ) * LOG_BASE; + var carry = 0; + for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { + var word = this.words[i] | 0; + this.words[i] = (carry << (26 - r)) | (word >>> r); + carry = word & mask; + } - // Subtract the number of trailing zeros of the last number. - if ( v = c[v] ) for ( ; v % 10 == 0; v /= 10, n-- ); - if ( n < 0 ) n = 0; + // Push carried bits as a mask + if (maskedWords && carry !== 0) { + maskedWords.words[maskedWords.length++] = carry; + } - return n; - }; + if (this.length === 0) { + this.words[0] = 0; + this.length = 1; + } + return this.strip(); + }; - /* - * n / 0 = I - * n / N = N - * n / I = 0 - * 0 / n = 0 - * 0 / 0 = N - * 0 / N = N - * 0 / I = 0 - * N / n = N - * N / 0 = N - * N / N = N - * N / I = N - * I / n = I - * I / 0 = I - * I / N = N - * I / I = N - * - * Return a new BigNumber whose value is the value of this BigNumber divided by the value of - * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. - */ - P.dividedBy = P.div = function ( y, b ) { - id = 3; - return div( this, new BigNumber( y, b ), DECIMAL_PLACES, ROUNDING_MODE ); - }; + BN.prototype.ishrn = function ishrn (bits, hint, extended) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushrn(bits, hint, extended); + }; + // Shift-left + BN.prototype.shln = function shln (bits) { + return this.clone().ishln(bits); + }; - /* - * Return a new BigNumber whose value is the integer part of dividing the value of this - * BigNumber by the value of BigNumber(y, b). - */ - P.dividedToIntegerBy = P.divToInt = function ( y, b ) { - id = 4; - return div( this, new BigNumber( y, b ), 0, 1 ); - }; + BN.prototype.ushln = function ushln (bits) { + return this.clone().iushln(bits); + }; + // Shift-right + BN.prototype.shrn = function shrn (bits) { + return this.clone().ishrn(bits); + }; - /* - * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), - * otherwise returns false. - */ - P.equals = P.eq = function ( y, b ) { - id = 5; - return compare( this, new BigNumber( y, b ) ) === 0; - }; + BN.prototype.ushrn = function ushrn (bits) { + return this.clone().iushrn(bits); + }; + // Test if n bit is set + BN.prototype.testn = function testn (bit) { + assert(typeof bit === 'number' && bit >= 0); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; - /* - * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole - * number in the direction of -Infinity. - */ - P.floor = function () { - return round( new BigNumber(this), this.e + 1, 3 ); - }; + // Fast case: bit is much higher than all existing words + if (this.length <= s) return false; + // Check bit and return + var w = this.words[s]; - /* - * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), - * otherwise returns false. - */ - P.greaterThan = P.gt = function ( y, b ) { - id = 6; - return compare( this, new BigNumber( y, b ) ) > 0; - }; + return !!(w & q); + }; + // Return only lowers bits of number (in-place) + BN.prototype.imaskn = function imaskn (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; - /* - * Return true if the value of this BigNumber is greater than or equal to the value of - * BigNumber(y, b), otherwise returns false. - */ - P.greaterThanOrEqualTo = P.gte = function ( y, b ) { - id = 7; - return ( b = compare( this, new BigNumber( y, b ) ) ) === 1 || b === 0; + assert(this.negative === 0, 'imaskn works only with positive numbers'); - }; + if (this.length <= s) { + return this; + } + if (r !== 0) { + s++; + } + this.length = Math.min(s, this.length); - /* - * Return true if the value of this BigNumber is a finite number, otherwise returns false. - */ - P.isFinite = function () { - return !!this.c; - }; + if (r !== 0) { + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + this.words[this.length - 1] &= mask; + } + return this.strip(); + }; - /* - * Return true if the value of this BigNumber is an integer, otherwise return false. - */ - P.isInteger = P.isInt = function () { - return !!this.c && bitFloor( this.e / LOG_BASE ) > this.c.length - 2; - }; + // Return only lowers bits of number + BN.prototype.maskn = function maskn (bits) { + return this.clone().imaskn(bits); + }; + // Add plain number `num` to `this` + BN.prototype.iaddn = function iaddn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.isubn(-num); - /* - * Return true if the value of this BigNumber is NaN, otherwise returns false. - */ - P.isNaN = function () { - return !this.s; - }; + // Possible sign change + if (this.negative !== 0) { + if (this.length === 1 && (this.words[0] | 0) < num) { + this.words[0] = num - (this.words[0] | 0); + this.negative = 0; + return this; + } + this.negative = 0; + this.isubn(num); + this.negative = 1; + return this; + } - /* - * Return true if the value of this BigNumber is negative, otherwise returns false. - */ - P.isNegative = P.isNeg = function () { - return this.s < 0; - }; + // Add without checks + return this._iaddn(num); + }; + BN.prototype._iaddn = function _iaddn (num) { + this.words[0] += num; - /* - * Return true if the value of this BigNumber is 0 or -0, otherwise returns false. - */ - P.isZero = function () { - return !!this.c && this.c[0] == 0; - }; + // Carry + for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { + this.words[i] -= 0x4000000; + if (i === this.length - 1) { + this.words[i + 1] = 1; + } else { + this.words[i + 1]++; + } + } + this.length = Math.max(this.length, i + 1); + return this; + }; - /* - * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), - * otherwise returns false. - */ - P.lessThan = P.lt = function ( y, b ) { - id = 8; - return compare( this, new BigNumber( y, b ) ) < 0; - }; + // Subtract plain number `num` from `this` + BN.prototype.isubn = function isubn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.iaddn(-num); + if (this.negative !== 0) { + this.negative = 0; + this.iaddn(num); + this.negative = 1; + return this; + } - /* - * Return true if the value of this BigNumber is less than or equal to the value of - * BigNumber(y, b), otherwise returns false. - */ - P.lessThanOrEqualTo = P.lte = function ( y, b ) { - id = 9; - return ( b = compare( this, new BigNumber( y, b ) ) ) === -1 || b === 0; - }; + this.words[0] -= num; + if (this.length === 1 && this.words[0] < 0) { + this.words[0] = -this.words[0]; + this.negative = 1; + } else { + // Carry + for (var i = 0; i < this.length && this.words[i] < 0; i++) { + this.words[i] += 0x4000000; + this.words[i + 1] -= 1; + } + } - /* - * n - 0 = n - * n - N = N - * n - I = -I - * 0 - n = -n - * 0 - 0 = 0 - * 0 - N = N - * 0 - I = -I - * N - n = N - * N - 0 = N - * N - N = N - * N - I = N - * I - n = I - * I - 0 = I - * I - N = N - * I - I = N - * - * Return a new BigNumber whose value is the value of this BigNumber minus the value of - * BigNumber(y, b). - */ - P.minus = P.sub = function ( y, b ) { - var i, j, t, xLTy, - x = this, - a = x.s; + return this.strip(); + }; - id = 10; - y = new BigNumber( y, b ); - b = y.s; + BN.prototype.addn = function addn (num) { + return this.clone().iaddn(num); + }; - // Either NaN? - if ( !a || !b ) return new BigNumber(NaN); + BN.prototype.subn = function subn (num) { + return this.clone().isubn(num); + }; - // Signs differ? - if ( a != b ) { - y.s = -b; - return x.plus(y); - } + BN.prototype.iabs = function iabs () { + this.negative = 0; - var xe = x.e / LOG_BASE, - ye = y.e / LOG_BASE, - xc = x.c, - yc = y.c; + return this; + }; - if ( !xe || !ye ) { + BN.prototype.abs = function abs () { + return this.clone().iabs(); + }; - // Either Infinity? - if ( !xc || !yc ) return xc ? ( y.s = -b, y ) : new BigNumber( yc ? x : NaN ); + BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { + var len = num.length + shift; + var i; - // Either zero? - if ( !xc[0] || !yc[0] ) { + this._expand(len); - // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. - return yc[0] ? ( y.s = -b, y ) : new BigNumber( xc[0] ? x : + var w; + var carry = 0; + for (i = 0; i < num.length; i++) { + w = (this.words[i + shift] | 0) + carry; + var right = (num.words[i] | 0) * mul; + w -= right & 0x3ffffff; + carry = (w >> 26) - ((right / 0x4000000) | 0); + this.words[i + shift] = w & 0x3ffffff; + } + for (; i < this.length - shift; i++) { + w = (this.words[i + shift] | 0) + carry; + carry = w >> 26; + this.words[i + shift] = w & 0x3ffffff; + } - // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity - ROUNDING_MODE == 3 ? -0 : 0 ); - } - } + if (carry === 0) return this.strip(); - xe = bitFloor(xe); - ye = bitFloor(ye); - xc = xc.slice(); + // Subtraction overflow + assert(carry === -1); + carry = 0; + for (i = 0; i < this.length; i++) { + w = -(this.words[i] | 0) + carry; + carry = w >> 26; + this.words[i] = w & 0x3ffffff; + } + this.negative = 1; - // Determine which is the bigger number. - if ( a = xe - ye ) { + return this.strip(); + }; - if ( xLTy = a < 0 ) { - a = -a; - t = xc; - } else { - ye = xe; - t = yc; - } + BN.prototype._wordDiv = function _wordDiv (num, mode) { + var shift = this.length - num.length; - t.reverse(); + var a = this.clone(); + var b = num; - // Prepend zeros to equalise exponents. - for ( b = a; b--; t.push(0) ); - t.reverse(); - } else { + // Normalize + var bhi = b.words[b.length - 1] | 0; + var bhiBits = this._countBits(bhi); + shift = 26 - bhiBits; + if (shift !== 0) { + b = b.ushln(shift); + a.iushln(shift); + bhi = b.words[b.length - 1] | 0; + } - // Exponents equal. Check digit by digit. - j = ( xLTy = ( a = xc.length ) < ( b = yc.length ) ) ? a : b; + // Initialize quotient + var m = a.length - b.length; + var q; - for ( a = b = 0; b < j; b++ ) { + if (mode !== 'mod') { + q = new BN(null); + q.length = m + 1; + q.words = new Array(q.length); + for (var i = 0; i < q.length; i++) { + q.words[i] = 0; + } + } - if ( xc[b] != yc[b] ) { - xLTy = xc[b] < yc[b]; - break; - } - } - } + var diff = a.clone()._ishlnsubmul(b, 1, m); + if (diff.negative === 0) { + a = diff; + if (q) { + q.words[m] = 1; + } + } - // x < y? Point xc to the array of the bigger number. - if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s; + for (var j = m - 1; j >= 0; j--) { + var qj = (a.words[b.length + j] | 0) * 0x4000000 + + (a.words[b.length + j - 1] | 0); - b = ( j = yc.length ) - ( i = xc.length ); + // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max + // (0x7ffffff) + qj = Math.min((qj / bhi) | 0, 0x3ffffff); - // Append zeros to xc if shorter. - // No need to add zeros to yc if shorter as subtract only needs to start at yc.length. - if ( b > 0 ) for ( ; b--; xc[i++] = 0 ); - b = BASE - 1; + a._ishlnsubmul(b, qj, j); + while (a.negative !== 0) { + qj--; + a.negative = 0; + a._ishlnsubmul(b, 1, j); + if (!a.isZero()) { + a.negative ^= 1; + } + } + if (q) { + q.words[j] = qj; + } + } + if (q) { + q.strip(); + } + a.strip(); - // Subtract yc from xc. - for ( ; j > a; ) { + // Denormalize + if (mode !== 'div' && shift !== 0) { + a.iushrn(shift); + } - if ( xc[--j] < yc[j] ) { - for ( i = j; i && !xc[--i]; xc[i] = b ); - --xc[i]; - xc[j] += BASE; - } + return { + div: q || null, + mod: a + }; + }; - xc[j] -= yc[j]; - } + // NOTE: 1) `mode` can be set to `mod` to request mod only, + // to `div` to request div only, or be absent to + // request both div & mod + // 2) `positive` is true if unsigned mod is requested + BN.prototype.divmod = function divmod (num, mode, positive) { + assert(!num.isZero()); - // Remove leading zeros and adjust exponent accordingly. - for ( ; xc[0] == 0; xc.shift(), --ye ); + if (this.isZero()) { + return { + div: new BN(0), + mod: new BN(0) + }; + } - // Zero? - if ( !xc[0] ) { + var div, mod, res; + if (this.negative !== 0 && num.negative === 0) { + res = this.neg().divmod(num, mode); - // Following IEEE 754 (2008) 6.3, - // n - n = +0 but n - n = -0 when rounding towards -Infinity. - y.s = ROUNDING_MODE == 3 ? -1 : 1; - y.c = [ y.e = 0 ]; - return y; - } + if (mode !== 'mod') { + div = res.div.neg(); + } - // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity - // for finite x and y. - return normalise( y, xc, ye ); - }; + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.iadd(num); + } + } + return { + div: div, + mod: mod + }; + } - /* - * n % 0 = N - * n % N = N - * n % I = n - * 0 % n = 0 - * -0 % n = -0 - * 0 % 0 = N - * 0 % N = N - * 0 % I = 0 - * N % n = N - * N % 0 = N - * N % N = N - * N % I = N - * I % n = N - * I % 0 = N - * I % N = N - * I % I = N - * - * Return a new BigNumber whose value is the value of this BigNumber modulo the value of - * BigNumber(y, b). The result depends on the value of MODULO_MODE. - */ - P.modulo = P.mod = function ( y, b ) { - var q, s, - x = this; + if (this.negative === 0 && num.negative !== 0) { + res = this.divmod(num.neg(), mode); - id = 11; - y = new BigNumber( y, b ); + if (mode !== 'mod') { + div = res.div.neg(); + } - // Return NaN if x is Infinity or NaN, or y is NaN or zero. - if ( !x.c || !y.s || y.c && !y.c[0] ) { - return new BigNumber(NaN); + return { + div: div, + mod: res.mod + }; + } - // Return x if y is Infinity or x is zero. - } else if ( !y.c || x.c && !x.c[0] ) { - return new BigNumber(x); - } + if ((this.negative & num.negative) !== 0) { + res = this.neg().divmod(num.neg(), mode); - if ( MODULO_MODE == 9 ) { + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.isub(num); + } + } - // Euclidian division: q = sign(y) * floor(x / abs(y)) - // r = x - qy where 0 <= r < abs(y) - s = y.s; - y.s = 1; - q = div( x, y, 0, 3 ); - y.s = s; - q.s *= s; - } else { - q = div( x, y, 0, MODULO_MODE ); - } + return { + div: res.div, + mod: mod + }; + } - return x.minus( q.times(y) ); - }; + // Both numbers are positive at this point + // Strip both numbers to approximate shift value + if (num.length > this.length || this.cmp(num) < 0) { + return { + div: new BN(0), + mod: this + }; + } - /* - * Return a new BigNumber whose value is the value of this BigNumber negated, - * i.e. multiplied by -1. - */ - P.negated = P.neg = function () { - var x = new BigNumber(this); - x.s = -x.s || null; - return x; + // Very short reduction + if (num.length === 1) { + if (mode === 'div') { + return { + div: this.divn(num.words[0]), + mod: null }; + } + if (mode === 'mod') { + return { + div: null, + mod: new BN(this.modn(num.words[0])) + }; + } - /* - * n + 0 = n - * n + N = N - * n + I = I - * 0 + n = n - * 0 + 0 = 0 - * 0 + N = N - * 0 + I = I - * N + n = N - * N + 0 = N - * N + N = N - * N + I = N - * I + n = I - * I + 0 = I - * I + N = N - * I + I = I - * - * Return a new BigNumber whose value is the value of this BigNumber plus the value of - * BigNumber(y, b). - */ - P.plus = P.add = function ( y, b ) { - var t, - x = this, - a = x.s; + return { + div: this.divn(num.words[0]), + mod: new BN(this.modn(num.words[0])) + }; + } - id = 12; - y = new BigNumber( y, b ); - b = y.s; + return this._wordDiv(num, mode); + }; - // Either NaN? - if ( !a || !b ) return new BigNumber(NaN); + // Find `this` / `num` + BN.prototype.div = function div (num) { + return this.divmod(num, 'div', false).div; + }; - // Signs differ? - if ( a != b ) { - y.s = -b; - return x.minus(y); - } + // Find `this` % `num` + BN.prototype.mod = function mod (num) { + return this.divmod(num, 'mod', false).mod; + }; - var xe = x.e / LOG_BASE, - ye = y.e / LOG_BASE, - xc = x.c, - yc = y.c; + BN.prototype.umod = function umod (num) { + return this.divmod(num, 'mod', true).mod; + }; - if ( !xe || !ye ) { + // Find Round(`this` / `num`) + BN.prototype.divRound = function divRound (num) { + var dm = this.divmod(num); - // Return ±Infinity if either ±Infinity. - if ( !xc || !yc ) return new BigNumber( a / 0 ); + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; - // Either zero? - // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. - if ( !xc[0] || !yc[0] ) return yc[0] ? y : new BigNumber( xc[0] ? x : a * 0 ); - } + var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; - xe = bitFloor(xe); - ye = bitFloor(ye); - xc = xc.slice(); + var half = num.ushrn(1); + var r2 = num.andln(1); + var cmp = mod.cmp(half); - // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. - if ( a = xe - ye ) { - if ( a > 0 ) { - ye = xe; - t = yc; - } else { - a = -a; - t = xc; - } + // Round down + if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; - t.reverse(); - for ( ; a--; t.push(0) ); - t.reverse(); - } + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); + }; - a = xc.length; - b = yc.length; + BN.prototype.modn = function modn (num) { + assert(num <= 0x3ffffff); + var p = (1 << 26) % num; - // Point xc to the longer array, and b to the shorter length. - if ( a - b < 0 ) t = yc, yc = xc, xc = t, b = a; + var acc = 0; + for (var i = this.length - 1; i >= 0; i--) { + acc = (p * acc + (this.words[i] | 0)) % num; + } - // Only start adding at yc.length - 1 as the further digits of xc can be ignored. - for ( a = 0; b; ) { - a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0; - xc[b] %= BASE; - } + return acc; + }; - if (a) { - xc.unshift(a); - ++ye; - } + // In-place division by number + BN.prototype.idivn = function idivn (num) { + assert(num <= 0x3ffffff); - // No need to check for zero, as +x + +y != 0 && -x + -y != 0 - // ye = MAX_EXP + 1 possible - return normalise( y, xc, ye ); - }; + var carry = 0; + for (var i = this.length - 1; i >= 0; i--) { + var w = (this.words[i] | 0) + carry * 0x4000000; + this.words[i] = (w / num) | 0; + carry = w % num; + } + return this.strip(); + }; - /* - * Return the number of significant digits of the value of this BigNumber. - * - * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0. - */ - P.precision = P.sd = function (z) { - var n, v, - x = this, - c = x.c; + BN.prototype.divn = function divn (num) { + return this.clone().idivn(num); + }; - // 'precision() argument not a boolean or binary digit: {z}' - if ( z != null && z !== !!z && z !== 1 && z !== 0 ) { - if (ERRORS) raise( 13, 'argument' + notBool, z ); - if ( z != !!z ) z = null; - } + BN.prototype.egcd = function egcd (p) { + assert(p.negative === 0); + assert(!p.isZero()); - if ( !c ) return null; - v = c.length - 1; - n = v * LOG_BASE + 1; + var x = this; + var y = p.clone(); - if ( v = c[v] ) { + if (x.negative !== 0) { + x = x.umod(p); + } else { + x = x.clone(); + } - // Subtract the number of trailing zeros of the last element. - for ( ; v % 10 == 0; v /= 10, n-- ); + // A * x + B * y = x + var A = new BN(1); + var B = new BN(0); - // Add the number of digits of the first element. - for ( v = c[0]; v >= 10; v /= 10, n++ ); - } + // C * x + D * y = y + var C = new BN(0); + var D = new BN(1); - if ( z && x.e + 1 > n ) n = x.e + 1; + var g = 0; - return n; - }; + while (x.isEven() && y.isEven()) { + x.iushrn(1); + y.iushrn(1); + ++g; + } + var yp = y.clone(); + var xp = x.clone(); - /* - * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of - * dp decimal places using rounding mode rm, or to 0 and ROUNDING_MODE respectively if - * omitted. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * 'round() decimal places out of range: {dp}' - * 'round() decimal places not an integer: {dp}' - * 'round() rounding mode not an integer: {rm}' - * 'round() rounding mode out of range: {rm}' - */ - P.round = function ( dp, rm ) { - var n = new BigNumber(this); + while (!x.isZero()) { + for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + x.iushrn(i); + while (i-- > 0) { + if (A.isOdd() || B.isOdd()) { + A.iadd(yp); + B.isub(xp); + } - if ( dp == null || isValidInt( dp, 0, MAX, 15 ) ) { - round( n, ~~dp + this.e + 1, rm == null || - !isValidInt( rm, 0, 8, 15, roundingMode ) ? ROUNDING_MODE : rm | 0 ); - } + A.iushrn(1); + B.iushrn(1); + } + } - return n; - }; + for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + y.iushrn(j); + while (j-- > 0) { + if (C.isOdd() || D.isOdd()) { + C.iadd(yp); + D.isub(xp); + } + C.iushrn(1); + D.iushrn(1); + } + } - /* - * Return a new BigNumber whose value is the value of this BigNumber shifted by k places - * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. - * - * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. - * - * If k is out of range and ERRORS is false, the result will be ±0 if k < 0, or ±Infinity - * otherwise. - * - * 'shift() argument not an integer: {k}' - * 'shift() argument out of range: {k}' - */ - P.shift = function (k) { - var n = this; - return isValidInt( k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 16, 'argument' ) + if (x.cmp(y) >= 0) { + x.isub(y); + A.isub(C); + B.isub(D); + } else { + y.isub(x); + C.isub(A); + D.isub(B); + } + } - // k < 1e+21, or truncate(k) will produce exponential notation. - ? n.times( '1e' + truncate(k) ) - : new BigNumber( n.c && n.c[0] && ( k < -MAX_SAFE_INTEGER || k > MAX_SAFE_INTEGER ) - ? n.s * ( k < 0 ? 0 : 1 / 0 ) - : n ); - }; + return { + a: C, + b: D, + gcd: y.iushln(g) + }; + }; + // This is reduced incarnation of the binary EEA + // above, designated to invert members of the + // _prime_ fields F(p) at a maximal speed + BN.prototype._invmp = function _invmp (p) { + assert(p.negative === 0); + assert(!p.isZero()); - /* - * sqrt(-n) = N - * sqrt( N) = N - * sqrt(-I) = N - * sqrt( I) = I - * sqrt( 0) = 0 - * sqrt(-0) = -0 - * - * Return a new BigNumber whose value is the square root of the value of this BigNumber, - * rounded according to DECIMAL_PLACES and ROUNDING_MODE. - */ - P.squareRoot = P.sqrt = function () { - var m, n, r, rep, t, - x = this, - c = x.c, - s = x.s, - e = x.e, - dp = DECIMAL_PLACES + 4, - half = new BigNumber('0.5'); + var a = this; + var b = p.clone(); - // Negative/NaN/Infinity/zero? - if ( s !== 1 || !c || !c[0] ) { - return new BigNumber( !s || s < 0 && ( !c || c[0] ) ? NaN : c ? x : 1 / 0 ); - } - - // Initial estimate. - s = Math.sqrt( +x ); + if (a.negative !== 0) { + a = a.umod(p); + } else { + a = a.clone(); + } - // Math.sqrt underflow/overflow? - // Pass x to Math.sqrt as integer, then adjust the exponent of the result. - if ( s == 0 || s == 1 / 0 ) { - n = coeffToString(c); - if ( ( n.length + e ) % 2 == 0 ) n += '0'; - s = Math.sqrt(n); - e = bitFloor( ( e + 1 ) / 2 ) - ( e < 0 || e % 2 ); + var x1 = new BN(1); + var x2 = new BN(0); - if ( s == 1 / 0 ) { - n = '1e' + e; - } else { - n = s.toExponential(); - n = n.slice( 0, n.indexOf('e') + 1 ) + e; - } + var delta = b.clone(); - r = new BigNumber(n); - } else { - r = new BigNumber( s + '' ); - } + while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { + for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + a.iushrn(i); + while (i-- > 0) { + if (x1.isOdd()) { + x1.iadd(delta); + } - // Check for zero. - // r could be zero if MIN_EXP is changed after the this value was created. - // This would cause a division by zero (x/t) and hence Infinity below, which would cause - // coeffToString to throw. - if ( r.c[0] ) { - e = r.e; - s = e + dp; - if ( s < 3 ) s = 0; + x1.iushrn(1); + } + } - // Newton-Raphson iteration. - for ( ; ; ) { - t = r; - r = half.times( t.plus( div( x, t, dp, 1 ) ) ); + for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + b.iushrn(j); + while (j-- > 0) { + if (x2.isOdd()) { + x2.iadd(delta); + } - if ( coeffToString( t.c ).slice( 0, s ) === ( n = - coeffToString( r.c ) ).slice( 0, s ) ) { + x2.iushrn(1); + } + } - // The exponent of r may here be one less than the final result exponent, - // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits - // are indexed correctly. - if ( r.e < e ) --s; - n = n.slice( s - 3, s + 1 ); + if (a.cmp(b) >= 0) { + a.isub(b); + x1.isub(x2); + } else { + b.isub(a); + x2.isub(x1); + } + } - // The 4th rounding digit may be in error by -1 so if the 4 rounding digits - // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the - // iteration. - if ( n == '9999' || !rep && n == '4999' ) { + var res; + if (a.cmpn(1) === 0) { + res = x1; + } else { + res = x2; + } - // On the first iteration only, check to see if rounding up gives the - // exact result as the nines may infinitely repeat. - if ( !rep ) { - round( t, t.e + DECIMAL_PLACES + 2, 0 ); + if (res.cmpn(0) < 0) { + res.iadd(p); + } - if ( t.times(t).eq(x) ) { - r = t; - break; - } - } + return res; + }; - dp += 4; - s += 4; - rep = 1; - } else { + BN.prototype.gcd = function gcd (num) { + if (this.isZero()) return num.abs(); + if (num.isZero()) return this.abs(); - // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact - // result. If not, then there are further digits and m will be truthy. - if ( !+n || !+n.slice(1) && n.charAt(0) == '5' ) { + var a = this.clone(); + var b = num.clone(); + a.negative = 0; + b.negative = 0; - // Truncate to the first rounding digit. - round( r, r.e + DECIMAL_PLACES + 2, 1 ); - m = !r.times(r).eq(x); - } + // Remove common factor of two + for (var shift = 0; a.isEven() && b.isEven(); shift++) { + a.iushrn(1); + b.iushrn(1); + } - break; - } - } - } - } + do { + while (a.isEven()) { + a.iushrn(1); + } + while (b.isEven()) { + b.iushrn(1); + } - return round( r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m ); - }; + var r = a.cmp(b); + if (r < 0) { + // Swap `a` and `b` to make `a` always bigger than `b` + var t = a; + a = b; + b = t; + } else if (r === 0 || b.cmpn(1) === 0) { + break; + } + a.isub(b); + } while (true); - /* - * n * 0 = 0 - * n * N = N - * n * I = I - * 0 * n = 0 - * 0 * 0 = 0 - * 0 * N = N - * 0 * I = N - * N * n = N - * N * 0 = N - * N * N = N - * N * I = N - * I * n = I - * I * 0 = N - * I * N = N - * I * I = I - * - * Return a new BigNumber whose value is the value of this BigNumber times the value of - * BigNumber(y, b). - */ - P.times = P.mul = function ( y, b ) { - var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, - base, sqrtBase, - x = this, - xc = x.c, - yc = ( id = 17, y = new BigNumber( y, b ) ).c; + return b.iushln(shift); + }; - // Either NaN, ±Infinity or ±0? - if ( !xc || !yc || !xc[0] || !yc[0] ) { + // Invert number in the field F(num) + BN.prototype.invm = function invm (num) { + return this.egcd(num).a.umod(num); + }; - // Return NaN if either is NaN, or one is 0 and the other is Infinity. - if ( !x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc ) { - y.c = y.e = y.s = null; - } else { - y.s *= x.s; + BN.prototype.isEven = function isEven () { + return (this.words[0] & 1) === 0; + }; - // Return ±Infinity if either is ±Infinity. - if ( !xc || !yc ) { - y.c = y.e = null; + BN.prototype.isOdd = function isOdd () { + return (this.words[0] & 1) === 1; + }; - // Return ±0 if either is ±0. - } else { - y.c = [0]; - y.e = 0; - } - } + // And first word and num + BN.prototype.andln = function andln (num) { + return this.words[0] & num; + }; - return y; - } + // Increment at the bit position in-line + BN.prototype.bincn = function bincn (bit) { + assert(typeof bit === 'number'); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; - e = bitFloor( x.e / LOG_BASE ) + bitFloor( y.e / LOG_BASE ); - y.s *= x.s; - xcL = xc.length; - ycL = yc.length; + // Fast case: bit is much higher than all existing words + if (this.length <= s) { + this._expand(s + 1); + this.words[s] |= q; + return this; + } - // Ensure xc points to longer array and xcL to its length. - if ( xcL < ycL ) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i; + // Add bit and propagate, if needed + var carry = q; + for (var i = s; carry !== 0 && i < this.length; i++) { + var w = this.words[i] | 0; + w += carry; + carry = w >>> 26; + w &= 0x3ffffff; + this.words[i] = w; + } + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + return this; + }; - // Initialise the result array with zeros. - for ( i = xcL + ycL, zc = []; i--; zc.push(0) ); + BN.prototype.isZero = function isZero () { + return this.length === 1 && this.words[0] === 0; + }; - base = BASE; - sqrtBase = SQRT_BASE; + BN.prototype.cmpn = function cmpn (num) { + var negative = num < 0; - for ( i = ycL; --i >= 0; ) { - c = 0; - ylo = yc[i] % sqrtBase; - yhi = yc[i] / sqrtBase | 0; + if (this.negative !== 0 && !negative) return -1; + if (this.negative === 0 && negative) return 1; - for ( k = xcL, j = i + k; j > i; ) { - xlo = xc[--k] % sqrtBase; - xhi = xc[k] / sqrtBase | 0; - m = yhi * xlo + xhi * ylo; - xlo = ylo * xlo + ( ( m % sqrtBase ) * sqrtBase ) + zc[j] + c; - c = ( xlo / base | 0 ) + ( m / sqrtBase | 0 ) + yhi * xhi; - zc[j--] = xlo % base; - } + this.strip(); - zc[j] = c; - } + var res; + if (this.length > 1) { + res = 1; + } else { + if (negative) { + num = -num; + } - if (c) { - ++e; - } else { - zc.shift(); - } + assert(num <= 0x3ffffff, 'Number is too big'); - return normalise( y, zc, e ); - }; + var w = this.words[0] | 0; + res = w === num ? 0 : w < num ? -1 : 1; + } + if (this.negative !== 0) return -res | 0; + return res; + }; + // Compare two numbers and return: + // 1 - if `this` > `num` + // 0 - if `this` == `num` + // -1 - if `this` < `num` + BN.prototype.cmp = function cmp (num) { + if (this.negative !== 0 && num.negative === 0) return -1; + if (this.negative === 0 && num.negative !== 0) return 1; - /* - * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of - * sd significant digits using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * 'toDigits() precision out of range: {sd}' - * 'toDigits() precision not an integer: {sd}' - * 'toDigits() rounding mode not an integer: {rm}' - * 'toDigits() rounding mode out of range: {rm}' - */ - P.toDigits = function ( sd, rm ) { - var n = new BigNumber(this); - sd = sd == null || !isValidInt( sd, 1, MAX, 18, 'precision' ) ? null : sd | 0; - rm = rm == null || !isValidInt( rm, 0, 8, 18, roundingMode ) ? ROUNDING_MODE : rm | 0; - return sd ? round( n, sd, rm ) : n; - }; + var res = this.ucmp(num); + if (this.negative !== 0) return -res | 0; + return res; + }; + // Unsigned comparison + BN.prototype.ucmp = function ucmp (num) { + // At this point both numbers have the same sign + if (this.length > num.length) return 1; + if (this.length < num.length) return -1; - /* - * Return a string representing the value of this BigNumber in exponential notation and - * rounded using ROUNDING_MODE to dp fixed decimal places. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * 'toExponential() decimal places not an integer: {dp}' - * 'toExponential() decimal places out of range: {dp}' - * 'toExponential() rounding mode not an integer: {rm}' - * 'toExponential() rounding mode out of range: {rm}' - */ - P.toExponential = function ( dp, rm ) { - return format( this, - dp != null && isValidInt( dp, 0, MAX, 19 ) ? ~~dp + 1 : null, rm, 19 ); - }; + var res = 0; + for (var i = this.length - 1; i >= 0; i--) { + var a = this.words[i] | 0; + var b = num.words[i] | 0; + if (a === b) continue; + if (a < b) { + res = -1; + } else if (a > b) { + res = 1; + } + break; + } + return res; + }; - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounding - * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', - * but e.g. (-0.00001).toFixed(0) is '-0'. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * 'toFixed() decimal places not an integer: {dp}' - * 'toFixed() decimal places out of range: {dp}' - * 'toFixed() rounding mode not an integer: {rm}' - * 'toFixed() rounding mode out of range: {rm}' - */ - P.toFixed = function ( dp, rm ) { - return format( this, dp != null && isValidInt( dp, 0, MAX, 20 ) - ? ~~dp + this.e + 1 : null, rm, 20 ); - }; + BN.prototype.gtn = function gtn (num) { + return this.cmpn(num) === 1; + }; + BN.prototype.gt = function gt (num) { + return this.cmp(num) === 1; + }; - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounded - * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties - * of the FORMAT object (see BigNumber.config). - * - * FORMAT = { - * decimalSeparator : '.', - * groupSeparator : ',', - * groupSize : 3, - * secondaryGroupSize : 0, - * fractionGroupSeparator : '\xA0', // non-breaking space - * fractionGroupSize : 0 - * }; - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * 'toFormat() decimal places not an integer: {dp}' - * 'toFormat() decimal places out of range: {dp}' - * 'toFormat() rounding mode not an integer: {rm}' - * 'toFormat() rounding mode out of range: {rm}' - */ - P.toFormat = function ( dp, rm ) { - var str = format( this, dp != null && isValidInt( dp, 0, MAX, 21 ) - ? ~~dp + this.e + 1 : null, rm, 21 ); + BN.prototype.gten = function gten (num) { + return this.cmpn(num) >= 0; + }; - if ( this.c ) { - var i, - arr = str.split('.'), - g1 = +FORMAT.groupSize, - g2 = +FORMAT.secondaryGroupSize, - groupSeparator = FORMAT.groupSeparator, - intPart = arr[0], - fractionPart = arr[1], - isNeg = this.s < 0, - intDigits = isNeg ? intPart.slice(1) : intPart, - len = intDigits.length; + BN.prototype.gte = function gte (num) { + return this.cmp(num) >= 0; + }; - if (g2) i = g1, g1 = g2, g2 = i, len -= i; + BN.prototype.ltn = function ltn (num) { + return this.cmpn(num) === -1; + }; - if ( g1 > 0 && len > 0 ) { - i = len % g1 || g1; - intPart = intDigits.substr( 0, i ); + BN.prototype.lt = function lt (num) { + return this.cmp(num) === -1; + }; - for ( ; i < len; i += g1 ) { - intPart += groupSeparator + intDigits.substr( i, g1 ); - } + BN.prototype.lten = function lten (num) { + return this.cmpn(num) <= 0; + }; - if ( g2 > 0 ) intPart += groupSeparator + intDigits.slice(i); - if (isNeg) intPart = '-' + intPart; - } + BN.prototype.lte = function lte (num) { + return this.cmp(num) <= 0; + }; - str = fractionPart - ? intPart + FORMAT.decimalSeparator + ( ( g2 = +FORMAT.fractionGroupSize ) - ? fractionPart.replace( new RegExp( '\\d{' + g2 + '}\\B', 'g' ), - '$&' + FORMAT.fractionGroupSeparator ) - : fractionPart ) - : intPart; - } + BN.prototype.eqn = function eqn (num) { + return this.cmpn(num) === 0; + }; - return str; - }; + BN.prototype.eq = function eq (num) { + return this.cmp(num) === 0; + }; + // + // A reduce context, could be using montgomery or something better, depending + // on the `m` itself. + // + BN.red = function red (num) { + return new Red(num); + }; - /* - * Return a string array representing the value of this BigNumber as a simple fraction with - * an integer numerator and an integer denominator. The denominator will be a positive - * non-zero value less than or equal to the specified maximum denominator. If a maximum - * denominator is not specified, the denominator will be the lowest value necessary to - * represent the number exactly. - * - * [md] {number|string|BigNumber} Integer >= 1 and < Infinity. The maximum denominator. - * - * 'toFraction() max denominator not an integer: {md}' - * 'toFraction() max denominator out of range: {md}' - */ - P.toFraction = function (md) { - var arr, d0, d2, e, exp, n, n0, q, s, - k = ERRORS, - x = this, - xc = x.c, - d = new BigNumber(ONE), - n1 = d0 = new BigNumber(ONE), - d1 = n0 = new BigNumber(ONE); + BN.prototype.toRed = function toRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + assert(this.negative === 0, 'red works only with positives'); + return ctx.convertTo(this)._forceRed(ctx); + }; - if ( md != null ) { - ERRORS = false; - n = new BigNumber(md); - ERRORS = k; + BN.prototype.fromRed = function fromRed () { + assert(this.red, 'fromRed works only with numbers in reduction context'); + return this.red.convertFrom(this); + }; - if ( !( k = n.isInt() ) || n.lt(ONE) ) { + BN.prototype._forceRed = function _forceRed (ctx) { + this.red = ctx; + return this; + }; - if (ERRORS) { - raise( 22, - 'max denominator ' + ( k ? 'out of range' : 'not an integer' ), md ); - } + BN.prototype.forceRed = function forceRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + return this._forceRed(ctx); + }; - // ERRORS is false: - // If md is a finite non-integer >= 1, round it to an integer and use it. - md = !k && n.c && round( n, n.e + 1, 1 ).gte(ONE) ? n : null; - } - } - - if ( !xc ) return x.toString(); - s = coeffToString(xc); - - // Determine initial denominator. - // d is a power of 10 and the minimum max denominator that specifies the value exactly. - e = d.e = s.length - x.e - 1; - d.c[0] = POWS_TEN[ ( exp = e % LOG_BASE ) < 0 ? LOG_BASE + exp : exp ]; - md = !md || n.cmp(d) > 0 ? ( e > 0 ? d : n1 ) : n; - - exp = MAX_EXP; - MAX_EXP = 1 / 0; - n = new BigNumber(s); + BN.prototype.redAdd = function redAdd (num) { + assert(this.red, 'redAdd works only with red numbers'); + return this.red.add(this, num); + }; - // n0 = d1 = 0 - n0.c[0] = 0; + BN.prototype.redIAdd = function redIAdd (num) { + assert(this.red, 'redIAdd works only with red numbers'); + return this.red.iadd(this, num); + }; - for ( ; ; ) { - q = div( n, d, 0, 1 ); - d2 = d0.plus( q.times(d1) ); - if ( d2.cmp(md) == 1 ) break; - d0 = d1; - d1 = d2; - n1 = n0.plus( q.times( d2 = n1 ) ); - n0 = d2; - d = n.minus( q.times( d2 = d ) ); - n = d2; - } + BN.prototype.redSub = function redSub (num) { + assert(this.red, 'redSub works only with red numbers'); + return this.red.sub(this, num); + }; - d2 = div( md.minus(d0), d1, 0, 1 ); - n0 = n0.plus( d2.times(n1) ); - d0 = d0.plus( d2.times(d1) ); - n0.s = n1.s = x.s; - e *= 2; + BN.prototype.redISub = function redISub (num) { + assert(this.red, 'redISub works only with red numbers'); + return this.red.isub(this, num); + }; - // Determine which fraction is closer to x, n0/d0 or n1/d1 - arr = div( n1, d1, e, ROUNDING_MODE ).minus(x).abs().cmp( - div( n0, d0, e, ROUNDING_MODE ).minus(x).abs() ) < 1 - ? [ n1.toString(), d1.toString() ] - : [ n0.toString(), d0.toString() ]; + BN.prototype.redShl = function redShl (num) { + assert(this.red, 'redShl works only with red numbers'); + return this.red.shl(this, num); + }; - MAX_EXP = exp; - return arr; - }; + BN.prototype.redMul = function redMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.mul(this, num); + }; + BN.prototype.redIMul = function redIMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.imul(this, num); + }; - /* - * Return the value of this BigNumber converted to a number primitive. - */ - P.toNumber = function () { - var x = this; + BN.prototype.redSqr = function redSqr () { + assert(this.red, 'redSqr works only with red numbers'); + this.red._verify1(this); + return this.red.sqr(this); + }; - // Ensure zero has correct sign. - return +x || ( x.s ? x.s * 0 : NaN ); - }; + BN.prototype.redISqr = function redISqr () { + assert(this.red, 'redISqr works only with red numbers'); + this.red._verify1(this); + return this.red.isqr(this); + }; + // Square root over p + BN.prototype.redSqrt = function redSqrt () { + assert(this.red, 'redSqrt works only with red numbers'); + this.red._verify1(this); + return this.red.sqrt(this); + }; - /* - * Return a BigNumber whose value is the value of this BigNumber raised to the power n. - * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. - * If POW_PRECISION is not 0, round to POW_PRECISION using ROUNDING_MODE. - * - * n {number} Integer, -9007199254740992 to 9007199254740992 inclusive. - * (Performs 54 loop iterations for n of 9007199254740992.) - * - * 'pow() exponent not an integer: {n}' - * 'pow() exponent out of range: {n}' - */ - P.toPower = P.pow = function (n) { - var k, y, - i = mathfloor( n < 0 ? -n : +n ), - x = this; + BN.prototype.redInvm = function redInvm () { + assert(this.red, 'redInvm works only with red numbers'); + this.red._verify1(this); + return this.red.invm(this); + }; - // Pass ±Infinity to Math.pow if exponent is out of range. - if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) && - ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) || - parseFloat(n) != n && !( n = NaN ) ) ) { - return new BigNumber( Math.pow( +x, n ) ); - } + // Return negative clone of `this` % `red modulo` + BN.prototype.redNeg = function redNeg () { + assert(this.red, 'redNeg works only with red numbers'); + this.red._verify1(this); + return this.red.neg(this); + }; - // Truncating each coefficient array to a length of k after each multiplication equates - // to truncating significant digits to POW_PRECISION + [28, 41], i.e. there will be a - // minimum of 28 guard digits retained. (Using + 1.5 would give [9, 21] guard digits.) - k = POW_PRECISION ? mathceil( POW_PRECISION / LOG_BASE + 2 ) : 0; - y = new BigNumber(ONE); + BN.prototype.redPow = function redPow (num) { + assert(this.red && !num.red, 'redPow(normalNum)'); + this.red._verify1(this); + return this.red.pow(this, num); + }; - for ( ; ; ) { + // Prime numbers with efficient reduction + var primes = { + k256: null, + p224: null, + p192: null, + p25519: null + }; - if ( i % 2 ) { - y = y.times(x); - if ( !y.c ) break; - if ( k && y.c.length > k ) y.c.length = k; - } + // Pseudo-Mersenne prime + function MPrime (name, p) { + // P = 2 ^ N - K + this.name = name; + this.p = new BN(p, 16); + this.n = this.p.bitLength(); + this.k = new BN(1).iushln(this.n).isub(this.p); - i = mathfloor( i / 2 ); - if ( !i ) break; + this.tmp = this._tmp(); + } - x = x.times(x); - if ( k && x.c && x.c.length > k ) x.c.length = k; - } + MPrime.prototype._tmp = function _tmp () { + var tmp = new BN(null); + tmp.words = new Array(Math.ceil(this.n / 13)); + return tmp; + }; - if ( n < 0 ) y = ONE.div(y); - return k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y; - }; + MPrime.prototype.ireduce = function ireduce (num) { + // Assumes that `num` is less than `P^2` + // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) + var r = num; + var rlen; + do { + this.split(r, this.tmp); + r = this.imulK(r); + r = r.iadd(this.tmp); + rlen = r.bitLength(); + } while (rlen > this.n); - /* - * Return a string representing the value of this BigNumber rounded to sd significant digits - * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits - * necessary to represent the integer part of the value in fixed-point notation, then use - * exponential notation. - * - * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * 'toPrecision() precision not an integer: {sd}' - * 'toPrecision() precision out of range: {sd}' - * 'toPrecision() rounding mode not an integer: {rm}' - * 'toPrecision() rounding mode out of range: {rm}' - */ - P.toPrecision = function ( sd, rm ) { - return format( this, sd != null && isValidInt( sd, 1, MAX, 24, 'precision' ) - ? sd | 0 : null, rm, 24 ); - }; + var cmp = rlen < this.n ? -1 : r.ucmp(this.p); + if (cmp === 0) { + r.words[0] = 0; + r.length = 1; + } else if (cmp > 0) { + r.isub(this.p); + } else { + r.strip(); + } + return r; + }; - /* - * Return a string representing the value of this BigNumber in base b, or base 10 if b is - * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and - * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent - * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than - * TO_EXP_NEG, return exponential notation. - * - * [b] {number} Integer, 2 to 64 inclusive. - * - * 'toString() base not an integer: {b}' - * 'toString() base out of range: {b}' - */ - P.toString = function (b) { - var str, - n = this, - s = n.s, - e = n.e; + MPrime.prototype.split = function split (input, out) { + input.iushrn(this.n, 0, out); + }; - // Infinity or NaN? - if ( e === null ) { + MPrime.prototype.imulK = function imulK (num) { + return num.imul(this.k); + }; - if (s) { - str = 'Infinity'; - if ( s < 0 ) str = '-' + str; - } else { - str = 'NaN'; - } - } else { - str = coeffToString( n.c ); + function K256 () { + MPrime.call( + this, + 'k256', + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + inherits(K256, MPrime); - if ( b == null || !isValidInt( b, 2, 64, 25, 'base' ) ) { - str = e <= TO_EXP_NEG || e >= TO_EXP_POS - ? toExponential( str, e ) - : toFixedPoint( str, e ); - } else { - str = convertBase( toFixedPoint( str, e ), b | 0, 10, s ); - } + K256.prototype.split = function split (input, output) { + // 256 = 9 * 26 + 22 + var mask = 0x3fffff; - if ( s < 0 && n.c[0] ) str = '-' + str; - } + var outLen = Math.min(input.length, 9); + for (var i = 0; i < outLen; i++) { + output.words[i] = input.words[i]; + } + output.length = outLen; - return str; - }; + if (input.length <= 9) { + input.words[0] = 0; + input.length = 1; + return; + } + // Shift by 9 limbs + var prev = input.words[9]; + output.words[output.length++] = prev & mask; - /* - * Return a new BigNumber whose value is the value of this BigNumber truncated to a whole - * number. - */ - P.truncated = P.trunc = function () { - return round( new BigNumber(this), this.e + 1, 1 ); - }; + for (i = 10; i < input.length; i++) { + var next = input.words[i] | 0; + input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); + prev = next; + } + prev >>>= 22; + input.words[i - 10] = prev; + if (prev === 0 && input.length > 10) { + input.length -= 10; + } else { + input.length -= 9; + } + }; + K256.prototype.imulK = function imulK (num) { + // K = 0x1000003d1 = [ 0x40, 0x3d1 ] + num.words[num.length] = 0; + num.words[num.length + 1] = 0; + num.length += 2; + // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 + var lo = 0; + for (var i = 0; i < num.length; i++) { + var w = num.words[i] | 0; + lo += w * 0x3d1; + num.words[i] = lo & 0x3ffffff; + lo = w * 0x40 + ((lo / 0x4000000) | 0); + } - /* - * Return as toString, but do not accept a base argument. - */ - P.valueOf = P.toJSON = function () { - return this.toString(); - }; + // Fast length reduction + if (num.words[num.length - 1] === 0) { + num.length--; + if (num.words[num.length - 1] === 0) { + num.length--; + } + } + return num; + }; + function P224 () { + MPrime.call( + this, + 'p224', + 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + inherits(P224, MPrime); - // Aliases for BigDecimal methods. - //P.add = P.plus; // P.add included above - //P.subtract = P.minus; // P.sub included above - //P.multiply = P.times; // P.mul included above - //P.divide = P.div; - //P.remainder = P.mod; - //P.compareTo = P.cmp; - //P.negate = P.neg; + function P192 () { + MPrime.call( + this, + 'p192', + 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + inherits(P192, MPrime); + function P25519 () { + // 2 ^ 255 - 19 + MPrime.call( + this, + '25519', + '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + inherits(P25519, MPrime); - if ( configObj != null ) BigNumber.config(configObj); + P25519.prototype.imulK = function imulK (num) { + // K = 0x13 + var carry = 0; + for (var i = 0; i < num.length; i++) { + var hi = (num.words[i] | 0) * 0x13 + carry; + var lo = hi & 0x3ffffff; + hi >>>= 26; - return BigNumber; + num.words[i] = lo; + carry = hi; } - - - // PRIVATE HELPER FUNCTIONS - - - function bitFloor(n) { - var i = n | 0; - return n > 0 || n === i ? i : i - 1; + if (carry !== 0) { + num.words[num.length++] = carry; } + return num; + }; + // Exported mostly for testing purposes, use plain name instead + BN._prime = function prime (name) { + // Cached version of prime + if (primes[name]) return primes[name]; - // Return a coefficient array as a string of base 10 digits. - function coeffToString(a) { - var s, z, - i = 1, - j = a.length, - r = a[0] + ''; - - for ( ; i < j; ) { - s = a[i++] + ''; - z = LOG_BASE - s.length; - for ( ; z--; s = '0' + s ); - r += s; - } - - // Determine trailing zeros. - for ( j = r.length; r.charCodeAt(--j) === 48; ); - return r.slice( 0, j + 1 || 1 ); + var prime; + if (name === 'k256') { + prime = new K256(); + } else if (name === 'p224') { + prime = new P224(); + } else if (name === 'p192') { + prime = new P192(); + } else if (name === 'p25519') { + prime = new P25519(); + } else { + throw new Error('Unknown prime ' + name); } + primes[name] = prime; + return prime; + }; - // Compare the value of BigNumbers x and y. - function compare( x, y ) { - var a, b, - xc = x.c, - yc = y.c, - i = x.s, - j = y.s, - k = x.e, - l = y.e; - - // Either NaN? - if ( !i || !j ) return null; - - a = xc && !xc[0]; - b = yc && !yc[0]; - - // Either zero? - if ( a || b ) return a ? b ? 0 : -j : i; + // + // Base reduction engine + // + function Red (m) { + if (typeof m === 'string') { + var prime = BN._prime(m); + this.m = prime.p; + this.prime = prime; + } else { + assert(m.gtn(1), 'modulus must be greater than 1'); + this.m = m; + this.prime = null; + } + } - // Signs differ? - if ( i != j ) return i; + Red.prototype._verify1 = function _verify1 (a) { + assert(a.negative === 0, 'red works only with positives'); + assert(a.red, 'red works only with red numbers'); + }; - a = i < 0; - b = k == l; + Red.prototype._verify2 = function _verify2 (a, b) { + assert((a.negative | b.negative) === 0, 'red works only with positives'); + assert(a.red && a.red === b.red, + 'red works only with red numbers'); + }; - // Either Infinity? - if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1; + Red.prototype.imod = function imod (a) { + if (this.prime) return this.prime.ireduce(a)._forceRed(this); + return a.umod(this.m)._forceRed(this); + }; - // Compare exponents. - if ( !b ) return k > l ^ a ? 1 : -1; + Red.prototype.neg = function neg (a) { + if (a.isZero()) { + return a.clone(); + } - j = ( k = xc.length ) < ( l = yc.length ) ? k : l; + return this.m.sub(a)._forceRed(this); + }; - // Compare digit by digit. - for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1; + Red.prototype.add = function add (a, b) { + this._verify2(a, b); - // Compare lengths. - return k == l ? 0 : k > l ^ a ? 1 : -1; + var res = a.add(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); } + return res._forceRed(this); + }; + Red.prototype.iadd = function iadd (a, b) { + this._verify2(a, b); - /* - * Return true if n is a valid number in range, otherwise false. - * Use for argument validation when ERRORS is false. - * Note: parseInt('1e+1') == 1 but parseFloat('1e+1') == 10. - */ - function intValidatorNoErrors( n, min, max ) { - return ( n = truncate(n) ) >= min && n <= max; + var res = a.iadd(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); } + return res; + }; + Red.prototype.sub = function sub (a, b) { + this._verify2(a, b); - function isArray(obj) { - return Object.prototype.toString.call(obj) == '[object Array]'; + var res = a.sub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); } + return res._forceRed(this); + }; + Red.prototype.isub = function isub (a, b) { + this._verify2(a, b); - /* - * Convert string of baseIn to an array of numbers of baseOut. - * Eg. convertBase('255', 10, 16) returns [15, 15]. - * Eg. convertBase('ff', 16, 10) returns [2, 5, 5]. - */ - function toBaseOut( str, baseIn, baseOut ) { - var j, - arr = [0], - arrL, - i = 0, - len = str.length; - - for ( ; i < len; ) { - for ( arrL = arr.length; arrL--; arr[arrL] *= baseIn ); - arr[ j = 0 ] += ALPHABET.indexOf( str.charAt( i++ ) ); + var res = a.isub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res; + }; - for ( ; j < arr.length; j++ ) { + Red.prototype.shl = function shl (a, num) { + this._verify1(a); + return this.imod(a.ushln(num)); + }; - if ( arr[j] > baseOut - 1 ) { - if ( arr[j + 1] == null ) arr[j + 1] = 0; - arr[j + 1] += arr[j] / baseOut | 0; - arr[j] %= baseOut; - } - } - } + Red.prototype.imul = function imul (a, b) { + this._verify2(a, b); + return this.imod(a.imul(b)); + }; - return arr.reverse(); - } + Red.prototype.mul = function mul (a, b) { + this._verify2(a, b); + return this.imod(a.mul(b)); + }; + Red.prototype.isqr = function isqr (a) { + return this.imul(a, a.clone()); + }; - function toExponential( str, e ) { - return ( str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str ) + - ( e < 0 ? 'e' : 'e+' ) + e; - } + Red.prototype.sqr = function sqr (a) { + return this.mul(a, a); + }; + Red.prototype.sqrt = function sqrt (a) { + if (a.isZero()) return a.clone(); - function toFixedPoint( str, e ) { - var len, z; + var mod3 = this.m.andln(3); + assert(mod3 % 2 === 1); - // Negative exponent? - if ( e < 0 ) { + // Fast case + if (mod3 === 3) { + var pow = this.m.add(new BN(1)).iushrn(2); + return this.pow(a, pow); + } - // Prepend zeros. - for ( z = '0.'; ++e; z += '0' ); - str = z + str; + // Tonelli-Shanks algorithm (Totally unoptimized and slow) + // + // Find Q and S, that Q * 2 ^ S = (P - 1) + var q = this.m.subn(1); + var s = 0; + while (!q.isZero() && q.andln(1) === 0) { + s++; + q.iushrn(1); + } + assert(!q.isZero()); - // Positive exponent - } else { - len = str.length; + var one = new BN(1).toRed(this); + var nOne = one.redNeg(); - // Append zeros. - if ( ++e > len ) { - for ( z = '0', e -= len; --e; z += '0' ); - str += z; - } else if ( e < len ) { - str = str.slice( 0, e ) + '.' + str.slice(e); - } - } + // Find quadratic non-residue + // NOTE: Max is such because of generalized Riemann hypothesis. + var lpow = this.m.subn(1).iushrn(1); + var z = this.m.bitLength(); + z = new BN(2 * z * z).toRed(this); - return str; + while (this.pow(z, lpow).cmp(nOne) !== 0) { + z.redIAdd(nOne); } + var c = this.pow(z, q); + var r = this.pow(a, q.addn(1).iushrn(1)); + var t = this.pow(a, q); + var m = s; + while (t.cmp(one) !== 0) { + var tmp = t; + for (var i = 0; tmp.cmp(one) !== 0; i++) { + tmp = tmp.redSqr(); + } + assert(i < m); + var b = this.pow(c, new BN(1).iushln(m - i - 1)); - function truncate(n) { - n = parseFloat(n); - return n < 0 ? mathceil(n) : mathfloor(n); + r = r.redMul(b); + c = b.redSqr(); + t = t.redMul(c); + m = i; } + return r; + }; - // EXPORT - + Red.prototype.invm = function invm (a) { + var inv = a._invmp(this.m); + if (inv.negative !== 0) { + inv.negative = 0; + return this.imod(inv).redNeg(); + } else { + return this.imod(inv); + } + }; - BigNumber = another(); + Red.prototype.pow = function pow (a, num) { + if (num.isZero()) return new BN(1); + if (num.cmpn(1) === 0) return a.clone(); - // AMD. - if ( true ) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return BigNumber; }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + var windowSize = 4; + var wnd = new Array(1 << windowSize); + wnd[0] = new BN(1).toRed(this); + wnd[1] = a; + for (var i = 2; i < wnd.length; i++) { + wnd[i] = this.mul(wnd[i - 1], a); + } - // Node and other environments that support module.exports. - } else {} -})(this); + var res = wnd[0]; + var current = 0; + var currentLen = 0; + var start = num.bitLength() % 26; + if (start === 0) { + start = 26; + } + for (i = num.length - 1; i >= 0; i--) { + var word = num.words[i]; + for (var j = start - 1; j >= 0; j--) { + var bit = (word >> j) & 1; + if (res !== wnd[0]) { + res = this.sqr(res); + } -/***/ }), + if (bit === 0 && current === 0) { + currentLen = 0; + continue; + } -/***/ "./node_modules/bn.js/lib/bn.js": -/*!**************************************!*\ - !*** ./node_modules/bn.js/lib/bn.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + current <<= 1; + current |= bit; + currentLen++; + if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; -/* WEBPACK VAR INJECTION */(function(module) {(function (module, exports) { - 'use strict'; + res = this.mul(res, wnd[current]); + currentLen = 0; + current = 0; + } + start = 26; + } - // Utils - function assert (val, msg) { - if (!val) throw new Error(msg || 'Assertion failed'); - } + return res; + }; - // Could use `inherits` module, but don't want to move from single file - // architecture yet. - function inherits (ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } + Red.prototype.convertTo = function convertTo (num) { + var r = num.umod(this.m); - // BN + return r === num ? r.clone() : r; + }; - function BN (number, base, endian) { - if (BN.isBN(number)) { - return number; - } + Red.prototype.convertFrom = function convertFrom (num) { + var res = num.clone(); + res.red = null; + return res; + }; - this.negative = 0; - this.words = null; - this.length = 0; + // + // Montgomery method engine + // - // Reduction context - this.red = null; + BN.mont = function mont (num) { + return new Mont(num); + }; - if (number !== null) { - if (base === 'le' || base === 'be') { - endian = base; - base = 10; - } + function Mont (m) { + Red.call(this, m); - this._init(number || 0, base || 10, endian || 'be'); + this.shift = this.m.bitLength(); + if (this.shift % 26 !== 0) { + this.shift += 26 - (this.shift % 26); } - } - if (typeof module === 'object') { - module.exports = BN; - } else { - exports.BN = BN; - } - BN.BN = BN; - BN.wordSize = 26; + this.r = new BN(1).iushln(this.shift); + this.r2 = this.imod(this.r.sqr()); + this.rinv = this.r._invmp(this.m); - var Buffer; - try { - Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer; - } catch (e) { + this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); + this.minv = this.minv.umod(this.r); + this.minv = this.r.sub(this.minv); } + inherits(Mont, Red); - BN.isBN = function isBN (num) { - if (num instanceof BN) { - return true; - } - - return num !== null && typeof num === 'object' && - num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); - }; - - BN.max = function max (left, right) { - if (left.cmp(right) > 0) return left; - return right; + Mont.prototype.convertTo = function convertTo (num) { + return this.imod(num.ushln(this.shift)); }; - BN.min = function min (left, right) { - if (left.cmp(right) < 0) return left; - return right; + Mont.prototype.convertFrom = function convertFrom (num) { + var r = this.imod(num.mul(this.rinv)); + r.red = null; + return r; }; - BN.prototype._init = function init (number, base, endian) { - if (typeof number === 'number') { - return this._initNumber(number, base, endian); + Mont.prototype.imul = function imul (a, b) { + if (a.isZero() || b.isZero()) { + a.words[0] = 0; + a.length = 1; + return a; } - if (typeof number === 'object') { - return this._initArray(number, base, endian); - } + var t = a.imul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; - if (base === 'hex') { - base = 16; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); } - assert(base === (base | 0) && base >= 2 && base <= 36); - number = number.toString().replace(/\s+/g, ''); - var start = 0; - if (number[0] === '-') { - start++; - } + return res._forceRed(this); + }; - if (base === 16) { - this._parseHex(number, start); - } else { - this._parseBase(number, base, start); - } + Mont.prototype.mul = function mul (a, b) { + if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - if (number[0] === '-') { - this.negative = 1; + var t = a.mul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); } - this.strip(); - - if (endian !== 'le') return; + return res._forceRed(this); + }; - this._initArray(this.toArray(), base, endian); + Mont.prototype.invm = function invm (a) { + // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R + var res = this.imod(a._invmp(this.m).mul(this.r2)); + return res._forceRed(this); }; +})(typeof module === 'undefined' || module, this); - BN.prototype._initNumber = function _initNumber (number, base, endian) { - if (number < 0) { - this.negative = 1; - number = -number; - } - if (number < 0x4000000) { - this.words = [ number & 0x3ffffff ]; - this.length = 1; - } else if (number < 0x10000000000000) { - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff - ]; - this.length = 2; - } else { - assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff, - 1 - ]; - this.length = 3; - } +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - if (endian !== 'le') return; +/***/ }), - // Reverse the bytes - this._initArray(this.toArray(), base, endian); - }; +/***/ "./node_modules/buffer/index.js": +/*!**************************************!*\ + !*** ./node_modules/buffer/index.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - BN.prototype._initArray = function _initArray (number, base, endian) { - // Perhaps a Uint8Array - assert(typeof number.length === 'number'); - if (number.length <= 0) { - this.words = [ 0 ]; - this.length = 1; - return this; - } +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ - this.length = Math.ceil(number.length / 3); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - var j, w; - var off = 0; - if (endian === 'be') { - for (i = number.length - 1, j = 0; i >= 0; i -= 3) { - w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } else if (endian === 'le') { - for (i = 0, j = 0; i < number.length; i += 3) { - w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } - return this.strip(); - }; - function parseHex (str, start, end) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; +var base64 = __webpack_require__(/*! base64-js */ "./node_modules/base64-js/index.js") +var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/ieee754/index.js") +var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js") - r <<= 4; +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 - // 'a' - 'f' - if (c >= 49 && c <= 54) { - r |= c - 49 + 0xa; +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. - // 'A' - 'F' - } else if (c >= 17 && c <= 22) { - r |= c - 17 + 0xa; + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() - // '0' - '9' - } else { - r |= c & 0xf; - } - } - return r; +/* + * Export kMaxLength after typed array support is determined. + */ +exports.kMaxLength = kMaxLength() + +function typedArraySupport () { + try { + var arr = new Uint8Array(1) + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false } +} - BN.prototype._parseHex = function _parseHex (number, start) { - // Create possibly bigger array to ensure that it fits the number - this.length = Math.ceil((number.length - start) / 6); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length) } + that.length = length + } - var j, w; - // Scan 24-bit chunks and add them to the number - var off = 0; - for (i = number.length - 6, j = 0; i >= start; i -= 6) { - w = parseHex(number, i, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - if (i + 6 !== start) { - w = parseHex(number, start, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - } - this.strip(); - }; - - function parseBase (str, start, end, mul) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r *= mul; + return that +} - // 'a' - if (c >= 49) { - r += c - 49 + 0xa; +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ - // 'A' - } else if (c >= 17) { - r += c - 17 + 0xa; +function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) + } - // '0' - '9' - } else { - r += c; - } + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) } - return r; + return allocUnsafe(this, arg) } + return from(this, arg, encodingOrOffset, length) +} - BN.prototype._parseBase = function _parseBase (number, base, start) { - // Initialize as zero - this.words = [ 0 ]; - this.length = 1; +Buffer.poolSize = 8192 // not used by this implementation - // Find length of limb in base - for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { - limbLen++; - } - limbLen--; - limbPow = (limbPow / base) | 0; +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype + return arr +} - var total = number.length - start; - var mod = total % limbLen; - var end = Math.min(total, total - mod) + start; +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } - var word = 0; - for (var i = start; i < end; i += limbLen) { - word = parseBase(number, i, i + limbLen, base); + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } - this.imuln(limbPow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } - if (mod !== 0) { - var pow = 1; - word = parseBase(number, i, number.length, base); + return fromObject(that, value) +} - for (i = 0; i < mod; i++) { - pow *= base; - } +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +} - this.imuln(pow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - }; +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }) + } +} - BN.prototype.copy = function copy (dest) { - dest.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - dest.words[i] = this.words[i]; - } - dest.length = this.length; - dest.negative = this.negative; - dest.red = this.red; - }; +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} - BN.prototype.clone = function clone () { - var r = new BN(null); - this.copy(r); - return r; - }; +function alloc (that, size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) +} - BN.prototype._expand = function _expand (size) { - while (this.length < size) { - this.words[this.length++] = 0; - } - return this; - }; +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +} - // Remove leading `0` from `this` - BN.prototype.strip = function strip () { - while (this.length > 1 && this.words[this.length - 1] === 0) { - this.length--; +function allocUnsafe (that, size) { + assertSize(size) + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0 } - return this._normSign(); - }; + } + return that +} - BN.prototype._normSign = function _normSign () { - // -0 = 0 - if (this.length === 1 && this.words[0] === 0) { - this.negative = 0; - } - return this; - }; +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +} - BN.prototype.inspect = function inspect () { - return (this.red ? ''; - }; +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } - /* + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } - var zeros = []; - var groupSizes = []; - var groupBases = []; + var length = byteLength(string, encoding) | 0 + that = createBuffer(that, length) - var s = ''; - var i = -1; - while (++i < BN.wordSize) { - zeros[i] = s; - s += '0'; + var actual = that.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual) } - groupSizes[0] = 0; - groupSizes[1] = 0; - groupBases[0] = 0; - groupBases[1] = 0; - var base = 2 - 1; - while (++base < 36 + 1) { - var groupSize = 0; - var groupBase = 1; - while (groupBase < (1 << BN.wordSize) / base) { - groupBase *= base; - groupSize += 1; - } - groupSizes[base] = groupSize; - groupBases[base] = groupBase; + + return that +} + +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + that = createBuffer(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 } + return that +} - */ +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength // this throws if `array` is not a valid ArrayBuffer - var zeros = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000' - ]; + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } - var groupSizes = [ - 0, 0, - 25, 16, 12, 11, 10, 9, 8, - 8, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 5, 5, - 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - ]; + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } - var groupBases = [ - 0, 0, - 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, - 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, - 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, - 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, - 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 - ]; + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array) + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset) + } else { + array = new Uint8Array(array, byteOffset, length) + } - BN.prototype.toString = function toString (base, padding) { - base = base || 10; - padding = padding | 0 || 1; + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array) + } + return that +} - var out; - if (base === 16 || base === 'hex') { - out = ''; - var off = 0; - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = this.words[i]; - var word = (((w << off) | carry) & 0xffffff).toString(16); - carry = (w >>> (24 - off)) & 0xffffff; - if (carry !== 0 || i !== this.length - 1) { - out = zeros[6 - word.length] + word + out; - } else { - out = word + out; - } - off += 2; - if (off >= 26) { - off -= 26; - i--; - } - } - if (carry !== 0) { - out = carry.toString(16) + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; +function fromObject (that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + that = createBuffer(that, len) + + if (that.length === 0) { + return that } - if (base === (base | 0) && base >= 2 && base <= 36) { - // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); - var groupSize = groupSizes[base]; - // var groupBase = Math.pow(base, groupSize); - var groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - c.negative = 0; - while (!c.isZero()) { - var r = c.modn(groupBase).toString(base); - c = c.idivn(groupBase); + obj.copy(that, 0, 0, len) + return that + } - if (!c.isZero()) { - out = zeros[groupSize - r.length] + r + out; - } else { - out = r + out; - } - } - if (this.isZero()) { - out = '0' + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) } - return out; + return fromArrayLike(that, obj) } - assert(false, 'Base should be between 2 and 36'); - }; - - BN.prototype.toNumber = function toNumber () { - var ret = this.words[0]; - if (this.length === 2) { - ret += this.words[1] * 0x4000000; - } else if (this.length === 3 && this.words[2] === 0x01) { - // NOTE: at this stage it is known that the top bit is set - ret += 0x10000000000000 + (this.words[1] * 0x4000000); - } else if (this.length > 2) { - assert(false, 'Number can only safely store up to 53 bits'); + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data) } - return (this.negative !== 0) ? -ret : ret; - }; - - BN.prototype.toJSON = function toJSON () { - return this.toString(16); - }; - - BN.prototype.toBuffer = function toBuffer (endian, length) { - assert(typeof Buffer !== 'undefined'); - return this.toArrayLike(Buffer, endian, length); - }; + } - BN.prototype.toArray = function toArray (endian, length) { - return this.toArrayLike(Array, endian, length); - }; + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} - BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { - var byteLength = this.byteLength(); - var reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'); - assert(reqLength > 0, 'Requested array length <= 0'); +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} - this.strip(); - var littleEndian = endian === 'le'; - var res = new ArrayType(reqLength); +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} - var b, i; - var q = this.clone(); - if (!littleEndian) { - // Assume big-endian - for (i = 0; i < reqLength - byteLength; i++) { - res[i] = 0; - } +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } - res[reqLength - i - 1] = b; - } - } else { - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); + if (a === b) return 0 - res[i] = b; - } + var x = a.length + var y = b.length - for (; i < reqLength; i++) { - res[i] = 0; - } + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break } + } - return res; - }; + if (x < y) return -1 + if (y < x) return 1 + return 0 +} - if (Math.clz32) { - BN.prototype._countBits = function _countBits (w) { - return 32 - Math.clz32(w); - }; - } else { - BN.prototype._countBits = function _countBits (w) { - var t = w; - var r = 0; - if (t >= 0x1000) { - r += 13; - t >>>= 13; - } - if (t >= 0x40) { - r += 7; - t >>>= 7; - } - if (t >= 0x8) { - r += 4; - t >>>= 4; - } - if (t >= 0x02) { - r += 2; - t >>>= 2; - } - return r + t; - }; +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false } +} - BN.prototype._zeroBits = function _zeroBits (w) { - // Short-cut - if (w === 0) return 26; - - var t = w; - var r = 0; - if ((t & 0x1fff) === 0) { - r += 13; - t >>>= 13; - } - if ((t & 0x7f) === 0) { - r += 7; - t >>>= 7; - } - if ((t & 0xf) === 0) { - r += 4; - t >>>= 4; - } - if ((t & 0x3) === 0) { - r += 2; - t >>>= 2; - } - if ((t & 0x1) === 0) { - r++; - } - return r; - }; - - // Return number of used bits in a BN - BN.prototype.bitLength = function bitLength () { - var w = this.words[this.length - 1]; - var hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }; +Buffer.concat = function concat (list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } - function toBitArray (num) { - var w = new Array(num.bitLength()); + if (list.length === 0) { + return Buffer.alloc(0) + } - for (var bit = 0; bit < w.length; bit++) { - var off = (bit / 26) | 0; - var wbit = bit % 26; + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } - w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} - return w; +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string } - // Number of trailing zero bits - BN.prototype.zeroBits = function zeroBits () { - if (this.isZero()) return 0; + var len = string.length + if (len === 0) return 0 - var r = 0; - for (var i = 0; i < this.length; i++) { - var b = this._zeroBits(this.words[i]); - r += b; - if (b !== 26) break; + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true } - return r; - }; + } +} +Buffer.byteLength = byteLength - BN.prototype.byteLength = function byteLength () { - return Math.ceil(this.bitLength() / 8); - }; +function slowToString (encoding, start, end) { + var loweredCase = false - BN.prototype.toTwos = function toTwos (width) { - if (this.negative !== 0) { - return this.abs().inotn(width).iaddn(1); - } - return this.clone(); - }; + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. - BN.prototype.fromTwos = function fromTwos (width) { - if (this.testn(width - 1)) { - return this.notn(width).iaddn(1).ineg(); - } - return this.clone(); - }; + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } - BN.prototype.isNeg = function isNeg () { - return this.negative !== 0; - }; + if (end === undefined || end > this.length) { + end = this.length + } - // Return negative clone of `this` - BN.prototype.neg = function neg () { - return this.clone().ineg(); - }; + if (end <= 0) { + return '' + } - BN.prototype.ineg = function ineg () { - if (!this.isZero()) { - this.negative ^= 1; - } + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 - return this; - }; + if (end <= start) { + return '' + } - // Or `num` with `this` in-place - BN.prototype.iuor = function iuor (num) { - while (this.length < num.length) { - this.words[this.length++] = 0; - } + if (!encoding) encoding = 'utf8' - for (var i = 0; i < num.length; i++) { - this.words[i] = this.words[i] | num.words[i]; - } + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) - return this.strip(); - }; + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) - BN.prototype.ior = function ior (num) { - assert((this.negative | num.negative) === 0); - return this.iuor(num); - }; + case 'ascii': + return asciiSlice(this, start, end) - // Or `num` with `this` - BN.prototype.or = function or (num) { - if (this.length > num.length) return this.clone().ior(num); - return num.clone().ior(this); - }; + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) - BN.prototype.uor = function uor (num) { - if (this.length > num.length) return this.clone().iuor(num); - return num.clone().iuor(this); - }; + case 'base64': + return base64Slice(this, start, end) - // And `num` with `this` in-place - BN.prototype.iuand = function iuand (num) { - // b = min-length(num, this) - var b; - if (this.length > num.length) { - b = num; - } else { - b = this; - } + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) - for (var i = 0; i < b.length; i++) { - this.words[i] = this.words[i] & num.words[i]; + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true } + } +} - this.length = b.length; - - return this.strip(); - }; - - BN.prototype.iand = function iand (num) { - assert((this.negative | num.negative) === 0); - return this.iuand(num); - }; +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer.prototype._isBuffer = true - // And `num` with `this` - BN.prototype.and = function and (num) { - if (this.length > num.length) return this.clone().iand(num); - return num.clone().iand(this); - }; +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} - BN.prototype.uand = function uand (num) { - if (this.length > num.length) return this.clone().iuand(num); - return num.clone().iuand(this); - }; +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} - // Xor `num` with `this` in-place - BN.prototype.iuxor = function iuxor (num) { - // a.length > b.length - var a; - var b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} - for (var i = 0; i < b.length; i++) { - this.words[i] = a.words[i] ^ b.words[i]; - } +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} - if (this !== a) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} - this.length = a.length; +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} - return this.strip(); - }; +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} - BN.prototype.ixor = function ixor (num) { - assert((this.negative | num.negative) === 0); - return this.iuxor(num); - }; +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } - // Xor `num` with `this` - BN.prototype.xor = function xor (num) { - if (this.length > num.length) return this.clone().ixor(num); - return num.clone().ixor(this); - }; + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } - BN.prototype.uxor = function uxor (num) { - if (this.length > num.length) return this.clone().iuxor(num); - return num.clone().iuxor(this); - }; + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } - // Not ``this`` with ``width`` bitwidth - BN.prototype.inotn = function inotn (width) { - assert(typeof width === 'number' && width >= 0); + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } - var bytesNeeded = Math.ceil(width / 26) | 0; - var bitsLeft = width % 26; + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 - // Extend the buffer with leading zeroes - this._expand(bytesNeeded); + if (this === target) return 0 - if (bitsLeft > 0) { - bytesNeeded--; - } + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) - // Handle complete words - for (var i = 0; i < bytesNeeded; i++) { - this.words[i] = ~this.words[i] & 0x3ffffff; - } + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) - // Handle the residue - if (bitsLeft > 0) { - this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break } + } - // And remove leading zeroes - return this.strip(); - }; + if (x < y) return -1 + if (y < x) return 1 + return 0 +} - BN.prototype.notn = function notn (width) { - return this.clone().inotn(width); - }; +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 - // Set `bit` of `this` - BN.prototype.setn = function setn (bit, val) { - assert(typeof bit === 'number' && bit >= 0); + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } - var off = (bit / 26) | 0; - var wbit = bit % 26; + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } - this._expand(off + 1); + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } - if (val) { - this.words[off] = this.words[off] | (1 << wbit); - } else { - this.words[off] = this.words[off] & ~(1 << wbit); + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } - return this.strip(); - }; - - // Add `num` to `this` in-place - BN.prototype.iadd = function iadd (num) { - var r; + throw new TypeError('val must be string, number or Buffer') +} - // negative + positive - if (this.negative !== 0 && num.negative === 0) { - this.negative = 0; - r = this.isub(num); - this.negative ^= 1; - return this._normSign(); +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length - // positive + negative - } else if (this.negative === 0 && num.negative !== 0) { - num.negative = 0; - r = this.isub(num); - num.negative = 1; - return r._normSign(); + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 } + } - // a.length > b.length - var a, b; - if (this.length > num.length) { - a = this; - b = num; + function read (buf, i) { + if (indexSize === 1) { + return buf[i] } else { - a = num; - b = this; + return buf.readUInt16BE(i * indexSize) } + } - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) + (b.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } } - - this.length = a.length; - if (carry !== 0) { - this.words[this.length] = carry; - this.length++; - // Copy the rest of the words - } else if (a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } } + if (found) return i } + } - return this; - }; + return -1 +} - // Add `num` to `this` - BN.prototype.add = function add (num) { - var res; - if (num.negative !== 0 && this.negative === 0) { - num.negative = 0; - res = this.sub(num); - num.negative ^= 1; - return res; - } else if (num.negative === 0 && this.negative !== 0) { - this.negative = 0; - res = num.sub(this); - this.negative = 1; - return res; +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining } + } - if (this.length > num.length) return this.clone().iadd(num); + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - return num.clone().iadd(this); - }; + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} - // Subtract `num` from `this` in-place - BN.prototype.isub = function isub (num) { - // this - (-num) = this + num - if (num.negative !== 0) { - num.negative = 0; - var r = this.iadd(num); - num.negative = 1; - return r._normSign(); +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} - // -this - num = -(this + num) - } else if (this.negative !== 0) { - this.negative = 0; - this.iadd(num); - this.negative = 1; - return this._normSign(); - } +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} - // At this point both numbers are positive - var cmp = this.cmp(num); +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} - // Optimization - zeroify - if (cmp === 0) { - this.negative = 0; - this.length = 1; - this.words[0] = 0; - return this; - } +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} - // a > b - var a, b; - if (cmp > 0) { - a = this; - b = num; +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' } else { - a = num; - b = this; + encoding = length + length = undefined } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) - (b.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining - // Copy rest of the words - if (carry === 0 && i < a.length && a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } - this.length = Math.max(this.length, i); + if (!encoding) encoding = 'utf8' - if (a !== this) { - this.negative = 1; + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true } + } +} - return this.strip(); - }; +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} - // Subtract `num` from `this` - BN.prototype.sub = function sub (num) { - return this.clone().isub(num); - }; +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} - function smallMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - var len = (self.length + num.length) | 0; - out.length = len; - len = (len - 1) | 0; +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] - // Peel one iteration (compiler can't do it, because of code complexity) - var a = self.words[0] | 0; - var b = num.words[0] | 0; - var r = a * b; + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 - var lo = r & 0x3ffffff; - var carry = (r / 0x4000000) | 0; - out.words[0] = lo; + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint - for (var k = 1; k < len; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = carry >>> 26; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = (k - j) | 0; - a = self.words[i] | 0; - b = num.words[j] | 0; - r = a * b + rword; - ncarry += (r / 0x4000000) | 0; - rword = r & 0x3ffffff; + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } } - out.words[k] = rword | 0; - carry = ncarry | 0; } - if (carry !== 0) { - out.words[k] = carry | 0; - } else { - out.length--; + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF } - return out.strip(); + res.push(codePoint) + i += bytesPerSequence } - // TODO(indutny): it may be reasonable to omit it for users who don't need - // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit - // multiplication (like elliptic secp256k1). - var comb10MulTo = function comb10MulTo (self, num, out) { - var a = self.words; - var b = num.words; - var o = out.words; - var c = 0; - var lo; - var mid; - var hi; - var a0 = a[0] | 0; - var al0 = a0 & 0x1fff; - var ah0 = a0 >>> 13; - var a1 = a[1] | 0; - var al1 = a1 & 0x1fff; - var ah1 = a1 >>> 13; - var a2 = a[2] | 0; - var al2 = a2 & 0x1fff; - var ah2 = a2 >>> 13; - var a3 = a[3] | 0; - var al3 = a3 & 0x1fff; - var ah3 = a3 >>> 13; - var a4 = a[4] | 0; - var al4 = a4 & 0x1fff; - var ah4 = a4 >>> 13; - var a5 = a[5] | 0; - var al5 = a5 & 0x1fff; - var ah5 = a5 >>> 13; - var a6 = a[6] | 0; - var al6 = a6 & 0x1fff; - var ah6 = a6 >>> 13; - var a7 = a[7] | 0; - var al7 = a7 & 0x1fff; - var ah7 = a7 >>> 13; - var a8 = a[8] | 0; - var al8 = a8 & 0x1fff; - var ah8 = a8 >>> 13; - var a9 = a[9] | 0; - var al9 = a9 & 0x1fff; - var ah9 = a9 >>> 13; - var b0 = b[0] | 0; - var bl0 = b0 & 0x1fff; - var bh0 = b0 >>> 13; - var b1 = b[1] | 0; - var bl1 = b1 & 0x1fff; - var bh1 = b1 >>> 13; - var b2 = b[2] | 0; - var bl2 = b2 & 0x1fff; - var bh2 = b2 >>> 13; - var b3 = b[3] | 0; - var bl3 = b3 & 0x1fff; - var bh3 = b3 >>> 13; - var b4 = b[4] | 0; - var bl4 = b4 & 0x1fff; - var bh4 = b4 >>> 13; - var b5 = b[5] | 0; - var bl5 = b5 & 0x1fff; - var bh5 = b5 >>> 13; - var b6 = b[6] | 0; - var bl6 = b6 & 0x1fff; - var bh6 = b6 >>> 13; - var b7 = b[7] | 0; - var bl7 = b7 & 0x1fff; - var bh7 = b7 >>> 13; - var b8 = b[8] | 0; - var bl8 = b8 & 0x1fff; - var bh8 = b8 >>> 13; - var b9 = b[9] | 0; - var bl9 = b9 & 0x1fff; - var bh9 = b9 >>> 13; + return decodeCodePointsArray(res) +} - out.negative = self.negative ^ num.negative; - out.length = 19; - /* k = 0 */ - lo = Math.imul(al0, bl0); - mid = Math.imul(al0, bh0); - mid = (mid + Math.imul(ah0, bl0)) | 0; - hi = Math.imul(ah0, bh0); - var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; - w0 &= 0x3ffffff; - /* k = 1 */ - lo = Math.imul(al1, bl0); - mid = Math.imul(al1, bh0); - mid = (mid + Math.imul(ah1, bl0)) | 0; - hi = Math.imul(ah1, bh0); - lo = (lo + Math.imul(al0, bl1)) | 0; - mid = (mid + Math.imul(al0, bh1)) | 0; - mid = (mid + Math.imul(ah0, bl1)) | 0; - hi = (hi + Math.imul(ah0, bh1)) | 0; - var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; - w1 &= 0x3ffffff; - /* k = 2 */ - lo = Math.imul(al2, bl0); - mid = Math.imul(al2, bh0); - mid = (mid + Math.imul(ah2, bl0)) | 0; - hi = Math.imul(ah2, bh0); - lo = (lo + Math.imul(al1, bl1)) | 0; - mid = (mid + Math.imul(al1, bh1)) | 0; - mid = (mid + Math.imul(ah1, bl1)) | 0; - hi = (hi + Math.imul(ah1, bh1)) | 0; - lo = (lo + Math.imul(al0, bl2)) | 0; - mid = (mid + Math.imul(al0, bh2)) | 0; - mid = (mid + Math.imul(ah0, bl2)) | 0; - hi = (hi + Math.imul(ah0, bh2)) | 0; - var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; - w2 &= 0x3ffffff; - /* k = 3 */ - lo = Math.imul(al3, bl0); - mid = Math.imul(al3, bh0); - mid = (mid + Math.imul(ah3, bl0)) | 0; - hi = Math.imul(ah3, bh0); - lo = (lo + Math.imul(al2, bl1)) | 0; - mid = (mid + Math.imul(al2, bh1)) | 0; - mid = (mid + Math.imul(ah2, bl1)) | 0; - hi = (hi + Math.imul(ah2, bh1)) | 0; - lo = (lo + Math.imul(al1, bl2)) | 0; - mid = (mid + Math.imul(al1, bh2)) | 0; - mid = (mid + Math.imul(ah1, bl2)) | 0; - hi = (hi + Math.imul(ah1, bh2)) | 0; - lo = (lo + Math.imul(al0, bl3)) | 0; - mid = (mid + Math.imul(al0, bh3)) | 0; - mid = (mid + Math.imul(ah0, bl3)) | 0; - hi = (hi + Math.imul(ah0, bh3)) | 0; - var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; - w3 &= 0x3ffffff; - /* k = 4 */ - lo = Math.imul(al4, bl0); - mid = Math.imul(al4, bh0); - mid = (mid + Math.imul(ah4, bl0)) | 0; - hi = Math.imul(ah4, bh0); - lo = (lo + Math.imul(al3, bl1)) | 0; - mid = (mid + Math.imul(al3, bh1)) | 0; - mid = (mid + Math.imul(ah3, bl1)) | 0; - hi = (hi + Math.imul(ah3, bh1)) | 0; - lo = (lo + Math.imul(al2, bl2)) | 0; - mid = (mid + Math.imul(al2, bh2)) | 0; - mid = (mid + Math.imul(ah2, bl2)) | 0; - hi = (hi + Math.imul(ah2, bh2)) | 0; - lo = (lo + Math.imul(al1, bl3)) | 0; - mid = (mid + Math.imul(al1, bh3)) | 0; - mid = (mid + Math.imul(ah1, bl3)) | 0; - hi = (hi + Math.imul(ah1, bh3)) | 0; - lo = (lo + Math.imul(al0, bl4)) | 0; - mid = (mid + Math.imul(al0, bh4)) | 0; - mid = (mid + Math.imul(ah0, bl4)) | 0; - hi = (hi + Math.imul(ah0, bh4)) | 0; - var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; - w4 &= 0x3ffffff; - /* k = 5 */ - lo = Math.imul(al5, bl0); - mid = Math.imul(al5, bh0); - mid = (mid + Math.imul(ah5, bl0)) | 0; - hi = Math.imul(ah5, bh0); - lo = (lo + Math.imul(al4, bl1)) | 0; - mid = (mid + Math.imul(al4, bh1)) | 0; - mid = (mid + Math.imul(ah4, bl1)) | 0; - hi = (hi + Math.imul(ah4, bh1)) | 0; - lo = (lo + Math.imul(al3, bl2)) | 0; - mid = (mid + Math.imul(al3, bh2)) | 0; - mid = (mid + Math.imul(ah3, bl2)) | 0; - hi = (hi + Math.imul(ah3, bh2)) | 0; - lo = (lo + Math.imul(al2, bl3)) | 0; - mid = (mid + Math.imul(al2, bh3)) | 0; - mid = (mid + Math.imul(ah2, bl3)) | 0; - hi = (hi + Math.imul(ah2, bh3)) | 0; - lo = (lo + Math.imul(al1, bl4)) | 0; - mid = (mid + Math.imul(al1, bh4)) | 0; - mid = (mid + Math.imul(ah1, bl4)) | 0; - hi = (hi + Math.imul(ah1, bh4)) | 0; - lo = (lo + Math.imul(al0, bl5)) | 0; - mid = (mid + Math.imul(al0, bh5)) | 0; - mid = (mid + Math.imul(ah0, bl5)) | 0; - hi = (hi + Math.imul(ah0, bh5)) | 0; - var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; - w5 &= 0x3ffffff; - /* k = 6 */ - lo = Math.imul(al6, bl0); - mid = Math.imul(al6, bh0); - mid = (mid + Math.imul(ah6, bl0)) | 0; - hi = Math.imul(ah6, bh0); - lo = (lo + Math.imul(al5, bl1)) | 0; - mid = (mid + Math.imul(al5, bh1)) | 0; - mid = (mid + Math.imul(ah5, bl1)) | 0; - hi = (hi + Math.imul(ah5, bh1)) | 0; - lo = (lo + Math.imul(al4, bl2)) | 0; - mid = (mid + Math.imul(al4, bh2)) | 0; - mid = (mid + Math.imul(ah4, bl2)) | 0; - hi = (hi + Math.imul(ah4, bh2)) | 0; - lo = (lo + Math.imul(al3, bl3)) | 0; - mid = (mid + Math.imul(al3, bh3)) | 0; - mid = (mid + Math.imul(ah3, bl3)) | 0; - hi = (hi + Math.imul(ah3, bh3)) | 0; - lo = (lo + Math.imul(al2, bl4)) | 0; - mid = (mid + Math.imul(al2, bh4)) | 0; - mid = (mid + Math.imul(ah2, bl4)) | 0; - hi = (hi + Math.imul(ah2, bh4)) | 0; - lo = (lo + Math.imul(al1, bl5)) | 0; - mid = (mid + Math.imul(al1, bh5)) | 0; - mid = (mid + Math.imul(ah1, bl5)) | 0; - hi = (hi + Math.imul(ah1, bh5)) | 0; - lo = (lo + Math.imul(al0, bl6)) | 0; - mid = (mid + Math.imul(al0, bh6)) | 0; - mid = (mid + Math.imul(ah0, bl6)) | 0; - hi = (hi + Math.imul(ah0, bh6)) | 0; - var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; - w6 &= 0x3ffffff; - /* k = 7 */ - lo = Math.imul(al7, bl0); - mid = Math.imul(al7, bh0); - mid = (mid + Math.imul(ah7, bl0)) | 0; - hi = Math.imul(ah7, bh0); - lo = (lo + Math.imul(al6, bl1)) | 0; - mid = (mid + Math.imul(al6, bh1)) | 0; - mid = (mid + Math.imul(ah6, bl1)) | 0; - hi = (hi + Math.imul(ah6, bh1)) | 0; - lo = (lo + Math.imul(al5, bl2)) | 0; - mid = (mid + Math.imul(al5, bh2)) | 0; - mid = (mid + Math.imul(ah5, bl2)) | 0; - hi = (hi + Math.imul(ah5, bh2)) | 0; - lo = (lo + Math.imul(al4, bl3)) | 0; - mid = (mid + Math.imul(al4, bh3)) | 0; - mid = (mid + Math.imul(ah4, bl3)) | 0; - hi = (hi + Math.imul(ah4, bh3)) | 0; - lo = (lo + Math.imul(al3, bl4)) | 0; - mid = (mid + Math.imul(al3, bh4)) | 0; - mid = (mid + Math.imul(ah3, bl4)) | 0; - hi = (hi + Math.imul(ah3, bh4)) | 0; - lo = (lo + Math.imul(al2, bl5)) | 0; - mid = (mid + Math.imul(al2, bh5)) | 0; - mid = (mid + Math.imul(ah2, bl5)) | 0; - hi = (hi + Math.imul(ah2, bh5)) | 0; - lo = (lo + Math.imul(al1, bl6)) | 0; - mid = (mid + Math.imul(al1, bh6)) | 0; - mid = (mid + Math.imul(ah1, bl6)) | 0; - hi = (hi + Math.imul(ah1, bh6)) | 0; - lo = (lo + Math.imul(al0, bl7)) | 0; - mid = (mid + Math.imul(al0, bh7)) | 0; - mid = (mid + Math.imul(ah0, bl7)) | 0; - hi = (hi + Math.imul(ah0, bh7)) | 0; - var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; - w7 &= 0x3ffffff; - /* k = 8 */ - lo = Math.imul(al8, bl0); - mid = Math.imul(al8, bh0); - mid = (mid + Math.imul(ah8, bl0)) | 0; - hi = Math.imul(ah8, bh0); - lo = (lo + Math.imul(al7, bl1)) | 0; - mid = (mid + Math.imul(al7, bh1)) | 0; - mid = (mid + Math.imul(ah7, bl1)) | 0; - hi = (hi + Math.imul(ah7, bh1)) | 0; - lo = (lo + Math.imul(al6, bl2)) | 0; - mid = (mid + Math.imul(al6, bh2)) | 0; - mid = (mid + Math.imul(ah6, bl2)) | 0; - hi = (hi + Math.imul(ah6, bh2)) | 0; - lo = (lo + Math.imul(al5, bl3)) | 0; - mid = (mid + Math.imul(al5, bh3)) | 0; - mid = (mid + Math.imul(ah5, bl3)) | 0; - hi = (hi + Math.imul(ah5, bh3)) | 0; - lo = (lo + Math.imul(al4, bl4)) | 0; - mid = (mid + Math.imul(al4, bh4)) | 0; - mid = (mid + Math.imul(ah4, bl4)) | 0; - hi = (hi + Math.imul(ah4, bh4)) | 0; - lo = (lo + Math.imul(al3, bl5)) | 0; - mid = (mid + Math.imul(al3, bh5)) | 0; - mid = (mid + Math.imul(ah3, bl5)) | 0; - hi = (hi + Math.imul(ah3, bh5)) | 0; - lo = (lo + Math.imul(al2, bl6)) | 0; - mid = (mid + Math.imul(al2, bh6)) | 0; - mid = (mid + Math.imul(ah2, bl6)) | 0; - hi = (hi + Math.imul(ah2, bh6)) | 0; - lo = (lo + Math.imul(al1, bl7)) | 0; - mid = (mid + Math.imul(al1, bh7)) | 0; - mid = (mid + Math.imul(ah1, bl7)) | 0; - hi = (hi + Math.imul(ah1, bh7)) | 0; - lo = (lo + Math.imul(al0, bl8)) | 0; - mid = (mid + Math.imul(al0, bh8)) | 0; - mid = (mid + Math.imul(ah0, bl8)) | 0; - hi = (hi + Math.imul(ah0, bh8)) | 0; - var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; - w8 &= 0x3ffffff; - /* k = 9 */ - lo = Math.imul(al9, bl0); - mid = Math.imul(al9, bh0); - mid = (mid + Math.imul(ah9, bl0)) | 0; - hi = Math.imul(ah9, bh0); - lo = (lo + Math.imul(al8, bl1)) | 0; - mid = (mid + Math.imul(al8, bh1)) | 0; - mid = (mid + Math.imul(ah8, bl1)) | 0; - hi = (hi + Math.imul(ah8, bh1)) | 0; - lo = (lo + Math.imul(al7, bl2)) | 0; - mid = (mid + Math.imul(al7, bh2)) | 0; - mid = (mid + Math.imul(ah7, bl2)) | 0; - hi = (hi + Math.imul(ah7, bh2)) | 0; - lo = (lo + Math.imul(al6, bl3)) | 0; - mid = (mid + Math.imul(al6, bh3)) | 0; - mid = (mid + Math.imul(ah6, bl3)) | 0; - hi = (hi + Math.imul(ah6, bh3)) | 0; - lo = (lo + Math.imul(al5, bl4)) | 0; - mid = (mid + Math.imul(al5, bh4)) | 0; - mid = (mid + Math.imul(ah5, bl4)) | 0; - hi = (hi + Math.imul(ah5, bh4)) | 0; - lo = (lo + Math.imul(al4, bl5)) | 0; - mid = (mid + Math.imul(al4, bh5)) | 0; - mid = (mid + Math.imul(ah4, bl5)) | 0; - hi = (hi + Math.imul(ah4, bh5)) | 0; - lo = (lo + Math.imul(al3, bl6)) | 0; - mid = (mid + Math.imul(al3, bh6)) | 0; - mid = (mid + Math.imul(ah3, bl6)) | 0; - hi = (hi + Math.imul(ah3, bh6)) | 0; - lo = (lo + Math.imul(al2, bl7)) | 0; - mid = (mid + Math.imul(al2, bh7)) | 0; - mid = (mid + Math.imul(ah2, bl7)) | 0; - hi = (hi + Math.imul(ah2, bh7)) | 0; - lo = (lo + Math.imul(al1, bl8)) | 0; - mid = (mid + Math.imul(al1, bh8)) | 0; - mid = (mid + Math.imul(ah1, bl8)) | 0; - hi = (hi + Math.imul(ah1, bh8)) | 0; - lo = (lo + Math.imul(al0, bl9)) | 0; - mid = (mid + Math.imul(al0, bh9)) | 0; - mid = (mid + Math.imul(ah0, bl9)) | 0; - hi = (hi + Math.imul(ah0, bh9)) | 0; - var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; - w9 &= 0x3ffffff; - /* k = 10 */ - lo = Math.imul(al9, bl1); - mid = Math.imul(al9, bh1); - mid = (mid + Math.imul(ah9, bl1)) | 0; - hi = Math.imul(ah9, bh1); - lo = (lo + Math.imul(al8, bl2)) | 0; - mid = (mid + Math.imul(al8, bh2)) | 0; - mid = (mid + Math.imul(ah8, bl2)) | 0; - hi = (hi + Math.imul(ah8, bh2)) | 0; - lo = (lo + Math.imul(al7, bl3)) | 0; - mid = (mid + Math.imul(al7, bh3)) | 0; - mid = (mid + Math.imul(ah7, bl3)) | 0; - hi = (hi + Math.imul(ah7, bh3)) | 0; - lo = (lo + Math.imul(al6, bl4)) | 0; - mid = (mid + Math.imul(al6, bh4)) | 0; - mid = (mid + Math.imul(ah6, bl4)) | 0; - hi = (hi + Math.imul(ah6, bh4)) | 0; - lo = (lo + Math.imul(al5, bl5)) | 0; - mid = (mid + Math.imul(al5, bh5)) | 0; - mid = (mid + Math.imul(ah5, bl5)) | 0; - hi = (hi + Math.imul(ah5, bh5)) | 0; - lo = (lo + Math.imul(al4, bl6)) | 0; - mid = (mid + Math.imul(al4, bh6)) | 0; - mid = (mid + Math.imul(ah4, bl6)) | 0; - hi = (hi + Math.imul(ah4, bh6)) | 0; - lo = (lo + Math.imul(al3, bl7)) | 0; - mid = (mid + Math.imul(al3, bh7)) | 0; - mid = (mid + Math.imul(ah3, bl7)) | 0; - hi = (hi + Math.imul(ah3, bh7)) | 0; - lo = (lo + Math.imul(al2, bl8)) | 0; - mid = (mid + Math.imul(al2, bh8)) | 0; - mid = (mid + Math.imul(ah2, bl8)) | 0; - hi = (hi + Math.imul(ah2, bh8)) | 0; - lo = (lo + Math.imul(al1, bl9)) | 0; - mid = (mid + Math.imul(al1, bh9)) | 0; - mid = (mid + Math.imul(ah1, bl9)) | 0; - hi = (hi + Math.imul(ah1, bh9)) | 0; - var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; - w10 &= 0x3ffffff; - /* k = 11 */ - lo = Math.imul(al9, bl2); - mid = Math.imul(al9, bh2); - mid = (mid + Math.imul(ah9, bl2)) | 0; - hi = Math.imul(ah9, bh2); - lo = (lo + Math.imul(al8, bl3)) | 0; - mid = (mid + Math.imul(al8, bh3)) | 0; - mid = (mid + Math.imul(ah8, bl3)) | 0; - hi = (hi + Math.imul(ah8, bh3)) | 0; - lo = (lo + Math.imul(al7, bl4)) | 0; - mid = (mid + Math.imul(al7, bh4)) | 0; - mid = (mid + Math.imul(ah7, bl4)) | 0; - hi = (hi + Math.imul(ah7, bh4)) | 0; - lo = (lo + Math.imul(al6, bl5)) | 0; - mid = (mid + Math.imul(al6, bh5)) | 0; - mid = (mid + Math.imul(ah6, bl5)) | 0; - hi = (hi + Math.imul(ah6, bh5)) | 0; - lo = (lo + Math.imul(al5, bl6)) | 0; - mid = (mid + Math.imul(al5, bh6)) | 0; - mid = (mid + Math.imul(ah5, bl6)) | 0; - hi = (hi + Math.imul(ah5, bh6)) | 0; - lo = (lo + Math.imul(al4, bl7)) | 0; - mid = (mid + Math.imul(al4, bh7)) | 0; - mid = (mid + Math.imul(ah4, bl7)) | 0; - hi = (hi + Math.imul(ah4, bh7)) | 0; - lo = (lo + Math.imul(al3, bl8)) | 0; - mid = (mid + Math.imul(al3, bh8)) | 0; - mid = (mid + Math.imul(ah3, bl8)) | 0; - hi = (hi + Math.imul(ah3, bh8)) | 0; - lo = (lo + Math.imul(al2, bl9)) | 0; - mid = (mid + Math.imul(al2, bh9)) | 0; - mid = (mid + Math.imul(ah2, bl9)) | 0; - hi = (hi + Math.imul(ah2, bh9)) | 0; - var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; - w11 &= 0x3ffffff; - /* k = 12 */ - lo = Math.imul(al9, bl3); - mid = Math.imul(al9, bh3); - mid = (mid + Math.imul(ah9, bl3)) | 0; - hi = Math.imul(ah9, bh3); - lo = (lo + Math.imul(al8, bl4)) | 0; - mid = (mid + Math.imul(al8, bh4)) | 0; - mid = (mid + Math.imul(ah8, bl4)) | 0; - hi = (hi + Math.imul(ah8, bh4)) | 0; - lo = (lo + Math.imul(al7, bl5)) | 0; - mid = (mid + Math.imul(al7, bh5)) | 0; - mid = (mid + Math.imul(ah7, bl5)) | 0; - hi = (hi + Math.imul(ah7, bh5)) | 0; - lo = (lo + Math.imul(al6, bl6)) | 0; - mid = (mid + Math.imul(al6, bh6)) | 0; - mid = (mid + Math.imul(ah6, bl6)) | 0; - hi = (hi + Math.imul(ah6, bh6)) | 0; - lo = (lo + Math.imul(al5, bl7)) | 0; - mid = (mid + Math.imul(al5, bh7)) | 0; - mid = (mid + Math.imul(ah5, bl7)) | 0; - hi = (hi + Math.imul(ah5, bh7)) | 0; - lo = (lo + Math.imul(al4, bl8)) | 0; - mid = (mid + Math.imul(al4, bh8)) | 0; - mid = (mid + Math.imul(ah4, bl8)) | 0; - hi = (hi + Math.imul(ah4, bh8)) | 0; - lo = (lo + Math.imul(al3, bl9)) | 0; - mid = (mid + Math.imul(al3, bh9)) | 0; - mid = (mid + Math.imul(ah3, bl9)) | 0; - hi = (hi + Math.imul(ah3, bh9)) | 0; - var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; - w12 &= 0x3ffffff; - /* k = 13 */ - lo = Math.imul(al9, bl4); - mid = Math.imul(al9, bh4); - mid = (mid + Math.imul(ah9, bl4)) | 0; - hi = Math.imul(ah9, bh4); - lo = (lo + Math.imul(al8, bl5)) | 0; - mid = (mid + Math.imul(al8, bh5)) | 0; - mid = (mid + Math.imul(ah8, bl5)) | 0; - hi = (hi + Math.imul(ah8, bh5)) | 0; - lo = (lo + Math.imul(al7, bl6)) | 0; - mid = (mid + Math.imul(al7, bh6)) | 0; - mid = (mid + Math.imul(ah7, bl6)) | 0; - hi = (hi + Math.imul(ah7, bh6)) | 0; - lo = (lo + Math.imul(al6, bl7)) | 0; - mid = (mid + Math.imul(al6, bh7)) | 0; - mid = (mid + Math.imul(ah6, bl7)) | 0; - hi = (hi + Math.imul(ah6, bh7)) | 0; - lo = (lo + Math.imul(al5, bl8)) | 0; - mid = (mid + Math.imul(al5, bh8)) | 0; - mid = (mid + Math.imul(ah5, bl8)) | 0; - hi = (hi + Math.imul(ah5, bh8)) | 0; - lo = (lo + Math.imul(al4, bl9)) | 0; - mid = (mid + Math.imul(al4, bh9)) | 0; - mid = (mid + Math.imul(ah4, bl9)) | 0; - hi = (hi + Math.imul(ah4, bh9)) | 0; - var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; - w13 &= 0x3ffffff; - /* k = 14 */ - lo = Math.imul(al9, bl5); - mid = Math.imul(al9, bh5); - mid = (mid + Math.imul(ah9, bl5)) | 0; - hi = Math.imul(ah9, bh5); - lo = (lo + Math.imul(al8, bl6)) | 0; - mid = (mid + Math.imul(al8, bh6)) | 0; - mid = (mid + Math.imul(ah8, bl6)) | 0; - hi = (hi + Math.imul(ah8, bh6)) | 0; - lo = (lo + Math.imul(al7, bl7)) | 0; - mid = (mid + Math.imul(al7, bh7)) | 0; - mid = (mid + Math.imul(ah7, bl7)) | 0; - hi = (hi + Math.imul(ah7, bh7)) | 0; - lo = (lo + Math.imul(al6, bl8)) | 0; - mid = (mid + Math.imul(al6, bh8)) | 0; - mid = (mid + Math.imul(ah6, bl8)) | 0; - hi = (hi + Math.imul(ah6, bh8)) | 0; - lo = (lo + Math.imul(al5, bl9)) | 0; - mid = (mid + Math.imul(al5, bh9)) | 0; - mid = (mid + Math.imul(ah5, bl9)) | 0; - hi = (hi + Math.imul(ah5, bh9)) | 0; - var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; - w14 &= 0x3ffffff; - /* k = 15 */ - lo = Math.imul(al9, bl6); - mid = Math.imul(al9, bh6); - mid = (mid + Math.imul(ah9, bl6)) | 0; - hi = Math.imul(ah9, bh6); - lo = (lo + Math.imul(al8, bl7)) | 0; - mid = (mid + Math.imul(al8, bh7)) | 0; - mid = (mid + Math.imul(ah8, bl7)) | 0; - hi = (hi + Math.imul(ah8, bh7)) | 0; - lo = (lo + Math.imul(al7, bl8)) | 0; - mid = (mid + Math.imul(al7, bh8)) | 0; - mid = (mid + Math.imul(ah7, bl8)) | 0; - hi = (hi + Math.imul(ah7, bh8)) | 0; - lo = (lo + Math.imul(al6, bl9)) | 0; - mid = (mid + Math.imul(al6, bh9)) | 0; - mid = (mid + Math.imul(ah6, bl9)) | 0; - hi = (hi + Math.imul(ah6, bh9)) | 0; - var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; - w15 &= 0x3ffffff; - /* k = 16 */ - lo = Math.imul(al9, bl7); - mid = Math.imul(al9, bh7); - mid = (mid + Math.imul(ah9, bl7)) | 0; - hi = Math.imul(ah9, bh7); - lo = (lo + Math.imul(al8, bl8)) | 0; - mid = (mid + Math.imul(al8, bh8)) | 0; - mid = (mid + Math.imul(ah8, bl8)) | 0; - hi = (hi + Math.imul(ah8, bh8)) | 0; - lo = (lo + Math.imul(al7, bl9)) | 0; - mid = (mid + Math.imul(al7, bh9)) | 0; - mid = (mid + Math.imul(ah7, bl9)) | 0; - hi = (hi + Math.imul(ah7, bh9)) | 0; - var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; - w16 &= 0x3ffffff; - /* k = 17 */ - lo = Math.imul(al9, bl8); - mid = Math.imul(al9, bh8); - mid = (mid + Math.imul(ah9, bl8)) | 0; - hi = Math.imul(ah9, bh8); - lo = (lo + Math.imul(al8, bl9)) | 0; - mid = (mid + Math.imul(al8, bh9)) | 0; - mid = (mid + Math.imul(ah8, bl9)) | 0; - hi = (hi + Math.imul(ah8, bh9)) | 0; - var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; - w17 &= 0x3ffffff; - /* k = 18 */ - lo = Math.imul(al9, bl9); - mid = Math.imul(al9, bh9); - mid = (mid + Math.imul(ah9, bl9)) | 0; - hi = Math.imul(ah9, bh9); - var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; - w18 &= 0x3ffffff; - o[0] = w0; - o[1] = w1; - o[2] = w2; - o[3] = w3; - o[4] = w4; - o[5] = w5; - o[6] = w6; - o[7] = w7; - o[8] = w8; - o[9] = w9; - o[10] = w10; - o[11] = w11; - o[12] = w12; - o[13] = w13; - o[14] = w14; - o[15] = w15; - o[16] = w16; - o[17] = w17; - o[18] = w18; - if (c !== 0) { - o[19] = c; - out.length++; - } - return out; - }; +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 - // Polyfill comb - if (!Math.imul) { - comb10MulTo = smallMulTo; +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() } - function bigMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - out.length = self.length + num.length; - - var carry = 0; - var hncarry = 0; - for (var k = 0; k < out.length - 1; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = hncarry; - hncarry = 0; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = k - j; - var a = self.words[i] | 0; - var b = num.words[j] | 0; - var r = a * b; + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} - var lo = r & 0x3ffffff; - ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; - lo = (lo + rword) | 0; - rword = lo & 0x3ffffff; - ncarry = (ncarry + (lo >>> 26)) | 0; - - hncarry += ncarry >>> 26; - ncarry &= 0x3ffffff; - } - out.words[k] = rword; - carry = ncarry; - ncarry = hncarry; - } - if (carry !== 0) { - out.words[k] = carry; - } else { - out.length--; - } +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) - return out.strip(); + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) } + return ret +} - function jumboMulTo (self, num, out) { - var fftm = new FFTM(); - return fftm.mulp(self, num, out); - } +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) - BN.prototype.mulTo = function mulTo (num, out) { - var res; - var len = this.length + num.length; - if (this.length === 10 && num.length === 10) { - res = comb10MulTo(this, num, out); - } else if (len < 63) { - res = smallMulTo(this, num, out); - } else if (len < 1024) { - res = bigMulTo(this, num, out); - } else { - res = jumboMulTo(this, num, out); - } + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} - return res; - }; +function hexSlice (buf, start, end) { + var len = buf.length - // Cooley-Tukey algorithm for FFT - // slightly revisited to rely on looping instead of recursion + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len - function FFTM (x, y) { - this.x = x; - this.y = y; + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) } + return out +} - FFTM.prototype.makeRBT = function makeRBT (N) { - var t = new Array(N); - var l = BN.prototype._countBits(N) - 1; - for (var i = 0; i < N; i++) { - t[i] = this.revBin(i, l, N); - } +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} - return t; - }; +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end - // Returns binary-reversed representation of `x` - FFTM.prototype.revBin = function revBin (x, l, N) { - if (x === 0 || x === N - 1) return x; + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } - var rb = 0; - for (var i = 0; i < l; i++) { - rb |= (x & 1) << (l - i - 1); - x >>= 1; - } + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } - return rb; - }; + if (end < start) end = start - // Performs "tweedling" phase, therefore 'emulating' - // behaviour of the recursive algorithm - FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { - for (var i = 0; i < N; i++) { - rtws[i] = rws[rbt[i]]; - itws[i] = iws[rbt[i]]; + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end) + newBuf.__proto__ = Buffer.prototype + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start] } - }; - - FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); + } - for (var s = 1; s < N; s <<= 1) { - var l = s << 1; + return newBuf +} - var rtwdf = Math.cos(2 * Math.PI / l); - var itwdf = Math.sin(2 * Math.PI / l); +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} - for (var p = 0; p < N; p += l) { - var rtwdf_ = rtwdf; - var itwdf_ = itwdf; +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) - for (var j = 0; j < s; j++) { - var re = rtws[p + j]; - var ie = itws[p + j]; + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } - var ro = rtws[p + j + s]; - var io = itws[p + j + s]; + return val +} - var rx = rtwdf_ * ro - itwdf_ * io; +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } - io = rtwdf_ * io + itwdf_ * ro; - ro = rx; + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } - rtws[p + j] = re + ro; - itws[p + j] = ie + io; + return val +} - rtws[p + j + s] = re - ro; - itws[p + j + s] = ie - io; +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} - /* jshint maxdepth : false */ - if (j !== l) { - rx = rtwdf * rtwdf_ - itwdf * itwdf_; +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} - itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; - rtwdf_ = rx; - } - } - } - } - }; +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} - FFTM.prototype.guessLen13b = function guessLen13b (n, m) { - var N = Math.max(m, n) | 1; - var odd = N & 1; - var i = 0; - for (N = N / 2 | 0; N; N = N >>> 1) { - i++; - } +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - return 1 << i + 1 + odd; - }; + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} - FFTM.prototype.conjugate = function conjugate (rws, iws, N) { - if (N <= 1) return; +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - for (var i = 0; i < N / 2; i++) { - var t = rws[i]; + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} - rws[i] = rws[N - i - 1]; - rws[N - i - 1] = t; +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) - t = iws[i]; + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 - iws[i] = -iws[N - i - 1]; - iws[N - i - 1] = -t; - } - }; + if (val >= mul) val -= Math.pow(2, 8 * byteLength) - FFTM.prototype.normalize13b = function normalize13b (ws, N) { - var carry = 0; - for (var i = 0; i < N / 2; i++) { - var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + - Math.round(ws[2 * i] / N) + - carry; + return val +} - ws[i] = w & 0x3ffffff; +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) - if (w < 0x4000000) { - carry = 0; - } else { - carry = w / 0x4000000 | 0; - } - } + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 - return ws; - }; + if (val >= mul) val -= Math.pow(2, 8 * byteLength) - FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { - var carry = 0; - for (var i = 0; i < len; i++) { - carry = carry + (ws[i] | 0); + return val +} - rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; - rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; - } +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} - // Pad with zeroes - for (i = 2 * len; i < N; ++i) { - rws[i] = 0; - } +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} - assert(carry === 0); - assert((carry & ~0x1fff) === 0); - }; +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} - FFTM.prototype.stub = function stub (N) { - var ph = new Array(N); - for (var i = 0; i < N; i++) { - ph[i] = 0; - } +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - return ph; - }; + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} - FFTM.prototype.mulp = function mulp (x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length); +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - var rbt = this.makeRBT(N); + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} - var _ = this.stub(N); +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} - var rws = new Array(N); - var rwst = new Array(N); - var iwst = new Array(N); +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} - var nrws = new Array(N); - var nrwst = new Array(N); - var niwst = new Array(N); +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} - var rmws = out.words; - rmws.length = N; +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} - this.convert13b(x.words, x.length, rws, N); - this.convert13b(y.words, y.length, nrws, N); +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} - this.transform(rws, _, rwst, iwst, N, rbt); - this.transform(nrws, _, nrwst, niwst, N, rbt); +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } - for (var i = 0; i < N; i++) { - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; - rwst[i] = rx; - } + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } - this.conjugate(rwst, iwst, N); - this.transform(rwst, iwst, rmws, _, N, rbt); - this.conjugate(rmws, _, N); - this.normalize13b(rmws, N); + return offset + byteLength +} - out.negative = x.negative ^ y.negative; - out.length = x.length + y.length; - return out.strip(); - }; +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } - // Multiply `this` by `num` - BN.prototype.mul = function mul (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return this.mulTo(num, out); - }; + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } - // Multiply employing FFT - BN.prototype.mulf = function mulf (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return jumboMulTo(this, num, out); - }; + return offset + byteLength +} - // In-place Multiplication - BN.prototype.imul = function imul (num) { - return this.clone().mulTo(num, this); - }; +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} - BN.prototype.imuln = function imuln (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} - // Carry - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = (this.words[i] | 0) * num; - var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); - carry >>= 26; - carry += (w / 0x4000000) | 0; - // NOTE: lo is 27bit maximum - carry += lo >>> 26; - this.words[i] = lo & 0x3ffffff; - } +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} - return this; - }; +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} - BN.prototype.muln = function muln (num) { - return this.clone().imuln(num); - }; +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} - // `this` * `this` - BN.prototype.sqr = function sqr () { - return this.mul(this); - }; - - // `this` * `this` in-place - BN.prototype.isqr = function isqr () { - return this.imul(this.clone()); - }; - - // Math.pow(`this`, `num`) - BN.prototype.pow = function pow (num) { - var w = toBitArray(num); - if (w.length === 0) return new BN(1); +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} - // Skip leading zeroes - var res = this; - for (var i = 0; i < w.length; i++, res = res.sqr()) { - if (w[i] !== 0) break; - } +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) - if (++i < w.length) { - for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { - if (w[i] === 0) continue; + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } - res = res.mul(q); - } + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } - return res; - }; - - // Shift-left in-place - BN.prototype.iushln = function iushln (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); - var i; + return offset + byteLength +} - if (r !== 0) { - var carry = 0; +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) - for (i = 0; i < this.length; i++) { - var newCarry = this.words[i] & carryMask; - var c = ((this.words[i] | 0) - newCarry) << r; - this.words[i] = c | carry; - carry = newCarry >>> (26 - r); - } + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } - if (carry) { - this.words[i] = carry; - this.length++; - } + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } - if (s !== 0) { - for (i = this.length - 1; i >= 0; i--) { - this.words[i + s] = this.words[i]; - } + return offset + byteLength +} - for (i = 0; i < s; i++) { - this.words[i] = 0; - } +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} - this.length += s; - } +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} - return this.strip(); - }; +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} - BN.prototype.ishln = function ishln (bits) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushln(bits); - }; +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} - // Shift-right in-place - // NOTE: `hint` is a lowest bit before trailing zeroes - // NOTE: if `extended` is present - it will be filled with destroyed bits - BN.prototype.iushrn = function iushrn (bits, hint, extended) { - assert(typeof bits === 'number' && bits >= 0); - var h; - if (hint) { - h = (hint - (hint % 26)) / 26; - } else { - h = 0; - } +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} - var r = bits % 26; - var s = Math.min((bits - r) / 26, this.length); - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - var maskedWords = extended; +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} - h -= s; - h = Math.max(0, h); +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} - // Extended mode, copy masked part - if (maskedWords) { - for (var i = 0; i < s; i++) { - maskedWords.words[i] = this.words[i]; - } - maskedWords.length = s; - } +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} - if (s === 0) { - // No-op, we should not move anything at all - } else if (this.length > s) { - this.length -= s; - for (i = 0; i < this.length; i++) { - this.words[i] = this.words[i + s]; - } - } else { - this.words[0] = 0; - this.length = 1; - } +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} - var carry = 0; - for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { - var word = this.words[i] | 0; - this.words[i] = (carry << (26 - r)) | (word >>> r); - carry = word & mask; - } +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} - // Push carried bits as a mask - if (maskedWords && carry !== 0) { - maskedWords.words[maskedWords.length++] = carry; - } +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} - if (this.length === 0) { - this.words[0] = 0; - this.length = 1; - } +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} - return this.strip(); - }; +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start - BN.prototype.ishrn = function ishrn (bits, hint, extended) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushrn(bits, hint, extended); - }; + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 - // Shift-left - BN.prototype.shln = function shln (bits) { - return this.clone().ishln(bits); - }; + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') - BN.prototype.ushln = function ushln (bits) { - return this.clone().iushln(bits); - }; + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } - // Shift-right - BN.prototype.shrn = function shrn (bits) { - return this.clone().ishrn(bits); - }; + var len = end - start + var i - BN.prototype.ushrn = function ushrn (bits) { - return this.clone().iushrn(bits); - }; + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) + } - // Test if n bit is set - BN.prototype.testn = function testn (bit) { - assert(typeof bit === 'number' && bit >= 0); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; + return len +} - // Fast case: bit is much higher than all existing words - if (this.length <= s) return false; +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if (code < 256) { + val = code + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255 + } - // Check bit and return - var w = this.words[s]; + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } - return !!(w & q); - }; + if (end <= start) { + return this + } - // Return only lowers bits of number (in-place) - BN.prototype.imaskn = function imaskn (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 - assert(this.negative === 0, 'imaskn works only with positive numbers'); + if (!val) val = 0 - if (this.length <= s) { - return this; + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val } - - if (r !== 0) { - s++; + } else { + var bytes = Buffer.isBuffer(val) + ? val + : utf8ToBytes(new Buffer(val, encoding).toString()) + var len = bytes.length + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] } - this.length = Math.min(s, this.length); + } - if (r !== 0) { - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - this.words[this.length - 1] &= mask; - } + return this +} - return this.strip(); - }; +// HELPER FUNCTIONS +// ================ - // Return only lowers bits of number - BN.prototype.maskn = function maskn (bits) { - return this.clone().imaskn(bits); - }; +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - // Add plain number `num` to `this` - BN.prototype.iaddn = function iaddn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.isubn(-num); +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} - // Possible sign change - if (this.negative !== 0) { - if (this.length === 1 && (this.words[0] | 0) < num) { - this.words[0] = num - (this.words[0] | 0); - this.negative = 0; - return this; - } +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} - this.negative = 0; - this.isubn(num); - this.negative = 1; - return this; - } +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} - // Add without checks - return this._iaddn(num); - }; +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] - BN.prototype._iaddn = function _iaddn (num) { - this.words[0] += num; + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) - // Carry - for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { - this.words[i] -= 0x4000000; - if (i === this.length - 1) { - this.words[i + 1] = 1; - } else { - this.words[i + 1]++; - } - } - this.length = Math.max(this.length, i + 1); + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } - return this; - }; + // valid lead + leadSurrogate = codePoint - // Subtract plain number `num` from `this` - BN.prototype.isubn = function isubn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.iaddn(-num); + continue + } - if (this.negative !== 0) { - this.negative = 0; - this.iaddn(num); - this.negative = 1; - return this; + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) } - this.words[0] -= num; + leadSurrogate = null - if (this.length === 1 && this.words[0] < 0) { - this.words[0] = -this.words[0]; - this.negative = 1; + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) } else { - // Carry - for (var i = 0; i < this.length && this.words[i] < 0; i++) { - this.words[i] += 0x4000000; - this.words[i + 1] -= 1; - } + throw new Error('Invalid code point') } + } - return this.strip(); - }; + return bytes +} - BN.prototype.addn = function addn (num) { - return this.clone().iaddn(num); - }; +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} - BN.prototype.subn = function subn (num) { - return this.clone().isubn(num); - }; +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break - BN.prototype.iabs = function iabs () { - this.negative = 0; + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } - return this; - }; + return byteArray +} - BN.prototype.abs = function abs () { - return this.clone().iabs(); - }; +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} - BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { - var len = num.length + shift; - var i; +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} - this._expand(len); +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} - var w; - var carry = 0; - for (i = 0; i < num.length; i++) { - w = (this.words[i + shift] | 0) + carry; - var right = (num.words[i] | 0) * mul; - w -= right & 0x3ffffff; - carry = (w >> 26) - ((right / 0x4000000) | 0); - this.words[i + shift] = w & 0x3ffffff; - } - for (; i < this.length - shift; i++) { - w = (this.words[i + shift] | 0) + carry; - carry = w >> 26; - this.words[i + shift] = w & 0x3ffffff; - } +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) - if (carry === 0) return this.strip(); +/***/ }), - // Subtraction overflow - assert(carry === -1); - carry = 0; - for (i = 0; i < this.length; i++) { - w = -(this.words[i] | 0) + carry; - carry = w >> 26; - this.words[i] = w & 0x3ffffff; - } - this.negative = 1; +/***/ "./node_modules/builtin-status-codes/browser.js": +/*!******************************************************!*\ + !*** ./node_modules/builtin-status-codes/browser.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - return this.strip(); - }; +module.exports = { + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} - BN.prototype._wordDiv = function _wordDiv (num, mode) { - var shift = this.length - num.length; - var a = this.clone(); - var b = num; +/***/ }), - // Normalize - var bhi = b.words[b.length - 1] | 0; - var bhiBits = this._countBits(bhi); - shift = 26 - bhiBits; - if (shift !== 0) { - b = b.ushln(shift); - a.iushln(shift); - bhi = b.words[b.length - 1] | 0; - } +/***/ "./node_modules/co/index.js": +/*!**********************************!*\ + !*** ./node_modules/co/index.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // Initialize quotient - var m = a.length - b.length; - var q; - if (mode !== 'mod') { - q = new BN(null); - q.length = m + 1; - q.words = new Array(q.length); - for (var i = 0; i < q.length; i++) { - q.words[i] = 0; - } - } +/** + * slice() reference. + */ - var diff = a.clone()._ishlnsubmul(b, 1, m); - if (diff.negative === 0) { - a = diff; - if (q) { - q.words[m] = 1; - } - } +var slice = Array.prototype.slice; - for (var j = m - 1; j >= 0; j--) { - var qj = (a.words[b.length + j] | 0) * 0x4000000 + - (a.words[b.length + j - 1] | 0); +/** + * Expose `co`. + */ - // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max - // (0x7ffffff) - qj = Math.min((qj / bhi) | 0, 0x3ffffff); +module.exports = co['default'] = co.co = co; - a._ishlnsubmul(b, qj, j); - while (a.negative !== 0) { - qj--; - a.negative = 0; - a._ishlnsubmul(b, 1, j); - if (!a.isZero()) { - a.negative ^= 1; - } - } - if (q) { - q.words[j] = qj; - } - } - if (q) { - q.strip(); - } - a.strip(); +/** + * Wrap the given generator `fn` into a + * function that returns a promise. + * This is a separate function so that + * every `co()` call doesn't create a new, + * unnecessary closure. + * + * @param {GeneratorFunction} fn + * @return {Function} + * @api public + */ - // Denormalize - if (mode !== 'div' && shift !== 0) { - a.iushrn(shift); - } +co.wrap = function (fn) { + createPromise.__generatorFunction__ = fn; + return createPromise; + function createPromise() { + return co.call(this, fn.apply(this, arguments)); + } +}; - return { - div: q || null, - mod: a - }; - }; +/** + * Execute the generator function or a generator + * and return a promise. + * + * @param {Function} fn + * @return {Promise} + * @api public + */ - // NOTE: 1) `mode` can be set to `mod` to request mod only, - // to `div` to request div only, or be absent to - // request both div & mod - // 2) `positive` is true if unsigned mod is requested - BN.prototype.divmod = function divmod (num, mode, positive) { - assert(!num.isZero()); +function co(gen) { + var ctx = this; + var args = slice.call(arguments, 1) - if (this.isZero()) { - return { - div: new BN(0), - mod: new BN(0) - }; - } + // we wrap everything in a promise to avoid promise chaining, + // which leads to memory leak errors. + // see https://github.com/tj/co/issues/180 + return new Promise(function(resolve, reject) { + if (typeof gen === 'function') gen = gen.apply(ctx, args); + if (!gen || typeof gen.next !== 'function') return resolve(gen); - var div, mod, res; - if (this.negative !== 0 && num.negative === 0) { - res = this.neg().divmod(num, mode); + onFulfilled(); - if (mode !== 'mod') { - div = res.div.neg(); - } + /** + * @param {Mixed} res + * @return {Promise} + * @api private + */ - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.iadd(num); - } + function onFulfilled(res) { + var ret; + try { + ret = gen.next(res); + } catch (e) { + return reject(e); } - - return { - div: div, - mod: mod - }; + next(ret); } - if (this.negative === 0 && num.negative !== 0) { - res = this.divmod(num.neg(), mode); + /** + * @param {Error} err + * @return {Promise} + * @api private + */ - if (mode !== 'mod') { - div = res.div.neg(); + function onRejected(err) { + var ret; + try { + ret = gen.throw(err); + } catch (e) { + return reject(e); } - - return { - div: div, - mod: res.mod - }; + next(ret); } - if ((this.negative & num.negative) !== 0) { - res = this.neg().divmod(num.neg(), mode); - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.isub(num); - } - } + /** + * Get the next value in the generator, + * return a promise. + * + * @param {Object} ret + * @return {Promise} + * @api private + */ - return { - div: res.div, - mod: mod - }; + function next(ret) { + if (ret.done) return resolve(ret.value); + var value = toPromise.call(ctx, ret.value); + if (value && isPromise(value)) return value.then(onFulfilled, onRejected); + return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, ' + + 'but the following object was passed: "' + String(ret.value) + '"')); } + }); +} - // Both numbers are positive at this point +/** + * Convert a `yield`ed value into a promise. + * + * @param {Mixed} obj + * @return {Promise} + * @api private + */ - // Strip both numbers to approximate shift value - if (num.length > this.length || this.cmp(num) < 0) { - return { - div: new BN(0), - mod: this - }; - } +function toPromise(obj) { + if (!obj) return obj; + if (isPromise(obj)) return obj; + if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj); + if ('function' == typeof obj) return thunkToPromise.call(this, obj); + if (Array.isArray(obj)) return arrayToPromise.call(this, obj); + if (isObject(obj)) return objectToPromise.call(this, obj); + return obj; +} - // Very short reduction - if (num.length === 1) { - if (mode === 'div') { - return { - div: this.divn(num.words[0]), - mod: null - }; - } +/** + * Convert a thunk to a promise. + * + * @param {Function} + * @return {Promise} + * @api private + */ - if (mode === 'mod') { - return { - div: null, - mod: new BN(this.modn(num.words[0])) - }; - } +function thunkToPromise(fn) { + var ctx = this; + return new Promise(function (resolve, reject) { + fn.call(ctx, function (err, res) { + if (err) return reject(err); + if (arguments.length > 2) res = slice.call(arguments, 1); + resolve(res); + }); + }); +} - return { - div: this.divn(num.words[0]), - mod: new BN(this.modn(num.words[0])) - }; - } +/** + * Convert an array of "yieldables" to a promise. + * Uses `Promise.all()` internally. + * + * @param {Array} obj + * @return {Promise} + * @api private + */ - return this._wordDiv(num, mode); - }; +function arrayToPromise(obj) { + return Promise.all(obj.map(toPromise, this)); +} - // Find `this` / `num` - BN.prototype.div = function div (num) { - return this.divmod(num, 'div', false).div; - }; +/** + * Convert an object of "yieldables" to a promise. + * Uses `Promise.all()` internally. + * + * @param {Object} obj + * @return {Promise} + * @api private + */ - // Find `this` % `num` - BN.prototype.mod = function mod (num) { - return this.divmod(num, 'mod', false).mod; - }; +function objectToPromise(obj){ + var results = new obj.constructor(); + var keys = Object.keys(obj); + var promises = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var promise = toPromise.call(this, obj[key]); + if (promise && isPromise(promise)) defer(promise, key); + else results[key] = obj[key]; + } + return Promise.all(promises).then(function () { + return results; + }); - BN.prototype.umod = function umod (num) { - return this.divmod(num, 'mod', true).mod; - }; + function defer(promise, key) { + // predefine the key in the result + results[key] = undefined; + promises.push(promise.then(function (res) { + results[key] = res; + })); + } +} - // Find Round(`this` / `num`) - BN.prototype.divRound = function divRound (num) { - var dm = this.divmod(num); +/** + * Check if `obj` is a promise. + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ - // Fast case - exact division - if (dm.mod.isZero()) return dm.div; +function isPromise(obj) { + return 'function' == typeof obj.then; +} - var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; +/** + * Check if `obj` is a generator. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ - var half = num.ushrn(1); - var r2 = num.andln(1); - var cmp = mod.cmp(half); +function isGenerator(obj) { + return 'function' == typeof obj.next && 'function' == typeof obj.throw; +} - // Round down - if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; +/** + * Check if `obj` is a generator function. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ +function isGeneratorFunction(obj) { + var constructor = obj.constructor; + if (!constructor) return false; + if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true; + return isGenerator(constructor.prototype); +} - // Round up - return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); - }; +/** + * Check for plain object. + * + * @param {Mixed} val + * @return {Boolean} + * @api private + */ - BN.prototype.modn = function modn (num) { - assert(num <= 0x3ffffff); - var p = (1 << 26) % num; +function isObject(val) { + return Object == val.constructor; +} - var acc = 0; - for (var i = this.length - 1; i >= 0; i--) { - acc = (p * acc + (this.words[i] | 0)) % num; - } - return acc; - }; +/***/ }), - // In-place division by number - BN.prototype.idivn = function idivn (num) { - assert(num <= 0x3ffffff); +/***/ "./node_modules/cookiejar/cookiejar.js": +/*!*********************************************!*\ + !*** ./node_modules/cookiejar/cookiejar.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - var carry = 0; - for (var i = this.length - 1; i >= 0; i--) { - var w = (this.words[i] | 0) + carry * 0x4000000; - this.words[i] = (w / num) | 0; - carry = w % num; +/* jshint node: true */ +(function () { + "use strict"; + + function CookieAccessInfo(domain, path, secure, script) { + if (this instanceof CookieAccessInfo) { + this.domain = domain || undefined; + this.path = path || "/"; + this.secure = !!secure; + this.script = !!script; + return this; + } + return new CookieAccessInfo(domain, path, secure, script); } + CookieAccessInfo.All = Object.freeze(Object.create(null)); + exports.CookieAccessInfo = CookieAccessInfo; - return this.strip(); - }; + function Cookie(cookiestr, request_domain, request_path) { + if (cookiestr instanceof Cookie) { + return cookiestr; + } + if (this instanceof Cookie) { + this.name = null; + this.value = null; + this.expiration_date = Infinity; + this.path = String(request_path || "/"); + this.explicit_path = false; + this.domain = request_domain || null; + this.explicit_domain = false; + this.secure = false; //how to define default? + this.noscript = false; //httponly + if (cookiestr) { + this.parse(cookiestr, request_domain, request_path); + } + return this; + } + return new Cookie(cookiestr, request_domain, request_path); + } + exports.Cookie = Cookie; - BN.prototype.divn = function divn (num) { - return this.clone().idivn(num); - }; + Cookie.prototype.toString = function toString() { + var str = [this.name + "=" + this.value]; + if (this.expiration_date !== Infinity) { + str.push("expires=" + (new Date(this.expiration_date)).toGMTString()); + } + if (this.domain) { + str.push("domain=" + this.domain); + } + if (this.path) { + str.push("path=" + this.path); + } + if (this.secure) { + str.push("secure"); + } + if (this.noscript) { + str.push("httponly"); + } + return str.join("; "); + }; - BN.prototype.egcd = function egcd (p) { - assert(p.negative === 0); - assert(!p.isZero()); + Cookie.prototype.toValueString = function toValueString() { + return this.name + "=" + this.value; + }; - var x = this; - var y = p.clone(); + var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g; + Cookie.prototype.parse = function parse(str, request_domain, request_path) { + if (this instanceof Cookie) { + var parts = str.split(";").filter(function (value) { + return !!value; + }); + var i; - if (x.negative !== 0) { - x = x.umod(p); - } else { - x = x.clone(); - } + var pair = parts[0].match(/([^=]+)=([\s\S]*)/); + if (!pair) { + console.warn("Invalid cookie header encountered. Header: '"+str+"'"); + return; + } - // A * x + B * y = x - var A = new BN(1); - var B = new BN(0); + var key = pair[1]; + var value = pair[2]; + if ( typeof key !== 'string' || key.length === 0 || typeof value !== 'string' ) { + console.warn("Unable to extract values from cookie header. Cookie: '"+str+"'"); + return; + } - // C * x + D * y = y - var C = new BN(0); - var D = new BN(1); + this.name = key; + this.value = value; - var g = 0; + for (i = 1; i < parts.length; i += 1) { + pair = parts[i].match(/([^=]+)(?:=([\s\S]*))?/); + key = pair[1].trim().toLowerCase(); + value = pair[2]; + switch (key) { + case "httponly": + this.noscript = true; + break; + case "expires": + this.expiration_date = value ? + Number(Date.parse(value)) : + Infinity; + break; + case "path": + this.path = value ? + value.trim() : + ""; + this.explicit_path = true; + break; + case "domain": + this.domain = value ? + value.trim() : + ""; + this.explicit_domain = !!this.domain; + break; + case "secure": + this.secure = true; + break; + } + } - while (x.isEven() && y.isEven()) { - x.iushrn(1); - y.iushrn(1); - ++g; - } + if (!this.explicit_path) { + this.path = request_path || "/"; + } + if (!this.explicit_domain) { + this.domain = request_domain; + } - var yp = y.clone(); - var xp = x.clone(); + return this; + } + return new Cookie().parse(str, request_domain, request_path); + }; - while (!x.isZero()) { - for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - x.iushrn(i); - while (i-- > 0) { - if (A.isOdd() || B.isOdd()) { - A.iadd(yp); - B.isub(xp); - } + Cookie.prototype.matches = function matches(access_info) { + if (access_info === CookieAccessInfo.All) { + return true; + } + if (this.noscript && access_info.script || + this.secure && !access_info.secure || + !this.collidesWith(access_info)) { + return false; + } + return true; + }; - A.iushrn(1); - B.iushrn(1); + Cookie.prototype.collidesWith = function collidesWith(access_info) { + if ((this.path && !access_info.path) || (this.domain && !access_info.domain)) { + return false; } - } + if (this.path && access_info.path.indexOf(this.path) !== 0) { + return false; + } + if (this.explicit_path && access_info.path.indexOf( this.path ) !== 0) { + return false; + } + var access_domain = access_info.domain && access_info.domain.replace(/^[\.]/,''); + var cookie_domain = this.domain && this.domain.replace(/^[\.]/,''); + if (cookie_domain === access_domain) { + return true; + } + if (cookie_domain) { + if (!this.explicit_domain) { + return false; // we already checked if the domains were exactly the same + } + var wildcard = access_domain.indexOf(cookie_domain); + if (wildcard === -1 || wildcard !== access_domain.length - cookie_domain.length) { + return false; + } + return true; + } + return true; + }; - for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - y.iushrn(j); - while (j-- > 0) { - if (C.isOdd() || D.isOdd()) { - C.iadd(yp); - D.isub(xp); - } + function CookieJar() { + var cookies, cookies_list, collidable_cookie; + if (this instanceof CookieJar) { + cookies = Object.create(null); //name: [Cookie] - C.iushrn(1); - D.iushrn(1); - } - } + this.setCookie = function setCookie(cookie, request_domain, request_path) { + var remove, i; + cookie = new Cookie(cookie, request_domain, request_path); + //Delete the cookie if the set is past the current time + remove = cookie.expiration_date <= Date.now(); + if (cookies[cookie.name] !== undefined) { + cookies_list = cookies[cookie.name]; + for (i = 0; i < cookies_list.length; i += 1) { + collidable_cookie = cookies_list[i]; + if (collidable_cookie.collidesWith(cookie)) { + if (remove) { + cookies_list.splice(i, 1); + if (cookies_list.length === 0) { + delete cookies[cookie.name]; + } + return false; + } + cookies_list[i] = cookie; + return cookie; + } + } + if (remove) { + return false; + } + cookies_list.push(cookie); + return cookie; + } + if (remove) { + return false; + } + cookies[cookie.name] = [cookie]; + return cookies[cookie.name]; + }; + //returns a cookie + this.getCookie = function getCookie(cookie_name, access_info) { + var cookie, i; + cookies_list = cookies[cookie_name]; + if (!cookies_list) { + return; + } + for (i = 0; i < cookies_list.length; i += 1) { + cookie = cookies_list[i]; + if (cookie.expiration_date <= Date.now()) { + if (cookies_list.length === 0) { + delete cookies[cookie.name]; + } + continue; + } - if (x.cmp(y) >= 0) { - x.isub(y); - A.isub(C); - B.isub(D); - } else { - y.isub(x); - C.isub(A); - D.isub(B); - } + if (cookie.matches(access_info)) { + return cookie; + } + } + }; + //returns a list of cookies + this.getCookies = function getCookies(access_info) { + var matches = [], cookie_name, cookie; + for (cookie_name in cookies) { + cookie = this.getCookie(cookie_name, access_info); + if (cookie) { + matches.push(cookie); + } + } + matches.toString = function toString() { + return matches.join(":"); + }; + matches.toValueString = function toValueString() { + return matches.map(function (c) { + return c.toValueString(); + }).join(';'); + }; + return matches; + }; + + return this; + } + return new CookieJar(); } + exports.CookieJar = CookieJar; - return { - a: C, - b: D, - gcd: y.iushln(g) + //returns list of cookies that were set correctly. Cookies that are expired and removed are not returned. + CookieJar.prototype.setCookies = function setCookies(cookies, request_domain, request_path) { + cookies = Array.isArray(cookies) ? + cookies : + cookies.split(cookie_str_splitter); + var successful = [], + i, + cookie; + cookies = cookies.map(function(item){ + return new Cookie(item, request_domain, request_path); + }); + for (i = 0; i < cookies.length; i += 1) { + cookie = cookies[i]; + if (this.setCookie(cookie, request_domain, request_path)) { + successful.push(cookie); + } + } + return successful; }; - }; +}()); - // This is reduced incarnation of the binary EEA - // above, designated to invert members of the - // _prime_ fields F(p) at a maximal speed - BN.prototype._invmp = function _invmp (p) { - assert(p.negative === 0); - assert(!p.isZero()); - var a = this; - var b = p.clone(); +/***/ }), - if (a.negative !== 0) { - a = a.umod(p); - } else { - a = a.clone(); - } +/***/ "./node_modules/core-js/library/fn/array/from.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/fn/array/from.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var x1 = new BN(1); - var x2 = new BN(0); +__webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); +__webpack_require__(/*! ../../modules/es6.array.from */ "./node_modules/core-js/library/modules/es6.array.from.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Array.from; - var delta = b.clone(); - while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { - for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - a.iushrn(i); - while (i-- > 0) { - if (x1.isOdd()) { - x1.iadd(delta); - } +/***/ }), - x1.iushrn(1); - } - } +/***/ "./node_modules/core-js/library/fn/get-iterator.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/fn/get-iterator.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - b.iushrn(j); - while (j-- > 0) { - if (x2.isOdd()) { - x2.iadd(delta); - } +__webpack_require__(/*! ../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); +__webpack_require__(/*! ../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); +module.exports = __webpack_require__(/*! ../modules/core.get-iterator */ "./node_modules/core-js/library/modules/core.get-iterator.js"); - x2.iushrn(1); - } - } - if (a.cmp(b) >= 0) { - a.isub(b); - x1.isub(x2); - } else { - b.isub(a); - x2.isub(x1); - } - } +/***/ }), - var res; - if (a.cmpn(1) === 0) { - res = x1; - } else { - res = x2; - } +/***/ "./node_modules/core-js/library/fn/is-iterable.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/library/fn/is-iterable.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (res.cmpn(0) < 0) { - res.iadd(p); - } +__webpack_require__(/*! ../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); +__webpack_require__(/*! ../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); +module.exports = __webpack_require__(/*! ../modules/core.is-iterable */ "./node_modules/core-js/library/modules/core.is-iterable.js"); - return res; - }; - BN.prototype.gcd = function gcd (num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); +/***/ }), - var a = this.clone(); - var b = num.clone(); - a.negative = 0; - b.negative = 0; +/***/ "./node_modules/core-js/library/fn/json/stringify.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/library/fn/json/stringify.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Remove common factor of two - for (var shift = 0; a.isEven() && b.isEven(); shift++) { - a.iushrn(1); - b.iushrn(1); - } +var core = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js"); +var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); +module.exports = function stringify(it) { // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; - do { - while (a.isEven()) { - a.iushrn(1); - } - while (b.isEven()) { - b.iushrn(1); - } - var r = a.cmp(b); - if (r < 0) { - // Swap `a` and `b` to make `a` always bigger than `b` - var t = a; - a = b; - b = t; - } else if (r === 0 || b.cmpn(1) === 0) { - break; - } +/***/ }), - a.isub(b); - } while (true); +/***/ "./node_modules/core-js/library/fn/object/assign.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/assign.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return b.iushln(shift); - }; +__webpack_require__(/*! ../../modules/es6.object.assign */ "./node_modules/core-js/library/modules/es6.object.assign.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.assign; - // Invert number in the field F(num) - BN.prototype.invm = function invm (num) { - return this.egcd(num).a.umod(num); - }; - BN.prototype.isEven = function isEven () { - return (this.words[0] & 1) === 0; - }; +/***/ }), - BN.prototype.isOdd = function isOdd () { - return (this.words[0] & 1) === 1; - }; +/***/ "./node_modules/core-js/library/fn/object/create.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/create.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // And first word and num - BN.prototype.andln = function andln (num) { - return this.words[0] & num; - }; +__webpack_require__(/*! ../../modules/es6.object.create */ "./node_modules/core-js/library/modules/es6.object.create.js"); +var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object; +module.exports = function create(P, D) { + return $Object.create(P, D); +}; - // Increment at the bit position in-line - BN.prototype.bincn = function bincn (bit) { - assert(typeof bit === 'number'); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - // Fast case: bit is much higher than all existing words - if (this.length <= s) { - this._expand(s + 1); - this.words[s] |= q; - return this; - } +/***/ }), - // Add bit and propagate, if needed - var carry = q; - for (var i = s; carry !== 0 && i < this.length; i++) { - var w = this.words[i] | 0; - w += carry; - carry = w >>> 26; - w &= 0x3ffffff; - this.words[i] = w; - } - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - return this; - }; +/***/ "./node_modules/core-js/library/fn/object/define-property.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/define-property.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - BN.prototype.isZero = function isZero () { - return this.length === 1 && this.words[0] === 0; - }; +__webpack_require__(/*! ../../modules/es6.object.define-property */ "./node_modules/core-js/library/modules/es6.object.define-property.js"); +var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; - BN.prototype.cmpn = function cmpn (num) { - var negative = num < 0; - if (this.negative !== 0 && !negative) return -1; - if (this.negative === 0 && negative) return 1; +/***/ }), - this.strip(); +/***/ "./node_modules/core-js/library/fn/object/get-prototype-of.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/get-prototype-of.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var res; - if (this.length > 1) { - res = 1; - } else { - if (negative) { - num = -num; - } +__webpack_require__(/*! ../../modules/es6.object.get-prototype-of */ "./node_modules/core-js/library/modules/es6.object.get-prototype-of.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.getPrototypeOf; - assert(num <= 0x3ffffff, 'Number is too big'); - var w = this.words[0] | 0; - res = w === num ? 0 : w < num ? -1 : 1; - } - if (this.negative !== 0) return -res | 0; - return res; - }; +/***/ }), - // Compare two numbers and return: - // 1 - if `this` > `num` - // 0 - if `this` == `num` - // -1 - if `this` < `num` - BN.prototype.cmp = function cmp (num) { - if (this.negative !== 0 && num.negative === 0) return -1; - if (this.negative === 0 && num.negative !== 0) return 1; +/***/ "./node_modules/core-js/library/fn/object/keys.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/keys.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var res = this.ucmp(num); - if (this.negative !== 0) return -res | 0; - return res; - }; +__webpack_require__(/*! ../../modules/es6.object.keys */ "./node_modules/core-js/library/modules/es6.object.keys.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.keys; - // Unsigned comparison - BN.prototype.ucmp = function ucmp (num) { - // At this point both numbers have the same sign - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - var res = 0; - for (var i = this.length - 1; i >= 0; i--) { - var a = this.words[i] | 0; - var b = num.words[i] | 0; +/***/ }), - if (a === b) continue; - if (a < b) { - res = -1; - } else if (a > b) { - res = 1; - } - break; - } - return res; - }; +/***/ "./node_modules/core-js/library/fn/object/set-prototype-of.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/set-prototype-of.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - BN.prototype.gtn = function gtn (num) { - return this.cmpn(num) === 1; - }; +__webpack_require__(/*! ../../modules/es6.object.set-prototype-of */ "./node_modules/core-js/library/modules/es6.object.set-prototype-of.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.setPrototypeOf; - BN.prototype.gt = function gt (num) { - return this.cmp(num) === 1; - }; - BN.prototype.gten = function gten (num) { - return this.cmpn(num) >= 0; - }; +/***/ }), - BN.prototype.gte = function gte (num) { - return this.cmp(num) >= 0; - }; +/***/ "./node_modules/core-js/library/fn/object/values.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/values.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - BN.prototype.ltn = function ltn (num) { - return this.cmpn(num) === -1; - }; +__webpack_require__(/*! ../../modules/es7.object.values */ "./node_modules/core-js/library/modules/es7.object.values.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.values; - BN.prototype.lt = function lt (num) { - return this.cmp(num) === -1; - }; - BN.prototype.lten = function lten (num) { - return this.cmpn(num) <= 0; - }; +/***/ }), - BN.prototype.lte = function lte (num) { - return this.cmp(num) <= 0; - }; +/***/ "./node_modules/core-js/library/fn/promise.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/library/fn/promise.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - BN.prototype.eqn = function eqn (num) { - return this.cmpn(num) === 0; - }; +__webpack_require__(/*! ../modules/es6.object.to-string */ "./node_modules/core-js/library/modules/es6.object.to-string.js"); +__webpack_require__(/*! ../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); +__webpack_require__(/*! ../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); +__webpack_require__(/*! ../modules/es6.promise */ "./node_modules/core-js/library/modules/es6.promise.js"); +__webpack_require__(/*! ../modules/es7.promise.finally */ "./node_modules/core-js/library/modules/es7.promise.finally.js"); +__webpack_require__(/*! ../modules/es7.promise.try */ "./node_modules/core-js/library/modules/es7.promise.try.js"); +module.exports = __webpack_require__(/*! ../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Promise; - BN.prototype.eq = function eq (num) { - return this.cmp(num) === 0; - }; - // - // A reduce context, could be using montgomery or something better, depending - // on the `m` itself. - // - BN.red = function red (num) { - return new Red(num); - }; +/***/ }), - BN.prototype.toRed = function toRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - assert(this.negative === 0, 'red works only with positives'); - return ctx.convertTo(this)._forceRed(ctx); - }; +/***/ "./node_modules/core-js/library/fn/symbol/index.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/fn/symbol/index.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - BN.prototype.fromRed = function fromRed () { - assert(this.red, 'fromRed works only with numbers in reduction context'); - return this.red.convertFrom(this); - }; +__webpack_require__(/*! ../../modules/es6.symbol */ "./node_modules/core-js/library/modules/es6.symbol.js"); +__webpack_require__(/*! ../../modules/es6.object.to-string */ "./node_modules/core-js/library/modules/es6.object.to-string.js"); +__webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ "./node_modules/core-js/library/modules/es7.symbol.async-iterator.js"); +__webpack_require__(/*! ../../modules/es7.symbol.observable */ "./node_modules/core-js/library/modules/es7.symbol.observable.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Symbol; - BN.prototype._forceRed = function _forceRed (ctx) { - this.red = ctx; - return this; - }; - BN.prototype.forceRed = function forceRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - return this._forceRed(ctx); - }; +/***/ }), - BN.prototype.redAdd = function redAdd (num) { - assert(this.red, 'redAdd works only with red numbers'); - return this.red.add(this, num); - }; +/***/ "./node_modules/core-js/library/fn/symbol/iterator.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/fn/symbol/iterator.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - BN.prototype.redIAdd = function redIAdd (num) { - assert(this.red, 'redIAdd works only with red numbers'); - return this.red.iadd(this, num); - }; +__webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); +__webpack_require__(/*! ../../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); +module.exports = __webpack_require__(/*! ../../modules/_wks-ext */ "./node_modules/core-js/library/modules/_wks-ext.js").f('iterator'); - BN.prototype.redSub = function redSub (num) { - assert(this.red, 'redSub works only with red numbers'); - return this.red.sub(this, num); - }; - BN.prototype.redISub = function redISub (num) { - assert(this.red, 'redISub works only with red numbers'); - return this.red.isub(this, num); - }; +/***/ }), - BN.prototype.redShl = function redShl (num) { - assert(this.red, 'redShl works only with red numbers'); - return this.red.shl(this, num); - }; +/***/ "./node_modules/core-js/library/modules/_a-function.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_a-function.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - BN.prototype.redMul = function redMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.mul(this, num); - }; +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; - BN.prototype.redIMul = function redIMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.imul(this, num); - }; - BN.prototype.redSqr = function redSqr () { - assert(this.red, 'redSqr works only with red numbers'); - this.red._verify1(this); - return this.red.sqr(this); - }; +/***/ }), - BN.prototype.redISqr = function redISqr () { - assert(this.red, 'redISqr works only with red numbers'); - this.red._verify1(this); - return this.red.isqr(this); - }; +/***/ "./node_modules/core-js/library/modules/_add-to-unscopables.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_add-to-unscopables.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // Square root over p - BN.prototype.redSqrt = function redSqrt () { - assert(this.red, 'redSqrt works only with red numbers'); - this.red._verify1(this); - return this.red.sqrt(this); - }; +module.exports = function () { /* empty */ }; - BN.prototype.redInvm = function redInvm () { - assert(this.red, 'redInvm works only with red numbers'); - this.red._verify1(this); - return this.red.invm(this); - }; - // Return negative clone of `this` % `red modulo` - BN.prototype.redNeg = function redNeg () { - assert(this.red, 'redNeg works only with red numbers'); - this.red._verify1(this); - return this.red.neg(this); - }; +/***/ }), - BN.prototype.redPow = function redPow (num) { - assert(this.red && !num.red, 'redPow(normalNum)'); - this.red._verify1(this); - return this.red.pow(this, num); - }; +/***/ "./node_modules/core-js/library/modules/_an-instance.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_an-instance.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // Prime numbers with efficient reduction - var primes = { - k256: null, - p224: null, - p192: null, - p25519: null - }; +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; - // Pseudo-Mersenne prime - function MPrime (name, p) { - // P = 2 ^ N - K - this.name = name; - this.p = new BN(p, 16); - this.n = this.p.bitLength(); - this.k = new BN(1).iushln(this.n).isub(this.p); - this.tmp = this._tmp(); - } +/***/ }), - MPrime.prototype._tmp = function _tmp () { - var tmp = new BN(null); - tmp.words = new Array(Math.ceil(this.n / 13)); - return tmp; - }; +/***/ "./node_modules/core-js/library/modules/_an-object.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_an-object.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - MPrime.prototype.ireduce = function ireduce (num) { - // Assumes that `num` is less than `P^2` - // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) - var r = num; - var rlen; +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; - do { - this.split(r, this.tmp); - r = this.imulK(r); - r = r.iadd(this.tmp); - rlen = r.bitLength(); - } while (rlen > this.n); - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - if (cmp === 0) { - r.words[0] = 0; - r.length = 1; - } else if (cmp > 0) { - r.isub(this.p); - } else { - r.strip(); - } +/***/ }), - return r; - }; +/***/ "./node_modules/core-js/library/modules/_array-includes.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_array-includes.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - MPrime.prototype.split = function split (input, out) { - input.iushrn(this.n, 0, out); +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js"); +var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/library/modules/_to-absolute-index.js"); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; }; +}; - MPrime.prototype.imulK = function imulK (num) { - return num.imul(this.k); - }; - function K256 () { - MPrime.call( - this, - 'k256', - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - inherits(K256, MPrime); +/***/ }), - K256.prototype.split = function split (input, output) { - // 256 = 9 * 26 + 22 - var mask = 0x3fffff; +/***/ "./node_modules/core-js/library/modules/_classof.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_classof.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var outLen = Math.min(input.length, 9); - for (var i = 0; i < outLen; i++) { - output.words[i] = input.words[i]; - } - output.length = outLen; +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js"); +var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; - if (input.length <= 9) { - input.words[0] = 0; - input.length = 1; - return; - } +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; - // Shift by 9 limbs - var prev = input.words[9]; - output.words[output.length++] = prev & mask; +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; - for (i = 10; i < input.length; i++) { - var next = input.words[i] | 0; - input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); - prev = next; - } - prev >>>= 22; - input.words[i - 10] = prev; - if (prev === 0 && input.length > 10) { - input.length -= 10; - } else { - input.length -= 9; - } - }; - K256.prototype.imulK = function imulK (num) { - // K = 0x1000003d1 = [ 0x40, 0x3d1 ] - num.words[num.length] = 0; - num.words[num.length + 1] = 0; - num.length += 2; - - // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 - var lo = 0; - for (var i = 0; i < num.length; i++) { - var w = num.words[i] | 0; - lo += w * 0x3d1; - num.words[i] = lo & 0x3ffffff; - lo = w * 0x40 + ((lo / 0x4000000) | 0); - } +/***/ }), - // Fast length reduction - if (num.words[num.length - 1] === 0) { - num.length--; - if (num.words[num.length - 1] === 0) { - num.length--; - } - } - return num; - }; +/***/ "./node_modules/core-js/library/modules/_cof.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_cof.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - function P224 () { - MPrime.call( - this, - 'p224', - 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - inherits(P224, MPrime); +var toString = {}.toString; - function P192 () { - MPrime.call( - this, - 'p192', - 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - inherits(P192, MPrime); +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; - function P25519 () { - // 2 ^ 255 - 19 - MPrime.call( - this, - '25519', - '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - inherits(P25519, MPrime); - P25519.prototype.imulK = function imulK (num) { - // K = 0x13 - var carry = 0; - for (var i = 0; i < num.length; i++) { - var hi = (num.words[i] | 0) * 0x13 + carry; - var lo = hi & 0x3ffffff; - hi >>>= 26; +/***/ }), - num.words[i] = lo; - carry = hi; - } - if (carry !== 0) { - num.words[num.length++] = carry; - } - return num; - }; +/***/ "./node_modules/core-js/library/modules/_core.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_core.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // Exported mostly for testing purposes, use plain name instead - BN._prime = function prime (name) { - // Cached version of prime - if (primes[name]) return primes[name]; +var core = module.exports = { version: '2.5.6' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - var prime; - if (name === 'k256') { - prime = new K256(); - } else if (name === 'p224') { - prime = new P224(); - } else if (name === 'p192') { - prime = new P192(); - } else if (name === 'p25519') { - prime = new P25519(); - } else { - throw new Error('Unknown prime ' + name); - } - primes[name] = prime; - return prime; - }; +/***/ }), - // - // Base reduction engine - // - function Red (m) { - if (typeof m === 'string') { - var prime = BN._prime(m); - this.m = prime.p; - this.prime = prime; - } else { - assert(m.gtn(1), 'modulus must be greater than 1'); - this.m = m; - this.prime = null; - } - } +/***/ "./node_modules/core-js/library/modules/_create-property.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_create-property.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - Red.prototype._verify1 = function _verify1 (a) { - assert(a.negative === 0, 'red works only with positives'); - assert(a.red, 'red works only with red numbers'); - }; +"use strict"; - Red.prototype._verify2 = function _verify2 (a, b) { - assert((a.negative | b.negative) === 0, 'red works only with positives'); - assert(a.red && a.red === b.red, - 'red works only with red numbers'); - }; +var $defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); - Red.prototype.imod = function imod (a) { - if (this.prime) return this.prime.ireduce(a)._forceRed(this); - return a.umod(this.m)._forceRed(this); - }; +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; - Red.prototype.neg = function neg (a) { - if (a.isZero()) { - return a.clone(); - } - return this.m.sub(a)._forceRed(this); - }; +/***/ }), - Red.prototype.add = function add (a, b) { - this._verify2(a, b); +/***/ "./node_modules/core-js/library/modules/_ctx.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_ctx.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var res = a.add(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res._forceRed(this); +// optional / simple context binding +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); }; +}; - Red.prototype.iadd = function iadd (a, b) { - this._verify2(a, b); - var res = a.iadd(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res; - }; +/***/ }), - Red.prototype.sub = function sub (a, b) { - this._verify2(a, b); +/***/ "./node_modules/core-js/library/modules/_defined.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_defined.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - var res = a.sub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res._forceRed(this); - }; +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; - Red.prototype.isub = function isub (a, b) { - this._verify2(a, b); - var res = a.isub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res; - }; +/***/ }), - Red.prototype.shl = function shl (a, num) { - this._verify1(a); - return this.imod(a.ushln(num)); - }; +/***/ "./node_modules/core-js/library/modules/_descriptors.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_descriptors.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - Red.prototype.imul = function imul (a, b) { - this._verify2(a, b); - return this.imod(a.imul(b)); - }; +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); - Red.prototype.mul = function mul (a, b) { - this._verify2(a, b); - return this.imod(a.mul(b)); - }; - Red.prototype.isqr = function isqr (a) { - return this.imul(a, a.clone()); - }; +/***/ }), - Red.prototype.sqr = function sqr (a) { - return this.mul(a, a); - }; +/***/ "./node_modules/core-js/library/modules/_dom-create.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_dom-create.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - Red.prototype.sqrt = function sqrt (a) { - if (a.isZero()) return a.clone(); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; - var mod3 = this.m.andln(3); - assert(mod3 % 2 === 1); - // Fast case - if (mod3 === 3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } +/***/ }), - // Tonelli-Shanks algorithm (Totally unoptimized and slow) - // - // Find Q and S, that Q * 2 ^ S = (P - 1) - var q = this.m.subn(1); - var s = 0; - while (!q.isZero() && q.andln(1) === 0) { - s++; - q.iushrn(1); - } - assert(!q.isZero()); +/***/ "./node_modules/core-js/library/modules/_enum-bug-keys.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_enum-bug-keys.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - var one = new BN(1).toRed(this); - var nOne = one.redNeg(); +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); - // Find quadratic non-residue - // NOTE: Max is such because of generalized Riemann hypothesis. - var lpow = this.m.subn(1).iushrn(1); - var z = this.m.bitLength(); - z = new BN(2 * z * z).toRed(this); - while (this.pow(z, lpow).cmp(nOne) !== 0) { - z.redIAdd(nOne); - } +/***/ }), - var c = this.pow(z, q); - var r = this.pow(a, q.addn(1).iushrn(1)); - var t = this.pow(a, q); - var m = s; - while (t.cmp(one) !== 0) { - var tmp = t; - for (var i = 0; tmp.cmp(one) !== 0; i++) { - tmp = tmp.redSqr(); - } - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); +/***/ "./node_modules/core-js/library/modules/_enum-keys.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_enum-keys.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - r = r.redMul(b); - c = b.redSqr(); - t = t.redMul(c); - m = i; - } +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); +var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/library/modules/_object-gops.js"); +var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js"); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; - return r; - }; - Red.prototype.invm = function invm (a) { - var inv = a._invmp(this.m); - if (inv.negative !== 0) { - inv.negative = 0; - return this.imod(inv).redNeg(); - } else { - return this.imod(inv); - } - }; +/***/ }), - Red.prototype.pow = function pow (a, num) { - if (num.isZero()) return new BN(1); - if (num.cmpn(1) === 0) return a.clone(); +/***/ "./node_modules/core-js/library/modules/_export.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_export.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var windowSize = 4; - var wnd = new Array(1 << windowSize); - wnd[0] = new BN(1).toRed(this); - wnd[1] = a; - for (var i = 2; i < wnd.length; i++) { - wnd[i] = this.mul(wnd[i - 1], a); - } +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var PROTOTYPE = 'prototype'; - var res = wnd[0]; - var current = 0; - var currentLen = 0; - var start = num.bitLength() % 26; - if (start === 0) { - start = 26; +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; - for (i = num.length - 1; i >= 0; i--) { - var word = num.words[i]; - for (var j = start - 1; j >= 0; j--) { - var bit = (word >> j) & 1; - if (res !== wnd[0]) { - res = this.sqr(res); - } - if (bit === 0 && current === 0) { - currentLen = 0; - continue; - } +/***/ }), - current <<= 1; - current |= bit; - currentLen++; - if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; +/***/ "./node_modules/core-js/library/modules/_fails.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_fails.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - res = this.mul(res, wnd[current]); - currentLen = 0; - current = 0; - } - start = 26; - } +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; - return res; - }; - Red.prototype.convertTo = function convertTo (num) { - var r = num.umod(this.m); +/***/ }), - return r === num ? r.clone() : r; - }; +/***/ "./node_modules/core-js/library/modules/_for-of.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_for-of.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - Red.prototype.convertFrom = function convertFrom (num) { - var res = num.clone(); - res.red = null; - return res; - }; +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/library/modules/_iter-call.js"); +var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/library/modules/_is-array-iter.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js"); +var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/library/modules/core.get-iterator-method.js"); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; - // - // Montgomery method engine - // - BN.mont = function mont (num) { - return new Mont(num); - }; - - function Mont (m) { - Red.call(this, m); - - this.shift = this.m.bitLength(); - if (this.shift % 26 !== 0) { - this.shift += 26 - (this.shift % 26); - } - - this.r = new BN(1).iushln(this.shift); - this.r2 = this.imod(this.r.sqr()); - this.rinv = this.r._invmp(this.m); - - this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); - this.minv = this.minv.umod(this.r); - this.minv = this.r.sub(this.minv); - } - inherits(Mont, Red); +/***/ }), - Mont.prototype.convertTo = function convertTo (num) { - return this.imod(num.ushln(this.shift)); - }; +/***/ "./node_modules/core-js/library/modules/_global.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_global.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - Mont.prototype.convertFrom = function convertFrom (num) { - var r = this.imod(num.mul(this.rinv)); - r.red = null; - return r; - }; +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - Mont.prototype.imul = function imul (a, b) { - if (a.isZero() || b.isZero()) { - a.words[0] = 0; - a.length = 1; - return a; - } - var t = a.imul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; +/***/ }), - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } +/***/ "./node_modules/core-js/library/modules/_has.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_has.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - return res._forceRed(this); - }; +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; - Mont.prototype.mul = function mul (a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - var t = a.mul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } +/***/ }), - return res._forceRed(this); - }; +/***/ "./node_modules/core-js/library/modules/_hide.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_hide.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - Mont.prototype.invm = function invm (a) { - // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R - var res = this.imod(a._invmp(this.m).mul(this.r2)); - return res._forceRed(this); - }; -})(typeof module === 'undefined' || module, this); +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); +module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/buffer/index.js": -/*!**************************************!*\ - !*** ./node_modules/buffer/index.js ***! - \**************************************/ +/***/ "./node_modules/core-js/library/modules/_html.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_html.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ +var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").document; +module.exports = document && document.documentElement; +/***/ }), -var base64 = __webpack_require__(/*! base64-js */ "./node_modules/base64-js/index.js") -var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/ieee754/index.js") -var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js") +/***/ "./node_modules/core-js/library/modules/_ie8-dom-define.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_ie8-dom-define.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 +module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { + return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7; +}); -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() +/***/ }), -/* - * Export kMaxLength after typed array support is determined. - */ -exports.kMaxLength = kMaxLength() +/***/ "./node_modules/core-js/library/modules/_invoke.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_invoke.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -function typedArraySupport () { - try { - var arr = new Uint8Array(1) - arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length) - } - that.length = length - } +/***/ }), - return that -} +/***/ "./node_modules/core-js/library/modules/_iobject.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iobject.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js"); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) -} +/***/ }), -Buffer.poolSize = 8192 // not used by this implementation +/***/ "./node_modules/core-js/library/modules/_is-array-iter.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_is-array-iter.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype - return arr -} +// check on default Array iterator +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var ArrayProto = Array.prototype; -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } +/***/ }), - return fromObject(that, value) -} +/***/ "./node_modules/core-js/library/modules/_is-array.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_is-array.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -} +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js"); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) { - // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true - }) - } -} -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } -} +/***/ }), -function alloc (that, size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} +/***/ "./node_modules/core-js/library/modules/_is-object.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_is-object.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -} +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; -function allocUnsafe (that, size) { - assertSize(size) - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0 - } - } - return that -} -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -} +/***/ }), -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } +/***/ "./node_modules/core-js/library/modules/_iter-call.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-call.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; } +}; - var length = byteLength(string, encoding) | 0 - that = createBuffer(that, length) - var actual = that.write(string, encoding) +/***/ }), - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual) - } +/***/ "./node_modules/core-js/library/modules/_iter-create.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-create.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return that -} +"use strict"; -function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - that = createBuffer(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} +var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/library/modules/_object-create.js"); +var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js"); +var IteratorPrototype = {}; -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength // this throws if `array` is not a valid ArrayBuffer +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'), function () { return this; }); - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array) - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset) - } else { - array = new Uint8Array(array, byteOffset, length) - } +/***/ }), - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array) - } - return that -} +/***/ "./node_modules/core-js/library/modules/_iter-define.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-define.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function fromObject (that, obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - that = createBuffer(that, len) +"use strict"; - if (that.length === 0) { - return that - } +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/library/modules/_redefine.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/library/modules/_iter-create.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js"); +var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/library/modules/_object-gpo.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; - obj.copy(that, 0, 0, len) - return that - } +var returnThis = function () { return this; }; - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); } - return Buffer.alloc(+length) -} + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } +/***/ }), - if (a === b) return 0 +/***/ "./node_modules/core-js/library/modules/_iter-detect.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-detect.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var x = a.length - var y = b.length +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var SAFE_CLOSING = false; - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } - if (x < y) return -1 - if (y < x) return 1 - return 0 -} +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} -Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } +/***/ }), - if (list.length === 0) { - return Buffer.alloc(0) - } +/***/ "./node_modules/core-js/library/modules/_iter-step.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-step.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string - } +/***/ }), - var len = string.length - if (len === 0) return 0 +/***/ "./node_modules/core-js/library/modules/_iterators.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iterators.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength +module.exports = {}; -function slowToString (encoding, start, end) { - var loweredCase = false - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. +/***/ }), - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } +/***/ "./node_modules/core-js/library/modules/_library.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_library.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - if (end === undefined || end > this.length) { - end = this.length - } +module.exports = true; - if (end <= 0) { - return '' - } - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 +/***/ }), - if (end <= start) { - return '' - } +/***/ "./node_modules/core-js/library/modules/_meta.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_meta.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (!encoding) encoding = 'utf8' +var META = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js")('meta'); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var setDesc = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) +/***/ }), - case 'ascii': - return asciiSlice(this, start, end) +/***/ "./node_modules/core-js/library/modules/_microtask.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_microtask.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var macrotask = __webpack_require__(/*! ./_task */ "./node_modules/core-js/library/modules/_task.js").set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js")(process) == 'process'; - case 'base64': - return base64Slice(this, start, end) +module.exports = function () { + var head, last, notify; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; } -} -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} +/***/ }), -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} +/***/ "./node_modules/core-js/library/modules/_new-promise-capability.js": +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_new-promise-capability.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} +"use strict"; -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); } -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} +module.exports.f = function (C) { + return new PromiseCapability(C); +}; -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!Buffer.isBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } +/***/ }), - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } +/***/ "./node_modules/core-js/library/modules/_object-assign.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-assign.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } +"use strict"; - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); +var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/library/modules/_object-gops.js"); +var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); +var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/library/modules/_iobject.js"); +var $assign = Object.assign; - if (this === target) return 0 +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) +/***/ }), - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } +/***/ "./node_modules/core-js/library/modules/_object-create.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-create.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (x < y) return -1 - if (y < x) return 1 - return 0 -} +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/library/modules/_object-dps.js"); +var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js"); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js")('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(/*! ./_html */ "./node_modules/core-js/library/modules/_html.js").appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } +/***/ }), - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (Buffer.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } +/***/ "./node_modules/core-js/library/modules/_object-dp.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-dp.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - throw new TypeError('val must be string, number or Buffer') -} +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); +var dP = Object.defineProperty; -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length +exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } +/***/ }), - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } +/***/ "./node_modules/core-js/library/modules/_object-dps.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-dps.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return -1 -} +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} +module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} +/***/ }), -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } +/***/ "./node_modules/core-js/library/modules/_object-gopd.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-gopd.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') +var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js"); +var gOPD = Object.getOwnPropertyDescriptor; - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} +exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} +/***/ }), -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} +/***/ "./node_modules/core-js/library/modules/_object-gopn-ext.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-gopn-ext.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); +var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/library/modules/_object-gopn.js").f; +var toString = {}.toString; -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); } +}; - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - if (!encoding) encoding = 'utf8' +/***/ }), - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) +/***/ "./node_modules/core-js/library/modules/_object-gopn.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-gopn.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/library/modules/_object-keys-internal.js"); +var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js").concat('length', 'prototype'); - case 'ascii': - return asciiWrite(this, string, offset, length) +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) +/***/ }), - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) +/***/ "./node_modules/core-js/library/modules/_object-gops.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-gops.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} +exports.f = Object.getOwnPropertySymbols; -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} +/***/ }), -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] +/***/ "./node_modules/core-js/library/modules/_object-gpo.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-gpo.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); +var ObjectProto = Object.prototype; - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } +/***/ }), - res.push(codePoint) - i += bytesPerSequence +/***/ "./node_modules/core-js/library/modules/_object-keys-internal.js": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-keys-internal.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); +var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/library/modules/_array-includes.js")(false); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); } + return result; +}; - return decodeCodePointsArray(res) -} -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 +/***/ }), -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } +/***/ "./node_modules/core-js/library/modules/_object-keys.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-keys.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/library/modules/_object-keys-internal.js"); +var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js"); -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) +/***/ }), - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} +/***/ "./node_modules/core-js/library/modules/_object-pie.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-pie.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -function hexSlice (buf, start, end) { - var len = buf.length +exports.f = {}.propertyIsEnumerable; - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} +/***/ }), -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} +/***/ "./node_modules/core-js/library/modules/_object-sap.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-sap.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js"); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } +/***/ }), - if (end < start) end = start +/***/ "./node_modules/core-js/library/modules/_object-to-array.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-to-array.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end) - newBuf.__proto__ = Buffer.prototype - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start] - } - } +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); +var isEnum = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js").f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) if (isEnum.call(O, key = keys[i++])) { + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; - return newBuf -} -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} +/***/ }), -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) +/***/ "./node_modules/core-js/library/modules/_perform.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_perform.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; } +}; - return val -} -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } +/***/ }), - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } +/***/ "./node_modules/core-js/library/modules/_promise-resolve.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_promise-resolve.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return val -} +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} +/***/ }), -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +/***/ "./node_modules/core-js/library/modules/_property-desc.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_property-desc.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} +/***/ }), -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) +/***/ "./node_modules/core-js/library/modules/_redefine-all.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_redefine-all.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - return val -} +/***/ }), -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) +/***/ "./node_modules/core-js/library/modules/_redefine.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_redefine.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 +module.exports = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - return val -} +/***/ }), -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} +/***/ "./node_modules/core-js/library/modules/_set-proto.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_set-proto.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js")(Function.call, __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/library/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +/***/ }), - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} +/***/ "./node_modules/core-js/library/modules/_set-species.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_set-species.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +"use strict"; - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"); +var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species'); -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} +/***/ }), -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} +/***/ "./node_modules/core-js/library/modules/_set-to-string-tag.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_set-to-string-tag.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} +var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f; +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - return offset + byteLength -} +/***/ }), -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } +/***/ "./node_modules/core-js/library/modules/_shared-key.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_shared-key.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } +var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js")('keys'); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js"); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; - return offset + byteLength -} -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} +/***/ }), -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} +/***/ "./node_modules/core-js/library/modules/_shared.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_shared.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js") ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' +}); -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) +/***/ }), - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } +/***/ "./node_modules/core-js/library/modules/_species-constructor.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_species-constructor.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); +var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; - return offset + byteLength -} -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) +/***/ }), - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } +/***/ "./node_modules/core-js/library/modules/_string-at.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_string-at.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; - return offset + byteLength -} -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} +/***/ }), -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} +/***/ "./node_modules/core-js/library/modules/_task.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_task.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var invoke = __webpack_require__(/*! ./_invoke */ "./node_modules/core-js/library/modules/_invoke.js"); +var html = __webpack_require__(/*! ./_html */ "./node_modules/core-js/library/modules/_html.js"); +var cel = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js")(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers } else { - objectWriteUInt32(this, value, offset, true) + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; } - return offset + 4 } +module.exports = { + set: setTask, + clear: clearTask +}; -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} +/***/ }), -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} +/***/ "./node_modules/core-js/library/modules/_to-absolute-index.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-absolute-index.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} +/***/ }), -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} +/***/ "./node_modules/core-js/library/modules/_to-integer.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-integer.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 +/***/ }), - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') +/***/ "./node_modules/core-js/library/modules/_to-iobject.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-iobject.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/library/modules/_iobject.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); +module.exports = function (it) { + return IObject(defined(it)); +}; - var len = end - start - var i - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ) - } +/***/ }), - return len -} +/***/ "./node_modules/core-js/library/modules/_to-length.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-length.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if (code < 256) { - val = code - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255 - } +// 7.1.15 ToLength +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - if (end <= start) { - return this - } +/***/ }), - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 +/***/ "./node_modules/core-js/library/modules/_to-object.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-object.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (!val) val = 0 +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); +module.exports = function (it) { + return Object(defined(it)); +}; - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()) - var len = bytes.length - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - return this -} +/***/ }), -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} +/***/ "./node_modules/core-js/library/modules/_to-primitive.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-primitive.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) +/***/ }), - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } +/***/ "./node_modules/core-js/library/modules/_uid.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_uid.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // valid lead - leadSurrogate = codePoint +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; - continue - } - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } +/***/ }), - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } +/***/ "./node_modules/core-js/library/modules/_user-agent.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_user-agent.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - leadSurrogate = null +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var navigator = global.navigator; - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } +module.exports = navigator && navigator.userAgent || ''; - return bytes -} -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} +/***/ }), -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break +/***/ "./node_modules/core-js/library/modules/_wks-define.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_wks-define.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js"); +var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/core-js/library/modules/_wks-ext.js"); +var defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; - return byteArray -} -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} +/***/ }), -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} +/***/ "./node_modules/core-js/library/modules/_wks-ext.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_wks-ext.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} +exports.f = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js"); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), -/***/ "./node_modules/builtin-status-codes/browser.js": +/***/ "./node_modules/core-js/library/modules/_wks.js": /*!******************************************************!*\ - !*** ./node_modules/builtin-status-codes/browser.js ***! + !*** ./node_modules/core-js/library/modules/_wks.js ***! \******************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -module.exports = { - "100": "Continue", - "101": "Switching Protocols", - "102": "Processing", - "200": "OK", - "201": "Created", - "202": "Accepted", - "203": "Non-Authoritative Information", - "204": "No Content", - "205": "Reset Content", - "206": "Partial Content", - "207": "Multi-Status", - "208": "Already Reported", - "226": "IM Used", - "300": "Multiple Choices", - "301": "Moved Permanently", - "302": "Found", - "303": "See Other", - "304": "Not Modified", - "305": "Use Proxy", - "307": "Temporary Redirect", - "308": "Permanent Redirect", - "400": "Bad Request", - "401": "Unauthorized", - "402": "Payment Required", - "403": "Forbidden", - "404": "Not Found", - "405": "Method Not Allowed", - "406": "Not Acceptable", - "407": "Proxy Authentication Required", - "408": "Request Timeout", - "409": "Conflict", - "410": "Gone", - "411": "Length Required", - "412": "Precondition Failed", - "413": "Payload Too Large", - "414": "URI Too Long", - "415": "Unsupported Media Type", - "416": "Range Not Satisfiable", - "417": "Expectation Failed", - "418": "I'm a teapot", - "421": "Misdirected Request", - "422": "Unprocessable Entity", - "423": "Locked", - "424": "Failed Dependency", - "425": "Unordered Collection", - "426": "Upgrade Required", - "428": "Precondition Required", - "429": "Too Many Requests", - "431": "Request Header Fields Too Large", - "451": "Unavailable For Legal Reasons", - "500": "Internal Server Error", - "501": "Not Implemented", - "502": "Bad Gateway", - "503": "Service Unavailable", - "504": "Gateway Timeout", - "505": "HTTP Version Not Supported", - "506": "Variant Also Negotiates", - "507": "Insufficient Storage", - "508": "Loop Detected", - "509": "Bandwidth Limit Exceeded", - "510": "Not Extended", - "511": "Network Authentication Required" -} +var store = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js")('wks'); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js"); +var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; /***/ }), -/***/ "./node_modules/co/index.js": -/*!**********************************!*\ - !*** ./node_modules/co/index.js ***! - \**********************************/ +/***/ "./node_modules/core-js/library/modules/core.get-iterator-method.js": +/*!**************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/core.get-iterator-method.js ***! + \**************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { +var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/library/modules/_classof.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js").getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; -/** - * slice() reference. - */ -var slice = Array.prototype.slice; +/***/ }), -/** - * Expose `co`. - */ +/***/ "./node_modules/core-js/library/modules/core.get-iterator.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/core.get-iterator.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = co['default'] = co.co = co; +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var get = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/library/modules/core.get-iterator-method.js"); +module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js").getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; -/** - * Wrap the given generator `fn` into a - * function that returns a promise. - * This is a separate function so that - * every `co()` call doesn't create a new, - * unnecessary closure. - * - * @param {GeneratorFunction} fn - * @return {Function} - * @api public - */ -co.wrap = function (fn) { - createPromise.__generatorFunction__ = fn; - return createPromise; - function createPromise() { - return co.call(this, fn.apply(this, arguments)); - } +/***/ }), + +/***/ "./node_modules/core-js/library/modules/core.is-iterable.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/core.is-iterable.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/library/modules/_classof.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js").isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); }; -/** - * Execute the generator function or a generator - * and return a promise. - * - * @param {Function} fn - * @return {Promise} - * @api public - */ -function co(gen) { - var ctx = this; - var args = slice.call(arguments, 1) +/***/ }), - // we wrap everything in a promise to avoid promise chaining, - // which leads to memory leak errors. - // see https://github.com/tj/co/issues/180 - return new Promise(function(resolve, reject) { - if (typeof gen === 'function') gen = gen.apply(ctx, args); - if (!gen || typeof gen.next !== 'function') return resolve(gen); +/***/ "./node_modules/core-js/library/modules/es6.array.from.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.array.from.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - onFulfilled(); +"use strict"; - /** - * @param {Mixed} res - * @return {Promise} - * @api private - */ +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); +var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/library/modules/_iter-call.js"); +var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/library/modules/_is-array-iter.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js"); +var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/core-js/library/modules/_create-property.js"); +var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/library/modules/core.get-iterator-method.js"); - function onFulfilled(res) { - var ret; - try { - ret = gen.next(res); - } catch (e) { - return reject(e); +$export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/library/modules/_iter-detect.js")(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } - next(ret); } + result.length = index; + return result; + } +}); - /** - * @param {Error} err - * @return {Promise} - * @api private - */ - function onRejected(err) { - var ret; - try { - ret = gen.throw(err); - } catch (e) { - return reject(e); - } - next(ret); - } +/***/ }), - /** - * Get the next value in the generator, - * return a promise. - * - * @param {Object} ret - * @return {Promise} - * @api private - */ +/***/ "./node_modules/core-js/library/modules/es6.array.iterator.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.array.iterator.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function next(ret) { - if (ret.done) return resolve(ret.value); - var value = toPromise.call(ctx, ret.value); - if (value && isPromise(value)) return value.then(onFulfilled, onRejected); - return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, ' - + 'but the following object was passed: "' + String(ret.value) + '"')); - } - }); -} +"use strict"; -/** - * Convert a `yield`ed value into a promise. - * - * @param {Mixed} obj - * @return {Promise} - * @api private - */ +var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/library/modules/_add-to-unscopables.js"); +var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/core-js/library/modules/_iter-step.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); -function toPromise(obj) { - if (!obj) return obj; - if (isPromise(obj)) return obj; - if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj); - if ('function' == typeof obj) return thunkToPromise.call(this, obj); - if (Array.isArray(obj)) return arrayToPromise.call(this, obj); - if (isObject(obj)) return objectToPromise.call(this, obj); - return obj; -} +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/library/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); -/** - * Convert a thunk to a promise. - * - * @param {Function} - * @return {Promise} - * @api private - */ +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; -function thunkToPromise(fn) { - var ctx = this; - return new Promise(function (resolve, reject) { - fn.call(ctx, function (err, res) { - if (err) return reject(err); - if (arguments.length > 2) res = slice.call(arguments, 1); - resolve(res); - }); - }); -} - -/** - * Convert an array of "yieldables" to a promise. - * Uses `Promise.all()` internally. - * - * @param {Array} obj - * @return {Promise} - * @api private - */ - -function arrayToPromise(obj) { - return Promise.all(obj.map(toPromise, this)); -} - -/** - * Convert an object of "yieldables" to a promise. - * Uses `Promise.all()` internally. - * - * @param {Object} obj - * @return {Promise} - * @api private - */ - -function objectToPromise(obj){ - var results = new obj.constructor(); - var keys = Object.keys(obj); - var promises = []; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var promise = toPromise.call(this, obj[key]); - if (promise && isPromise(promise)) defer(promise, key); - else results[key] = obj[key]; - } - return Promise.all(promises).then(function () { - return results; - }); - - function defer(promise, key) { - // predefine the key in the result - results[key] = undefined; - promises.push(promise.then(function (res) { - results[key] = res; - })); - } -} - -/** - * Check if `obj` is a promise. - * - * @param {Object} obj - * @return {Boolean} - * @api private - */ - -function isPromise(obj) { - return 'function' == typeof obj.then; -} - -/** - * Check if `obj` is a generator. - * - * @param {Mixed} obj - * @return {Boolean} - * @api private - */ - -function isGenerator(obj) { - return 'function' == typeof obj.next && 'function' == typeof obj.throw; -} - -/** - * Check if `obj` is a generator function. - * - * @param {Mixed} obj - * @return {Boolean} - * @api private - */ -function isGeneratorFunction(obj) { - var constructor = obj.constructor; - if (!constructor) return false; - if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true; - return isGenerator(constructor.prototype); -} - -/** - * Check for plain object. - * - * @param {Mixed} val - * @return {Boolean} - * @api private - */ - -function isObject(val) { - return Object == val.constructor; -} +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); /***/ }), -/***/ "./node_modules/cookiejar/cookiejar.js": -/*!*********************************************!*\ - !*** ./node_modules/cookiejar/cookiejar.js ***! - \*********************************************/ +/***/ "./node_modules/core-js/library/modules/es6.object.assign.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.assign.js ***! + \*******************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { - -/* jshint node: true */ -(function () { - "use strict"; - - function CookieAccessInfo(domain, path, secure, script) { - if (this instanceof CookieAccessInfo) { - this.domain = domain || undefined; - this.path = path || "/"; - this.secure = !!secure; - this.script = !!script; - return this; - } - return new CookieAccessInfo(domain, path, secure, script); - } - CookieAccessInfo.All = Object.freeze(Object.create(null)); - exports.CookieAccessInfo = CookieAccessInfo; - - function Cookie(cookiestr, request_domain, request_path) { - if (cookiestr instanceof Cookie) { - return cookiestr; - } - if (this instanceof Cookie) { - this.name = null; - this.value = null; - this.expiration_date = Infinity; - this.path = String(request_path || "/"); - this.explicit_path = false; - this.domain = request_domain || null; - this.explicit_domain = false; - this.secure = false; //how to define default? - this.noscript = false; //httponly - if (cookiestr) { - this.parse(cookiestr, request_domain, request_path); - } - return this; - } - return new Cookie(cookiestr, request_domain, request_path); - } - exports.Cookie = Cookie; - - Cookie.prototype.toString = function toString() { - var str = [this.name + "=" + this.value]; - if (this.expiration_date !== Infinity) { - str.push("expires=" + (new Date(this.expiration_date)).toGMTString()); - } - if (this.domain) { - str.push("domain=" + this.domain); - } - if (this.path) { - str.push("path=" + this.path); - } - if (this.secure) { - str.push("secure"); - } - if (this.noscript) { - str.push("httponly"); - } - return str.join("; "); - }; - - Cookie.prototype.toValueString = function toValueString() { - return this.name + "=" + this.value; - }; - - var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g; - Cookie.prototype.parse = function parse(str, request_domain, request_path) { - if (this instanceof Cookie) { - var parts = str.split(";").filter(function (value) { - return !!value; - }); - var i; - - var pair = parts[0].match(/([^=]+)=([\s\S]*)/); - if (!pair) { - console.warn("Invalid cookie header encountered. Header: '"+str+"'"); - return; - } - - var key = pair[1]; - var value = pair[2]; - if ( typeof key !== 'string' || key.length === 0 || typeof value !== 'string' ) { - console.warn("Unable to extract values from cookie header. Cookie: '"+str+"'"); - return; - } - - this.name = key; - this.value = value; - - for (i = 1; i < parts.length; i += 1) { - pair = parts[i].match(/([^=]+)(?:=([\s\S]*))?/); - key = pair[1].trim().toLowerCase(); - value = pair[2]; - switch (key) { - case "httponly": - this.noscript = true; - break; - case "expires": - this.expiration_date = value ? - Number(Date.parse(value)) : - Infinity; - break; - case "path": - this.path = value ? - value.trim() : - ""; - this.explicit_path = true; - break; - case "domain": - this.domain = value ? - value.trim() : - ""; - this.explicit_domain = !!this.domain; - break; - case "secure": - this.secure = true; - break; - } - } - - if (!this.explicit_path) { - this.path = request_path || "/"; - } - if (!this.explicit_domain) { - this.domain = request_domain; - } - - return this; - } - return new Cookie().parse(str, request_domain, request_path); - }; - - Cookie.prototype.matches = function matches(access_info) { - if (access_info === CookieAccessInfo.All) { - return true; - } - if (this.noscript && access_info.script || - this.secure && !access_info.secure || - !this.collidesWith(access_info)) { - return false; - } - return true; - }; - - Cookie.prototype.collidesWith = function collidesWith(access_info) { - if ((this.path && !access_info.path) || (this.domain && !access_info.domain)) { - return false; - } - if (this.path && access_info.path.indexOf(this.path) !== 0) { - return false; - } - if (this.explicit_path && access_info.path.indexOf( this.path ) !== 0) { - return false; - } - var access_domain = access_info.domain && access_info.domain.replace(/^[\.]/,''); - var cookie_domain = this.domain && this.domain.replace(/^[\.]/,''); - if (cookie_domain === access_domain) { - return true; - } - if (cookie_domain) { - if (!this.explicit_domain) { - return false; // we already checked if the domains were exactly the same - } - var wildcard = access_domain.indexOf(cookie_domain); - if (wildcard === -1 || wildcard !== access_domain.length - cookie_domain.length) { - return false; - } - return true; - } - return true; - }; - - function CookieJar() { - var cookies, cookies_list, collidable_cookie; - if (this instanceof CookieJar) { - cookies = Object.create(null); //name: [Cookie] - - this.setCookie = function setCookie(cookie, request_domain, request_path) { - var remove, i; - cookie = new Cookie(cookie, request_domain, request_path); - //Delete the cookie if the set is past the current time - remove = cookie.expiration_date <= Date.now(); - if (cookies[cookie.name] !== undefined) { - cookies_list = cookies[cookie.name]; - for (i = 0; i < cookies_list.length; i += 1) { - collidable_cookie = cookies_list[i]; - if (collidable_cookie.collidesWith(cookie)) { - if (remove) { - cookies_list.splice(i, 1); - if (cookies_list.length === 0) { - delete cookies[cookie.name]; - } - return false; - } - cookies_list[i] = cookie; - return cookie; - } - } - if (remove) { - return false; - } - cookies_list.push(cookie); - return cookie; - } - if (remove) { - return false; - } - cookies[cookie.name] = [cookie]; - return cookies[cookie.name]; - }; - //returns a cookie - this.getCookie = function getCookie(cookie_name, access_info) { - var cookie, i; - cookies_list = cookies[cookie_name]; - if (!cookies_list) { - return; - } - for (i = 0; i < cookies_list.length; i += 1) { - cookie = cookies_list[i]; - if (cookie.expiration_date <= Date.now()) { - if (cookies_list.length === 0) { - delete cookies[cookie.name]; - } - continue; - } - - if (cookie.matches(access_info)) { - return cookie; - } - } - }; - //returns a list of cookies - this.getCookies = function getCookies(access_info) { - var matches = [], cookie_name, cookie; - for (cookie_name in cookies) { - cookie = this.getCookie(cookie_name, access_info); - if (cookie) { - matches.push(cookie); - } - } - matches.toString = function toString() { - return matches.join(":"); - }; - matches.toValueString = function toValueString() { - return matches.map(function (c) { - return c.toValueString(); - }).join(';'); - }; - return matches; - }; +/***/ (function(module, exports, __webpack_require__) { - return this; - } - return new CookieJar(); - } - exports.CookieJar = CookieJar; +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); - //returns list of cookies that were set correctly. Cookies that are expired and removed are not returned. - CookieJar.prototype.setCookies = function setCookies(cookies, request_domain, request_path) { - cookies = Array.isArray(cookies) ? - cookies : - cookies.split(cookie_str_splitter); - var successful = [], - i, - cookie; - cookies = cookies.map(function(item){ - return new Cookie(item, request_domain, request_path); - }); - for (i = 0; i < cookies.length; i += 1) { - cookie = cookies[i]; - if (this.setCookie(cookie, request_domain, request_path)) { - successful.push(cookie); - } - } - return successful; - }; -}()); +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/library/modules/_object-assign.js") }); /***/ }), -/***/ "./node_modules/core-js/library/fn/array/from.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/fn/array/from.js ***! - \*******************************************************/ +/***/ "./node_modules/core-js/library/modules/es6.object.create.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.create.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); -__webpack_require__(/*! ../../modules/es6.array.from */ "./node_modules/core-js/library/modules/es6.array.from.js"); -module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Array.from; +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/library/modules/_object-create.js") }); /***/ }), -/***/ "./node_modules/core-js/library/fn/get-iterator.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/fn/get-iterator.js ***! - \*********************************************************/ +/***/ "./node_modules/core-js/library/modules/es6.object.define-property.js": +/*!****************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.define-property.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! ../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); -__webpack_require__(/*! ../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); -module.exports = __webpack_require__(/*! ../modules/core.get-iterator */ "./node_modules/core-js/library/modules/core.get-iterator.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f }); /***/ }), -/***/ "./node_modules/core-js/library/fn/is-iterable.js": -/*!********************************************************!*\ - !*** ./node_modules/core-js/library/fn/is-iterable.js ***! - \********************************************************/ +/***/ "./node_modules/core-js/library/modules/es6.object.get-prototype-of.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.get-prototype-of.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! ../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); -__webpack_require__(/*! ../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); -module.exports = __webpack_require__(/*! ../modules/core.is-iterable */ "./node_modules/core-js/library/modules/core.is-iterable.js"); +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); +var $getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/library/modules/_object-gpo.js"); + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/library/modules/_object-sap.js")('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); /***/ }), -/***/ "./node_modules/core-js/library/fn/json/stringify.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/library/fn/json/stringify.js ***! - \***********************************************************/ +/***/ "./node_modules/core-js/library/modules/es6.object.keys.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.keys.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js"); -var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); -module.exports = function stringify(it) { // eslint-disable-line no-unused-vars - return $JSON.stringify.apply($JSON, arguments); -}; +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); +var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/library/modules/_object-sap.js")('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); /***/ }), -/***/ "./node_modules/core-js/library/fn/object/assign.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/assign.js ***! - \**********************************************************/ +/***/ "./node_modules/core-js/library/modules/es6.object.set-prototype-of.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.set-prototype-of.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! ../../modules/es6.object.assign */ "./node_modules/core-js/library/modules/es6.object.assign.js"); -module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.assign; +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/library/modules/_set-proto.js").set }); /***/ }), -/***/ "./node_modules/core-js/library/fn/object/create.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/create.js ***! - \**********************************************************/ +/***/ "./node_modules/core-js/library/modules/es6.object.to-string.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.to-string.js ***! + \**********************************************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -__webpack_require__(/*! ../../modules/es6.object.create */ "./node_modules/core-js/library/modules/es6.object.create.js"); -var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object; -module.exports = function create(P, D) { - return $Object.create(P, D); -}; /***/ }), -/***/ "./node_modules/core-js/library/fn/object/define-property.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/define-property.js ***! - \*******************************************************************/ +/***/ "./node_modules/core-js/library/modules/es6.promise.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.promise.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! ../../modules/es6.object.define-property */ "./node_modules/core-js/library/modules/es6.object.define-property.js"); -var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object; -module.exports = function defineProperty(it, key, desc) { - return $Object.defineProperty(it, key, desc); -}; - - -/***/ }), +"use strict"; -/***/ "./node_modules/core-js/library/fn/object/get-prototype-of.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/get-prototype-of.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(/*! ../../modules/es6.object.get-prototype-of */ "./node_modules/core-js/library/modules/es6.object.get-prototype-of.js"); -module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.getPrototypeOf; - - -/***/ }), - -/***/ "./node_modules/core-js/library/fn/object/keys.js": -/*!********************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/keys.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(/*! ../../modules/es6.object.keys */ "./node_modules/core-js/library/modules/es6.object.keys.js"); -module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.keys; - - -/***/ }), - -/***/ "./node_modules/core-js/library/fn/object/set-prototype-of.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/set-prototype-of.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/library/modules/_classof.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); +var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/library/modules/_an-instance.js"); +var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/library/modules/_for-of.js"); +var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/library/modules/_species-constructor.js"); +var task = __webpack_require__(/*! ./_task */ "./node_modules/core-js/library/modules/_task.js").set; +var microtask = __webpack_require__(/*! ./_microtask */ "./node_modules/core-js/library/modules/_microtask.js")(); +var newPromiseCapabilityModule = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); +var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/library/modules/_perform.js"); +var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/library/modules/_user-agent.js"); +var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/library/modules/_promise-resolve.js"); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; -__webpack_require__(/*! ../../modules/es6.object.set-prototype-of */ "./node_modules/core-js/library/modules/es6.object.set-prototype-of.js"); -module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.setPrototypeOf; +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; -/***/ }), +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/library/modules/_redefine-all.js")($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} -/***/ "./node_modules/core-js/library/fn/object/values.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/fn/object/values.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js")($Promise, PROMISE); +__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/library/modules/_set-species.js")(PROMISE); +Wrapper = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js")[PROMISE]; -__webpack_require__(/*! ../../modules/es7.object.values */ "./node_modules/core-js/library/modules/es7.object.values.js"); -module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.values; +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/library/modules/_iter-detect.js")(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); /***/ }), -/***/ "./node_modules/core-js/library/fn/promise.js": -/*!****************************************************!*\ - !*** ./node_modules/core-js/library/fn/promise.js ***! - \****************************************************/ +/***/ "./node_modules/core-js/library/modules/es6.string.iterator.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.string.iterator.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! ../modules/es6.object.to-string */ "./node_modules/core-js/library/modules/es6.object.to-string.js"); -__webpack_require__(/*! ../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); -__webpack_require__(/*! ../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); -__webpack_require__(/*! ../modules/es6.promise */ "./node_modules/core-js/library/modules/es6.promise.js"); -__webpack_require__(/*! ../modules/es7.promise.finally */ "./node_modules/core-js/library/modules/es7.promise.finally.js"); -__webpack_require__(/*! ../modules/es7.promise.try */ "./node_modules/core-js/library/modules/es7.promise.try.js"); -module.exports = __webpack_require__(/*! ../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Promise; - - -/***/ }), +"use strict"; -/***/ "./node_modules/core-js/library/fn/symbol/index.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/fn/symbol/index.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/library/modules/_string-at.js")(true); -__webpack_require__(/*! ../../modules/es6.symbol */ "./node_modules/core-js/library/modules/es6.symbol.js"); -__webpack_require__(/*! ../../modules/es6.object.to-string */ "./node_modules/core-js/library/modules/es6.object.to-string.js"); -__webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ "./node_modules/core-js/library/modules/es7.symbol.async-iterator.js"); -__webpack_require__(/*! ../../modules/es7.symbol.observable */ "./node_modules/core-js/library/modules/es7.symbol.observable.js"); -module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Symbol; +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/library/modules/_iter-define.js")(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); /***/ }), -/***/ "./node_modules/core-js/library/fn/symbol/iterator.js": +/***/ "./node_modules/core-js/library/modules/es6.symbol.js": /*!************************************************************!*\ - !*** ./node_modules/core-js/library/fn/symbol/iterator.js ***! + !*** ./node_modules/core-js/library/modules/es6.symbol.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); -__webpack_require__(/*! ../../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); -module.exports = __webpack_require__(/*! ../../modules/_wks-ext */ "./node_modules/core-js/library/modules/_wks-ext.js").f('iterator'); - +"use strict"; -/***/ }), +// ECMAScript 6 symbols shim +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/library/modules/_redefine.js"); +var META = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/library/modules/_meta.js").KEY; +var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js"); +var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js"); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js"); +var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js"); +var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/core-js/library/modules/_wks-ext.js"); +var wksDefine = __webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/library/modules/_wks-define.js"); +var enumKeys = __webpack_require__(/*! ./_enum-keys */ "./node_modules/core-js/library/modules/_enum-keys.js"); +var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/library/modules/_is-array.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); +var _create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/library/modules/_object-create.js"); +var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/core-js/library/modules/_object-gopn-ext.js"); +var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/library/modules/_object-gopd.js"); +var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); +var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; -/***/ "./node_modules/core-js/library/modules/_a-function.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_a-function.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; }; - -/***/ }), - -/***/ "./node_modules/core-js/library/modules/_add-to-unscopables.js": -/*!*********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_add-to-unscopables.js ***! - \*********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = function () { /* empty */ }; - - -/***/ }), - -/***/ "./node_modules/core-js/library/modules/_an-instance.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_an-instance.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { - throw TypeError(name + ': incorrect invocation!'); - } return it; +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; }; - -/***/ }), - -/***/ "./node_modules/core-js/library/modules/_an-object.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_an-object.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; - -/***/ }), - -/***/ "./node_modules/core-js/library/modules/_array-includes.js": -/*!*****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_array-includes.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); -var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js"); -var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/library/modules/_to-absolute-index.js"); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); }; -}; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/library/modules/_object-gopn.js").f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js").f = $propertyIsEnumerable; + __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/library/modules/_object-gops.js").f = $getOwnPropertySymbols; -/***/ }), + if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js")) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } -/***/ "./node_modules/core-js/library/modules/_classof.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_classof.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js"); -var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } -}; +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); /***/ }), -/***/ "./node_modules/core-js/library/modules/_cof.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_cof.js ***! - \******************************************************/ +/***/ "./node_modules/core-js/library/modules/es7.object.values.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es7.object.values.js ***! + \*******************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -var toString = {}.toString; +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var $values = __webpack_require__(/*! ./_object-to-array */ "./node_modules/core-js/library/modules/_object-to-array.js")(false); -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); /***/ }), -/***/ "./node_modules/core-js/library/modules/_core.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_core.js ***! - \*******************************************************/ +/***/ "./node_modules/core-js/library/modules/es7.promise.finally.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es7.promise.finally.js ***! + \*********************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -var core = module.exports = { version: '2.5.6' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/library/modules/_species-constructor.js"); +var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/library/modules/_promise-resolve.js"); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); /***/ }), -/***/ "./node_modules/core-js/library/modules/_create-property.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_create-property.js ***! - \******************************************************************/ +/***/ "./node_modules/core-js/library/modules/es7.promise.try.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es7.promise.try.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var $defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); -var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); +var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/library/modules/_perform.js"); -module.exports = function (object, index, value) { - if (index in object) $defineProperty.f(object, index, createDesc(0, value)); - else object[index] = value; -}; +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); /***/ }), -/***/ "./node_modules/core-js/library/modules/_ctx.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_ctx.js ***! - \******************************************************/ +/***/ "./node_modules/core-js/library/modules/es7.symbol.async-iterator.js": +/*!***************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es7.symbol.async-iterator.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// optional / simple context binding -var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; +__webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/library/modules/_wks-define.js")('asyncIterator'); /***/ }), -/***/ "./node_modules/core-js/library/modules/_defined.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_defined.js ***! - \**********************************************************/ +/***/ "./node_modules/core-js/library/modules/es7.symbol.observable.js": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es7.symbol.observable.js ***! + \***********************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; +__webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/library/modules/_wks-define.js")('observable'); /***/ }), -/***/ "./node_modules/core-js/library/modules/_descriptors.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_descriptors.js ***! - \**************************************************************/ +/***/ "./node_modules/core-js/library/modules/web.dom.iterable.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/web.dom.iterable.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); +__webpack_require__(/*! ./es6.array.iterator */ "./node_modules/core-js/library/modules/es6.array.iterator.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +var TO_STRING_TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} /***/ }), -/***/ "./node_modules/core-js/library/modules/_dom-create.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_dom-create.js ***! - \*************************************************************/ +/***/ "./node_modules/core-util-is/lib/util.js": +/*!***********************************************!*\ + !*** ./node_modules/core-util-is/lib/util.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; +/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. -/***/ }), +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; -/***/ "./node_modules/core-js/library/modules/_enum-bug-keys.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_enum-bug-keys.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; -/***/ }), +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; -/***/ "./node_modules/core-js/library/modules/_enum-keys.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_enum-keys.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; -// all enumerable object keys, includes symbols -var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); -var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/library/modules/_object-gops.js"); -var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js"); -module.exports = function (it) { - var result = getKeys(it); - var getSymbols = gOPS.f; - if (getSymbols) { - var symbols = getSymbols(it); - var isEnum = pIE.f; - var i = 0; - var key; - while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); - } return result; -}; +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)) /***/ }), -/***/ "./node_modules/core-js/library/modules/_export.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_export.js ***! - \*********************************************************/ +/***/ "./node_modules/crypto-js/aes.js": +/*!***************************************!*\ + !*** ./node_modules/crypto-js/aes.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); -var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); -var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); -var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && has(exports, key)) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; -/***/ }), + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; -/***/ "./node_modules/core-js/library/modules/_fails.js": -/*!********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_fails.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; -/***/ }), + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; -/***/ "./node_modules/core-js/library/modules/_for-of.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_for-of.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; -var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); -var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/library/modules/_iter-call.js"); -var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/library/modules/_is-array-iter.js"); -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js"); -var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/library/modules/core.get-iterator-method.js"); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; -/***/ }), + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } -/***/ "./node_modules/core-js/library/modules/_global.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_global.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; -/***/ }), + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; -/***/ "./node_modules/core-js/library/modules/_has.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_has.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } -/***/ }), + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } -/***/ "./node_modules/core-js/library/modules/_hide.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_hide.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; -var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); -var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); -module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, -/***/ }), + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, -/***/ "./node_modules/core-js/library/modules/_html.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_html.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; -var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").document; -module.exports = document && document.documentElement; + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, -/***/ }), + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; -/***/ "./node_modules/core-js/library/modules/_ie8-dom-define.js": -/*!*****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_ie8-dom-define.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; -module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { - return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7; -}); + // Key schedule row counter + var ksRow = 4; + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; -/***/ }), + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } -/***/ "./node_modules/core-js/library/modules/_invoke.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_invoke.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; -// fast apply, http://jsperf.lnkit.com/fast-apply/5 -module.exports = function (fn, args, that) { - var un = that === undefined; - switch (args.length) { - case 0: return un ? fn() - : fn.call(that); - case 1: return un ? fn(args[0]) - : fn.call(that, args[0]); - case 2: return un ? fn(args[0], args[1]) - : fn.call(that, args[0], args[1]); - case 3: return un ? fn(args[0], args[1], args[2]) - : fn.call(that, args[0], args[1], args[2]); - case 4: return un ? fn(args[0], args[1], args[2], args[3]) - : fn.call(that, args[0], args[1], args[2], args[3]); - } return fn.apply(that, args); -}; + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + keySize: 256/32 + }); -/***/ }), + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); -/***/ "./node_modules/core-js/library/modules/_iobject.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iobject.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js"); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; + return CryptoJS.AES; +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/_is-array-iter.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_is-array-iter.js ***! - \****************************************************************/ +/***/ "./node_modules/crypto-js/cipher-core.js": +/*!***********************************************!*\ + !*** ./node_modules/crypto-js/cipher-core.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// check on default Array iterator -var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); -var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); -var ArrayProto = Array.prototype; +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + } + else {} +}(this, function (CryptoJS) { -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), -/***/ }), + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, -/***/ "./node_modules/core-js/library/modules/_is-array.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_is-array.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, -// 7.2.2 IsArray(argument) -var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js"); -module.exports = Array.isArray || function isArray(arg) { - return cof(arg) == 'Array'; -}; + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; -/***/ }), + // Set initial values + this.reset(); + }, -/***/ "./node_modules/core-js/library/modules/_is-object.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_is-object.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), + // Perform concrete-cipher logic + this._doReset(); + }, -/***/ "./node_modules/core-js/library/modules/_iter-call.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-call.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); -// call something on iterator step with safe closing on error -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; + // Process available blocks + return this._process(); + }, + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } -/***/ }), + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); -/***/ "./node_modules/core-js/library/modules/_iter-create.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-create.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return finalProcessedData; + }, -"use strict"; + keySize: 128/32, -var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/library/modules/_object-create.js"); -var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); -var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js"); -var IteratorPrototype = {}; + ivSize: 128/32, -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'), function () { return this; }); + _ENC_XFORM_MODE: 1, -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; + _DEC_XFORM_MODE: 2, + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } -/***/ }), + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, -/***/ "./node_modules/core-js/library/modules/_iter-define.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-define.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); -"use strict"; + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); -var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js"); -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/library/modules/_redefine.js"); -var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); -var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); -var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/library/modules/_iter-create.js"); -var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js"); -var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/library/modules/_object-gpo.js"); -var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; + return finalProcessedBlocks; + }, -var returnThis = function () { return this; }; + blockSize: 1 + }); -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, -/***/ }), + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, -/***/ "./node_modules/core-js/library/modules/_iter-detect.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-detect.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); -var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); -var SAFE_CLOSING = false; + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; -}; + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); -/***/ }), + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; -/***/ "./node_modules/core-js/library/modules/_iter-step.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iter-step.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); -module.exports = function (done, value) { - return { value: value, done: !!done }; -}; + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); -/***/ }), + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; -/***/ "./node_modules/core-js/library/modules/_iterators.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_iterators.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Choose mixing block + if (iv) { + var block = iv; -module.exports = {}; + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } -/***/ }), + return CBC; + }()); -/***/ "./node_modules/core-js/library/modules/_library.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_library.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; -module.exports = true; + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; -/***/ }), + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; -/***/ "./node_modules/core-js/library/modules/_meta.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_meta.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); -var META = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js")('meta'); -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); -var setDesc = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function (it) { - setDesc(it, META, { value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - } }); -}; -var fastKey = function (it, create) { - // return primitive with prefix - if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function (it, create) { - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; + // Add padding + data.concat(padding); + }, + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; -/***/ }), + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; -/***/ "./node_modules/core-js/library/modules/_microtask.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_microtask.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var macrotask = __webpack_require__(/*! ./_task */ "./node_modules/core-js/library/modules/_task.js").set; -var Observer = global.MutationObserver || global.WebKitMutationObserver; -var process = global.process; -var Promise = global.Promise; -var isNode = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js")(process) == 'process'; - -module.exports = function () { - var head, last, notify; - - var flush = function () { - var parent, fn; - if (isNode && (parent = process.domain)) parent.exit(); - while (head) { - fn = head.fn; - head = head.next; - try { - fn(); - } catch (e) { - if (head) notify(); - else last = undefined; - throw e; - } - } last = undefined; - if (parent) parent.enter(); - }; - - // Node.js - if (isNode) { - notify = function () { - process.nextTick(flush); - }; - // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 - } else if (Observer && !(global.navigator && global.navigator.standalone)) { - var toggle = true; - var node = document.createTextNode(''); - new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new - notify = function () { - node.data = toggle = !toggle; - }; - // environments with maybe non-completely correct, but existent Promise - } else if (Promise && Promise.resolve) { - // Promise.resolve without an argument throws an error in LG WebOS 2 - var promise = Promise.resolve(undefined); - notify = function () { - promise.then(flush); - }; - // for other environments - macrotask based on: - // - setImmediate - // - MessageChannel - // - window.postMessag - // - onreadystatechange - // - setTimeout - } else { - notify = function () { - // strange IE + webpack dev server bug - use .call(global) - macrotask.call(global, flush); - }; - } - - return function (fn) { - var task = { fn: fn, next: undefined }; - if (last) last.next = task; - if (!head) { - head = task; - notify(); - } last = task; - }; -}; + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + reset: function () { + // Reset cipher + Cipher.reset.call(this); -/***/ }), + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; -/***/ "./node_modules/core-js/library/modules/_new-promise-capability.js": -/*!*************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_new-promise-capability.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; -"use strict"; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + this._mode = modeCreator.call(mode, this, iv && iv.words); + }, -// 25.4.1.5 NewPromiseCapability(C) -var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, -function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); -} + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; -module.exports.f = function (C) { - return new PromiseCapability(C); -}; + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); -/***/ }), + // Unpad data + padding.unpad(finalProcessedBlocks); + } -/***/ "./node_modules/core-js/library/modules/_object-assign.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-assign.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return finalProcessedBlocks; + }, -"use strict"; + blockSize: 128/32 + }); -// 19.1.2.1 Object.assign(target, source, ...) -var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); -var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/library/modules/_object-gops.js"); -var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js"); -var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); -var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/library/modules/_iobject.js"); -var $assign = Object.assign; + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, -// should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { B[k] = k; }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = gOPS.f; - var isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]); - var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; - } return T; -} : $assign; + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + /** + * Format namespace. + */ + var C_format = C.format = {}; -/***/ }), + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; -/***/ "./node_modules/core-js/library/modules/_object-create.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-create.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/library/modules/_object-dps.js"); -var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js"); -var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; + return wordArray.toString(Base64); + }, -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js")('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(/*! ./_html */ "./node_modules/core-js/library/modules/_html.js").appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; + // Shortcut + var ciphertextWords = ciphertext.words; + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); -/***/ }), + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } -/***/ "./node_modules/core-js/library/modules/_object-dp.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-dp.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js"); -var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); -var dP = Object.defineProperty; + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), -exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); -/***/ }), + // Shortcut + var cipherCfg = encryptor.cfg; -/***/ "./node_modules/core-js/library/modules/_object-dps.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-dps.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, -var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); -module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); -/***/ }), + return plaintext; + }, -/***/ "./node_modules/core-js/library/modules/_object-gopd.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gopd.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); -var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js"); -var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); -var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); -var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); -var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); -var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js"); -var gOPD = Object.getOwnPropertyDescriptor; + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; -exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) { - O = toIObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return gOPD(O, P); - } catch (e) { /* empty */ } - if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); -}; + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); -/***/ }), + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; -/***/ "./node_modules/core-js/library/modules/_object-gopn-ext.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gopn-ext.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; -// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window -var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); -var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/library/modules/_object-gopn.js").f; -var toString = {}.toString; + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), -var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) : []; + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); -var getWindowNames = function (it) { - try { - return gOPN(it); - } catch (e) { - return windowNames.slice(); - } -}; + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); -module.exports.f = function getOwnPropertyNames(it) { - return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); -}; + // Add IV to config + cfg.iv = derivedParams.iv; + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); -/***/ }), + // Mix in derived params + ciphertext.mixIn(derivedParams); -/***/ "./node_modules/core-js/library/modules/_object-gopn.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gopn.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return ciphertext; + }, -// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/library/modules/_object-keys-internal.js"); -var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js").concat('length', 'prototype'); + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return $keys(O, hiddenKeys); -}; + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); -/***/ }), + // Add IV to config + cfg.iv = derivedParams.iv; -/***/ "./node_modules/core-js/library/modules/_object-gops.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gops.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); -exports.f = Object.getOwnPropertySymbols; +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/_object-gpo.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-gpo.js ***! - \*************************************************************/ +/***/ "./node_modules/crypto-js/core.js": +/*!****************************************!*\ + !*** ./node_modules/crypto-js/core.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); -var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); -var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(); + } + else {} +}(this, function () { + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /* + * Local polyfil of Object.create + */ + var create = Object.create || (function () { + function F() {}; -/***/ }), + return function (obj) { + var subtype; -/***/ "./node_modules/core-js/library/modules/_object-keys-internal.js": -/*!***********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-keys-internal.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + F.prototype = obj; -var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); -var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); -var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/library/modules/_array-includes.js")(false); -var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); + subtype = new F(); -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; + F.prototype = null; + return subtype; + }; + }()) -/***/ }), + /** + * CryptoJS namespace. + */ + var C = {}; -/***/ "./node_modules/core-js/library/modules/_object-keys.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-keys.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Library namespace. + */ + var C_lib = C.lib = {}; -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/library/modules/_object-keys-internal.js"); -var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js"); + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); -/***/ }), + // Augment + if (overrides) { + subtype.mixIn(overrides); + } -/***/ "./node_modules/core-js/library/modules/_object-pie.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-pie.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } -exports.f = {}.propertyIsEnumerable; + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + // Reference supertype + subtype.$super = this; -/***/ }), + return subtype; + }, -/***/ "./node_modules/core-js/library/modules/_object-sap.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-sap.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); -// most Object methods by ES6 should accept primitives -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); -var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js"); -module.exports = function (KEY, exec) { - var fn = (core.Object || {})[KEY] || Object[KEY]; - var exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); -}; + return instance; + }, + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, -/***/ }), + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } -/***/ "./node_modules/core-js/library/modules/_object-to-array.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-to-array.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, -var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); -var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); -var isEnum = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js").f; -module.exports = function (isEntries) { - return function (it) { - var O = toIObject(it); - var keys = getKeys(O); - var length = keys.length; - var i = 0; - var result = []; - var key; - while (length > i) if (isEnum.call(O, key = keys[i++])) { - result.push(isEntries ? [key, O[key]] : O[key]); - } return result; - }; -}; + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; -/***/ }), + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, -/***/ "./node_modules/core-js/library/modules/_perform.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_perform.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, -module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } -}; + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + // Clamp excess bits + this.clamp(); -/***/ }), + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; -/***/ "./node_modules/core-js/library/modules/_promise-resolve.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_promise-resolve.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Chainable + return this; + }, -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); - -module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, -/***/ }), + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); -/***/ "./node_modules/core-js/library/modules/_property-desc.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_property-desc.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + return clone; + }, -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; -/***/ }), + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); -/***/ "./node_modules/core-js/library/modules/_redefine-all.js": -/*!***************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_redefine-all.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); -var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); -module.exports = function (target, src, safe) { - for (var key in src) { - if (safe && target[key]) target[key] = src[key]; - else hide(target, key, src[key]); - } return target; -}; + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + return new WordArray.init(words, nBytes); + } + }); -/***/ }), + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; -/***/ "./node_modules/core-js/library/modules/_redefine.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_redefine.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; -module.exports = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + return hexChars.join(''); + }, -/***/ }), + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; -/***/ "./node_modules/core-js/library/modules/_set-proto.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_set-proto.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var check = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); -}; -module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function (test, buggy, set) { - try { - set = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js")(Function.call, __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/library/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { buggy = true; } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check -}; + return new WordArray.init(words, hexStrLength / 2); + } + }; + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; -/***/ }), + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } -/***/ "./node_modules/core-js/library/modules/_set-species.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_set-species.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return latin1Chars.join(''); + }, -"use strict"; + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); -var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); -var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"); -var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species'); + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } -module.exports = function (KEY) { - var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { return this; } - }); -}; + return new WordArray.init(words, latin1StrLength); + } + }; + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, -/***/ }), + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; -/***/ "./node_modules/core-js/library/modules/_set-to-string-tag.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_set-to-string-tag.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, -var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f; -var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); -var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; -/***/ }), + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } -/***/ "./node_modules/core-js/library/modules/_shared-key.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_shared-key.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Count words ready + var nWordsReady = nBlocksReady * blockSize; -var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js")('keys'); -var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js"); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } -/***/ }), + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } -/***/ "./node_modules/core-js/library/modules/_shared.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_shared.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, -var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js") ? 'pure' : 'global', - copyright: '© 2018 Denis Pushkarev (zloirock.ru)' -}); + return clone; + }, + _minBufferSize: 0 + }); -/***/ }), + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), -/***/ "./node_modules/core-js/library/modules/_species-constructor.js": -/*!**********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_species-constructor.js ***! - \**********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); -var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; + // Set initial values + this.reset(); + }, + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); -/***/ }), - -/***/ "./node_modules/core-js/library/modules/_string-at.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_string-at.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Perform concrete-hasher logic + this._doReset(); + }, -var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); -var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); -// true -> String#at -// false -> String#codePointAt -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + // Update the hash + this._process(); -/***/ }), + // Chainable + return this; + }, -/***/ "./node_modules/core-js/library/modules/_task.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_task.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } -var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); -var invoke = __webpack_require__(/*! ./_invoke */ "./node_modules/core-js/library/modules/_invoke.js"); -var html = __webpack_require__(/*! ./_html */ "./node_modules/core-js/library/modules/_html.js"); -var cel = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js"); -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function () { - var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; -var listener = function (event) { - run.call(event.data); -}; -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { - // eslint-disable-next-line no-new-func - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id) { - delete queue[id]; - }; - // Node.js 0.8- - if (__webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js")(process) == 'process') { - defer = function (id) { - process.nextTick(ctx(run, id, 1)); - }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; - // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function (id) { - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; + // Perform concrete-hasher logic + var hash = this._doFinalize(); + return hash; + }, -/***/ }), + blockSize: 512/32, -/***/ "./node_modules/core-js/library/modules/_to-absolute-index.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-absolute-index.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, -var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; -/***/ }), + return C; + }(Math)); -/***/ "./node_modules/core-js/library/modules/_to-integer.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-integer.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; + return CryptoJS; +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/_to-iobject.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-iobject.js ***! - \*************************************************************/ +/***/ "./node_modules/crypto-js/enc-base64.js": +/*!**********************************************!*\ + !*** ./node_modules/crypto-js/enc-base64.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/library/modules/_iobject.js"); -var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); -module.exports = function (it) { - return IObject(defined(it)); -}; +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + } + else {} +}(this, function (CryptoJS) { + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; -/***/ }), + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; -/***/ "./node_modules/core-js/library/modules/_to-length.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-length.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Clamp excess bits + wordArray.clamp(); -// 7.1.15 ToLength -var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; -/***/ }), + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } -/***/ "./node_modules/core-js/library/modules/_to-object.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-object.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); -module.exports = function (it) { - return Object(defined(it)); -}; + return base64Chars.join(''); + }, + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; -/***/ }), + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } -/***/ "./node_modules/core-js/library/modules/_to-primitive.js": -/*!***************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-primitive.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + }, -/***/ }), + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; -/***/ "./node_modules/core-js/library/modules/_uid.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_uid.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; + return CryptoJS.enc.Base64; + +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/_user-agent.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_user-agent.js ***! - \*************************************************************/ +/***/ "./node_modules/crypto-js/enc-utf16.js": +/*!*********************************************!*\ + !*** ./node_modules/crypto-js/enc-utf16.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var navigator = global.navigator; +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + } + else {} +}(this, function (CryptoJS) { -module.exports = navigator && navigator.userAgent || ''; + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; -/***/ }), + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } -/***/ "./node_modules/core-js/library/modules/_wks-define.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_wks-define.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return utf16Chars.join(''); + }, -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); -var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js"); -var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/core-js/library/modules/_wks-ext.js"); -var defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f; -module.exports = function (name) { - var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); - if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); -}; + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } -/***/ }), + return WordArray.create(words, utf16StrLength * 2); + } + }; -/***/ "./node_modules/core-js/library/modules/_wks-ext.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/library/modules/_wks-ext.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; -exports.f = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js"); + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + return utf16Chars.join(''); + }, -/***/ }), + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; -/***/ "./node_modules/core-js/library/modules/_wks.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/library/modules/_wks.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } -var store = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js")('wks'); -var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js"); -var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; + return WordArray.create(words, utf16StrLength * 2); + } + }; -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); -$exports.store = store; + return CryptoJS.enc.Utf16; + +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/core.get-iterator-method.js": -/*!**************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/core.get-iterator-method.js ***! - \**************************************************************************/ +/***/ "./node_modules/crypto-js/evpkdf.js": +/*!******************************************!*\ + !*** ./node_modules/crypto-js/evpkdf.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/library/modules/_classof.js"); -var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); -var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); -module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js").getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); + } + else {} +}(this, function (CryptoJS) { + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; -/***/ }), + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), -/***/ "./node_modules/core-js/library/modules/core.get-iterator.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/core.get-iterator.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var get = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/library/modules/core.get-iterator-method.js"); -module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js").getIterator = function (it) { - var iterFn = get(it); - if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); - return anObject(iterFn.call(it)); -}; + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + // Init hasher + var hasher = cfg.hasher.create(); -/***/ }), + // Initial values + var derivedKey = WordArray.create(); -/***/ "./node_modules/core-js/library/modules/core.is-iterable.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/core.is-iterable.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; -var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/library/modules/_classof.js"); -var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); -var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); -module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js").isIterable = function (it) { - var O = Object(it); - return O[ITERATOR] !== undefined - || '@@iterator' in O - // eslint-disable-next-line no-prototype-builtins - || Iterators.hasOwnProperty(classof(O)); -}; + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + var block = hasher.update(password).finalize(salt); + hasher.reset(); + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } -/***/ }), + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; -/***/ "./node_modules/core-js/library/modules/es6.array.from.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.array.from.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return derivedKey; + } + }); -"use strict"; + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); -var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); -var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/library/modules/_iter-call.js"); -var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/library/modules/_is-array-iter.js"); -var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js"); -var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/core-js/library/modules/_create-property.js"); -var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/library/modules/core.get-iterator-method.js"); -$export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/library/modules/_iter-detect.js")(function (iter) { Array.from(iter); }), 'Array', { - // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) - from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var index = 0; - var iterFn = getIterFn(O); - var length, result, step, iterator; - if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); - // if object isn't iterable or it's array with default iterator - use simple case - if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { - for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { - createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); - } - } else { - length = toLength(O.length); - for (result = new C(length); length > index; index++) { - createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); - } - } - result.length = index; - return result; - } -}); + return CryptoJS.EvpKDF; +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/es6.array.iterator.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.array.iterator.js ***! - \********************************************************************/ +/***/ "./node_modules/crypto-js/format-hex.js": +/*!**********************************************!*\ + !*** ./node_modules/crypto-js/format-hex.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { -var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/library/modules/_add-to-unscopables.js"); -var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/core-js/library/modules/_iter-step.js"); -var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); -var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/library/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); + return CryptoJS.format.Hex; + +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/es6.object.assign.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.assign.js ***! - \*******************************************************************/ +/***/ "./node_modules/crypto-js/hmac.js": +/*!****************************************!*\ + !*** ./node_modules/crypto-js/hmac.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.3.1 Object.assign(target, source) -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); - -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/library/modules/_object-assign.js") }); +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + } + else {} +}(this, function (CryptoJS) { + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; -/***/ }), + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); -/***/ "./node_modules/core-js/library/modules/es6.object.create.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.create.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -$export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/library/modules/_object-create.js") }); + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } -/***/ }), + // Clamp excess bits + key.clamp(); -/***/ "./node_modules/core-js/library/modules/es6.object.define-property.js": -/*!****************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.define-property.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) -$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f }); + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; -/***/ }), + // Set initial values + this.reset(); + }, -/***/ "./node_modules/core-js/library/modules/es6.object.get-prototype-of.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.get-prototype-of.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; -// 19.1.2.9 Object.getPrototypeOf(O) -var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); -var $getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/library/modules/_object-gpo.js"); + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, -__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/library/modules/_object-sap.js")('getPrototypeOf', function () { - return function getPrototypeOf(it) { - return $getPrototypeOf(toObject(it)); - }; -}); + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + // Chainable + return this; + }, -/***/ }), + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; -/***/ "./node_modules/core-js/library/modules/es6.object.keys.js": -/*!*****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.keys.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); -// 19.1.2.14 Object.keys(O) -var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); -var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); + return hmac; + } + }); + }()); -__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/library/modules/_object-sap.js")('keys', function () { - return function keys(it) { - return $keys(toObject(it)); - }; -}); +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/es6.object.set-prototype-of.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.set-prototype-of.js ***! - \*****************************************************************************/ +/***/ "./node_modules/crypto-js/index.js": +/*!*****************************************!*\ + !*** ./node_modules/crypto-js/index.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.3.19 Object.setPrototypeOf(O, proto) -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/library/modules/_set-proto.js").set }); +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./lib-typedarrays */ "./node_modules/crypto-js/lib-typedarrays.js"), __webpack_require__(/*! ./enc-utf16 */ "./node_modules/crypto-js/enc-utf16.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./sha224 */ "./node_modules/crypto-js/sha224.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js"), __webpack_require__(/*! ./sha384 */ "./node_modules/crypto-js/sha384.js"), __webpack_require__(/*! ./sha3 */ "./node_modules/crypto-js/sha3.js"), __webpack_require__(/*! ./ripemd160 */ "./node_modules/crypto-js/ripemd160.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js"), __webpack_require__(/*! ./pbkdf2 */ "./node_modules/crypto-js/pbkdf2.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js"), __webpack_require__(/*! ./mode-cfb */ "./node_modules/crypto-js/mode-cfb.js"), __webpack_require__(/*! ./mode-ctr */ "./node_modules/crypto-js/mode-ctr.js"), __webpack_require__(/*! ./mode-ctr-gladman */ "./node_modules/crypto-js/mode-ctr-gladman.js"), __webpack_require__(/*! ./mode-ofb */ "./node_modules/crypto-js/mode-ofb.js"), __webpack_require__(/*! ./mode-ecb */ "./node_modules/crypto-js/mode-ecb.js"), __webpack_require__(/*! ./pad-ansix923 */ "./node_modules/crypto-js/pad-ansix923.js"), __webpack_require__(/*! ./pad-iso10126 */ "./node_modules/crypto-js/pad-iso10126.js"), __webpack_require__(/*! ./pad-iso97971 */ "./node_modules/crypto-js/pad-iso97971.js"), __webpack_require__(/*! ./pad-zeropadding */ "./node_modules/crypto-js/pad-zeropadding.js"), __webpack_require__(/*! ./pad-nopadding */ "./node_modules/crypto-js/pad-nopadding.js"), __webpack_require__(/*! ./format-hex */ "./node_modules/crypto-js/format-hex.js"), __webpack_require__(/*! ./aes */ "./node_modules/crypto-js/aes.js"), __webpack_require__(/*! ./tripledes */ "./node_modules/crypto-js/tripledes.js"), __webpack_require__(/*! ./rc4 */ "./node_modules/crypto-js/rc4.js"), __webpack_require__(/*! ./rabbit */ "./node_modules/crypto-js/rabbit.js"), __webpack_require__(/*! ./rabbit-legacy */ "./node_modules/crypto-js/rabbit-legacy.js")); + } + else {} +}(this, function (CryptoJS) { + + return CryptoJS; +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/es6.object.to-string.js": -/*!**********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.to-string.js ***! - \**********************************************************************/ +/***/ "./node_modules/crypto-js/lib-typedarrays.js": +/*!***************************************************!*\ + !*** ./node_modules/crypto-js/lib-typedarrays.js ***! + \***************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + } + else {} +}(this, function (CryptoJS) { + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } -/***/ }), + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; -/***/ "./node_modules/core-js/library/modules/es6.promise.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.promise.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Reference original init + var superInit = WordArray.init; -"use strict"; + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } -var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js"); -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); -var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/library/modules/_classof.js"); -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); -var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/library/modules/_an-instance.js"); -var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/library/modules/_for-of.js"); -var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/library/modules/_species-constructor.js"); -var task = __webpack_require__(/*! ./_task */ "./node_modules/core-js/library/modules/_task.js").set; -var microtask = __webpack_require__(/*! ./_microtask */ "./node_modules/core-js/library/modules/_microtask.js")(); -var newPromiseCapabilityModule = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); -var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/library/modules/_perform.js"); -var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/library/modules/_user-agent.js"); -var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/library/modules/_promise-resolve.js"); -var PROMISE = 'Promise'; -var TypeError = global.TypeError; -var process = global.process; -var versions = process && process.versions; -var v8 = versions && versions.v8 || ''; -var $Promise = global[PROMISE]; -var isNode = classof(process) == 'process'; -var empty = function () { /* empty */ }; -var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; -var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } -var USE_NATIVE = !!function () { - try { - // correct subclassing with @@species support - var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species')] = function (exec) { - exec(empty, empty); - }; - // unhandled rejections tracking support, NodeJS Promise without it fails @@species test - return (isNode || typeof PromiseRejectionEvent == 'function') - && promise.then(empty) instanceof FakePromise - // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables - // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 - // we can't detect it synchronously, so just check versions - && v8.indexOf('6.6') !== 0 - && userAgent.indexOf('Chrome/66') === -1; - } catch (e) { /* empty */ } -}(); + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; -// helpers -var isThenable = function (it) { - var then; - return isObject(it) && typeof (then = it.then) == 'function' ? then : false; -}; -var notify = function (promise, isReject) { - if (promise._n) return; - promise._n = true; - var chain = promise._c; - microtask(function () { - var value = promise._v; - var ok = promise._s == 1; - var i = 0; - var run = function (reaction) { - var handler = ok ? reaction.ok : reaction.fail; - var resolve = reaction.resolve; - var reject = reaction.reject; - var domain = reaction.domain; - var result, then, exited; - try { - if (handler) { - if (!ok) { - if (promise._h == 2) onHandleUnhandled(promise); - promise._h = 1; - } - if (handler === true) result = value; - else { - if (domain) domain.enter(); - result = handler(value); // may throw - if (domain) { - domain.exit(); - exited = true; - } - } - if (result === reaction.promise) { - reject(TypeError('Promise-chain cycle')); - } else if (then = isThenable(result)) { - then.call(result, resolve, reject); - } else resolve(result); - } else reject(value); - } catch (e) { - if (domain && !exited) domain.exit(); - reject(e); - } - }; - while (chain.length > i) run(chain[i++]); // variable length - can't use forEach - promise._c = []; - promise._n = false; - if (isReject && !promise._h) onUnhandled(promise); - }); -}; -var onUnhandled = function (promise) { - task.call(global, function () { - var value = promise._v; - var unhandled = isUnhandled(promise); - var result, handler, console; - if (unhandled) { - result = perform(function () { - if (isNode) { - process.emit('unhandledRejection', value, promise); - } else if (handler = global.onunhandledrejection) { - handler({ promise: promise, reason: value }); - } else if ((console = global.console) && console.error) { - console.error('Unhandled promise rejection', value); - } - }); - // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should - promise._h = isNode || isUnhandled(promise) ? 2 : 1; - } promise._a = undefined; - if (unhandled && result.e) throw result.v; - }); -}; -var isUnhandled = function (promise) { - return promise._h !== 1 && (promise._a || promise._c).length === 0; -}; -var onHandleUnhandled = function (promise) { - task.call(global, function () { - var handler; - if (isNode) { - process.emit('rejectionHandled', promise); - } else if (handler = global.onrejectionhandled) { - handler({ promise: promise, reason: promise._v }); - } - }); -}; -var $reject = function (value) { - var promise = this; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - promise._v = value; - promise._s = 2; - if (!promise._a) promise._a = promise._c.slice(); - notify(promise, true); -}; -var $resolve = function (value) { - var promise = this; - var then; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - try { - if (promise === value) throw TypeError("Promise can't be resolved itself"); - if (then = isThenable(value)) { - microtask(function () { - var wrapper = { _w: promise, _d: false }; // wrap - try { - then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); - } catch (e) { - $reject.call(wrapper, e); - } - }); - } else { - promise._v = value; - promise._s = 1; - notify(promise, false); - } - } catch (e) { - $reject.call({ _w: promise, _d: false }, e); // wrap - } -}; + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } -// constructor polyfill -if (!USE_NATIVE) { - // 25.4.3.1 Promise(executor) - $Promise = function Promise(executor) { - anInstance(this, $Promise, PROMISE, '_h'); - aFunction(executor); - Internal.call(this); - try { - executor(ctx($resolve, this, 1), ctx($reject, this, 1)); - } catch (err) { - $reject.call(this, err); - } - }; - // eslint-disable-next-line no-unused-vars - Internal = function Promise(executor) { - this._c = []; // <- awaiting reactions - this._a = undefined; // <- checked in isUnhandled reactions - this._s = 0; // <- state - this._d = false; // <- done - this._v = undefined; // <- value - this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled - this._n = false; // <- notify - }; - Internal.prototype = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/library/modules/_redefine-all.js")($Promise.prototype, { - // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) - then: function then(onFulfilled, onRejected) { - var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); - reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; - reaction.fail = typeof onRejected == 'function' && onRejected; - reaction.domain = isNode ? process.domain : undefined; - this._c.push(reaction); - if (this._a) this._a.push(reaction); - if (this._s) notify(this, false); - return reaction.promise; - }, - // 25.4.5.1 Promise.prototype.catch(onRejected) - 'catch': function (onRejected) { - return this.then(undefined, onRejected); - } - }); - OwnPromiseCapability = function () { - var promise = new Internal(); - this.promise = promise; - this.resolve = ctx($resolve, promise, 1); - this.reject = ctx($reject, promise, 1); - }; - newPromiseCapabilityModule.f = newPromiseCapability = function (C) { - return C === $Promise || C === Wrapper - ? new OwnPromiseCapability(C) - : newGenericPromiseCapability(C); - }; -} + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); -__webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js")($Promise, PROMISE); -__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/library/modules/_set-species.js")(PROMISE); -Wrapper = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js")[PROMISE]; + subInit.prototype = WordArray; + }()); -// statics -$export($export.S + $export.F * !USE_NATIVE, PROMISE, { - // 25.4.4.5 Promise.reject(r) - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; - $$reject(r); - return capability.promise; - } -}); -$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { - // 25.4.4.6 Promise.resolve(x) - resolve: function resolve(x) { - return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); - } -}); -$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/library/modules/_iter-detect.js")(function (iter) { - $Promise.all(iter)['catch'](empty); -})), PROMISE, { - // 25.4.4.1 Promise.all(iterable) - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; - values.push(undefined); - remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; - values[$index] = value; - --remaining || resolve(values); - }, reject); - }); - --remaining || resolve(values); - }); - if (result.e) reject(result.v); - return capability.promise; - }, - // 25.4.4.4 Promise.race(iterable) - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { - C.resolve(promise).then(capability.resolve, reject); - }); - }); - if (result.e) reject(result.v); - return capability.promise; - } -}); + return CryptoJS.lib.WordArray; + +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/es6.string.iterator.js": -/*!*********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.string.iterator.js ***! - \*********************************************************************/ +/***/ "./node_modules/crypto-js/md5.js": +/*!***************************************!*\ + !*** ./node_modules/crypto-js/md5.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + } + else {} +}(this, function (CryptoJS) { -var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/library/modules/_string-at.js")(true); + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; -// 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/library/modules/_iter-define.js")(String, 'String', function (iterated) { - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; - point = $at(O, index); - this._i += point.length; - return { value: point, done: false }; -}); + // Constants table + var T = []; + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); -/***/ }), + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, -/***/ "./node_modules/core-js/library/modules/es6.symbol.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.symbol.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; -"use strict"; + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } -// ECMAScript 6 symbols shim -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); -var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"); -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/library/modules/_redefine.js"); -var META = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/library/modules/_meta.js").KEY; -var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js"); -var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js"); -var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js"); -var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js"); -var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js"); -var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/core-js/library/modules/_wks-ext.js"); -var wksDefine = __webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/library/modules/_wks-define.js"); -var enumKeys = __webpack_require__(/*! ./_enum-keys */ "./node_modules/core-js/library/modules/_enum-keys.js"); -var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/library/modules/_is-array.js"); -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); -var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); -var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); -var _create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/library/modules/_object-create.js"); -var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/core-js/library/modules/_object-gopn-ext.js"); -var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/library/modules/_object-gopd.js"); -var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); -var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); -var gOPD = $GOPD.f; -var dP = $DP.f; -var gOPN = gOPNExt.f; -var $Symbol = global.Symbol; -var $JSON = global.JSON; -var _stringify = $JSON && $JSON.stringify; -var PROTOTYPE = 'prototype'; -var HIDDEN = wks('_hidden'); -var TO_PRIMITIVE = wks('toPrimitive'); -var isEnum = {}.propertyIsEnumerable; -var SymbolRegistry = shared('symbol-registry'); -var AllSymbols = shared('symbols'); -var OPSymbols = shared('op-symbols'); -var ObjectProto = Object[PROTOTYPE]; -var USE_NATIVE = typeof $Symbol == 'function'; -var QObject = global.QObject; -// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 -var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + // Shortcuts + var H = this._hash.words; -// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 -var setSymbolDesc = DESCRIPTORS && $fails(function () { - return _create(dP({}, 'a', { - get: function () { return dP(this, 'a', { value: 7 }).a; } - })).a != 7; -}) ? function (it, key, D) { - var protoDesc = gOPD(ObjectProto, key); - if (protoDesc) delete ObjectProto[key]; - dP(it, key, D); - if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); -} : dP; + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; -var wrap = function (tag) { - var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); - sym._k = tag; - return sym; -}; + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; -var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { - return typeof it == 'symbol'; -} : function (it) { - return it instanceof $Symbol; -}; + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); -var $defineProperty = function defineProperty(it, key, D) { - if (it === ObjectProto) $defineProperty(OPSymbols, key, D); - anObject(it); - key = toPrimitive(key, true); - anObject(D); - if (has(AllSymbols, key)) { - if (!D.enumerable) { - if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); - it[HIDDEN][key] = true; - } else { - if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; - D = _create(D, { enumerable: createDesc(0, false) }); - } return setSymbolDesc(it, key, D); - } return dP(it, key, D); -}; -var $defineProperties = function defineProperties(it, P) { - anObject(it); - var keys = enumKeys(P = toIObject(P)); - var i = 0; - var l = keys.length; - var key; - while (l > i) $defineProperty(it, key = keys[i++], P[key]); - return it; -}; -var $create = function create(it, P) { - return P === undefined ? _create(it) : $defineProperties(_create(it), P); -}; -var $propertyIsEnumerable = function propertyIsEnumerable(key) { - var E = isEnum.call(this, key = toPrimitive(key, true)); - if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; - return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; -}; -var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { - it = toIObject(it); - key = toPrimitive(key, true); - if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; - var D = gOPD(it, key); - if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; - return D; -}; -var $getOwnPropertyNames = function getOwnPropertyNames(it) { - var names = gOPN(toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); - } return result; -}; -var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { - var IS_OP = it === ObjectProto; - var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); - } return result; -}; + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); -// 19.4.1.1 Symbol([description]) -if (!USE_NATIVE) { - $Symbol = function Symbol() { - if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); - var tag = uid(arguments.length > 0 ? arguments[0] : undefined); - var $set = function (value) { - if (this === ObjectProto) $set.call(OPSymbols, value); - if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; - setSymbolDesc(this, tag, createDesc(1, value)); - }; - if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); - return wrap(tag); - }; - redefine($Symbol[PROTOTYPE], 'toString', function toString() { - return this._k; - }); + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); - $GOPD.f = $getOwnPropertyDescriptor; - $DP.f = $defineProperty; - __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/library/modules/_object-gopn.js").f = gOPNExt.f = $getOwnPropertyNames; - __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js").f = $propertyIsEnumerable; - __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/library/modules/_object-gops.js").f = $getOwnPropertySymbols; + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); - if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js")) { - redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); - } + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, - wksExt.f = function (name) { - return wrap(wks(name)); - }; -} + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; -for (var es6Symbols = ( - // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 - 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' -).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); -for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); -$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { - // 19.4.2.1 Symbol.for(key) - 'for': function (key) { - return has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = $Symbol(key); - }, - // 19.4.2.5 Symbol.keyFor(sym) - keyFor: function keyFor(sym) { - if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); - for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; - }, - useSetter: function () { setter = true; }, - useSimple: function () { setter = false; } -}); + data.sigBytes = (dataWords.length + 1) * 4; -$export($export.S + $export.F * !USE_NATIVE, 'Object', { - // 19.1.2.2 Object.create(O [, Properties]) - create: $create, - // 19.1.2.4 Object.defineProperty(O, P, Attributes) - defineProperty: $defineProperty, - // 19.1.2.3 Object.defineProperties(O, Properties) - defineProperties: $defineProperties, - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $getOwnPropertyDescriptor, - // 19.1.2.7 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $getOwnPropertyNames, - // 19.1.2.8 Object.getOwnPropertySymbols(O) - getOwnPropertySymbols: $getOwnPropertySymbols -}); + // Hash final blocks + this._process(); -// 24.3.2 JSON.stringify(value [, replacer [, space]]) -$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { - var S = $Symbol(); - // MS Edge converts symbol values to JSON as {} - // WebKit converts symbol values to JSON as null - // V8 throws on boxed symbols - return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; -})), 'JSON', { - stringify: function stringify(it) { - var args = [it]; - var i = 1; - var replacer, $replacer; - while (arguments.length > i) args.push(arguments[i++]); - $replacer = replacer = args[1]; - if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined - if (!isArray(replacer)) replacer = function (key, value) { - if (typeof $replacer == 'function') value = $replacer.call(this, key, value); - if (!isSymbol(value)) return value; - }; - args[1] = replacer; - return _stringify.apply($JSON, args); - } -}); + // Shortcuts + var hash = this._hash; + var H = hash.words; -// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) -$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); -// 19.4.3.5 Symbol.prototype[@@toStringTag] -setToStringTag($Symbol, 'Symbol'); -// 20.2.1.9 Math[@@toStringTag] -setToStringTag(Math, 'Math', true); -// 24.3.3 JSON[@@toStringTag] -setToStringTag(global.JSON, 'JSON', true); + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } -/***/ }), + // Return final computed hash + return hash; + }, -/***/ "./node_modules/core-js/library/modules/es7.object.values.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es7.object.values.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); -// https://github.com/tc39/proposal-object-values-entries -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -var $values = __webpack_require__(/*! ./_object-to-array */ "./node_modules/core-js/library/modules/_object-to-array.js")(false); + return clone; + } + }); -$export($export.S, 'Object', { - values: function values(it) { - return $values(it); - } -}); + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } -/***/ }), + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } -/***/ "./node_modules/core-js/library/modules/es7.promise.finally.js": -/*!*********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es7.promise.finally.js ***! - \*********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } -"use strict"; -// https://github.com/tc39/proposal-promise-finally + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/library/modules/_species-constructor.js"); -var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/library/modules/_promise-resolve.js"); + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); -$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then( - isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { return x; }); - } : onFinally, - isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { throw e; }); - } : onFinally - ); -} }); + return CryptoJS.MD5; + +})); /***/ }), -/***/ "./node_modules/core-js/library/modules/es7.promise.try.js": -/*!*****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es7.promise.try.js ***! - \*****************************************************************/ +/***/ "./node_modules/crypto-js/mode-cfb.js": +/*!********************************************!*\ + !*** ./node_modules/crypto-js/mode-cfb.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { -// https://github.com/tc39/proposal-promise-try -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); -var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/library/modules/_perform.js"); + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); -$export($export.S, 'Promise', { 'try': function (callbackfn) { - var promiseCapability = newPromiseCapability.f(this); - var result = perform(callbackfn); - (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); - return promiseCapability.promise; -} }); + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); -/***/ }), + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); -/***/ "./node_modules/core-js/library/modules/es7.symbol.async-iterator.js": -/*!***************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es7.symbol.async-iterator.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; -__webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/library/modules/_wks-define.js")('asyncIterator'); + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); -/***/ }), + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); -/***/ "./node_modules/core-js/library/modules/es7.symbol.observable.js": -/*!***********************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es7.symbol.observable.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + // Shortcut + var iv = this._iv; -__webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/library/modules/_wks-define.js")('observable'); + // Generate keystream + if (iv) { + var keystream = iv.slice(0); + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); -/***/ }), + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } -/***/ "./node_modules/core-js/library/modules/web.dom.iterable.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/library/modules/web.dom.iterable.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(/*! ./es6.array.iterator */ "./node_modules/core-js/library/modules/es6.array.iterator.js"); -var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); -var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); -var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); -var TO_STRING_TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); + return CFB; + }()); -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; -} + return CryptoJS.mode.CFB; +})); /***/ }), -/***/ "./node_modules/core-util-is/lib/util.js": -/*!***********************************************!*\ - !*** ./node_modules/core-util-is/lib/util.js ***! - \***********************************************/ +/***/ "./node_modules/crypto-js/mode-ctr-gladman.js": +/*!****************************************************!*\ + !*** ./node_modules/crypto-js/mode-ctr-gladman.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; + // Remove IV for subsequent blocks + this._iv = undefined; + } -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; + incCounter(counter); -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; + CTRGladman.Decryptor = Encryptor; -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; + return CTRGladman; + }()); -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; -exports.isBuffer = Buffer.isBuffer; -function objectToString(o) { - return Object.prototype.toString.call(o); -} + return CryptoJS.mode.CTRGladman; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)) +})); /***/ }), -/***/ "./node_modules/crypto-js/aes.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/aes.js ***! - \***************************************/ +/***/ "./node_modules/crypto-js/mode-ctr.js": +/*!********************************************!*\ + !*** ./node_modules/crypto-js/mode-ctr.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); } else {} }(this, function (CryptoJS) { - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Lookup tables - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; - var INV_SUB_MIX_3 = []; - - // Compute lookup tables - (function () { - // Compute double table - var d = []; - for (var i = 0; i < 256; i++) { - if (i < 128) { - d[i] = i << 1; - } else { - d[i] = (i << 1) ^ 0x11b; - } - } - - // Walk GF(2^8) - var x = 0; - var xi = 0; - for (var i = 0; i < 256; i++) { - // Compute sbox - var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; - SBOX[x] = sx; - INV_SBOX[sx] = x; - - // Compute multiplication - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; - - // Compute sub bytes, mix columns tables - var t = (d[sx] * 0x101) ^ (sx * 0x1010100); - SUB_MIX_0[x] = (t << 24) | (t >>> 8); - SUB_MIX_1[x] = (t << 16) | (t >>> 16); - SUB_MIX_2[x] = (t << 8) | (t >>> 24); - SUB_MIX_3[x] = t; - - // Compute inv sub bytes, inv mix columns tables - var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); - INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); - INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); - INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); - INV_SUB_MIX_3[sx] = t; - - // Compute next counter - if (!x) { - x = xi = 1; - } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; - } - } - }()); - - // Precomputed Rcon lookup - var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; - - /** - * AES block cipher algorithm. - */ - var AES = C_algo.AES = BlockCipher.extend({ - _doReset: function () { - // Skip reset of nRounds has been set before and key did not change - if (this._nRounds && this._keyPriorReset === this._key) { - return; - } + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - // Compute number of rounds - var nRounds = this._nRounds = keySize + 6; - - // Compute number of key schedule rows - var ksRows = (nRounds + 1) * 4; - - // Compute key schedule - var keySchedule = this._keySchedule = []; - for (var ksRow = 0; ksRow < ksRows; ksRow++) { - if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; - } else { - var t = keySchedule[ksRow - 1]; - - if (!(ksRow % keySize)) { - // Rot word - t = (t << 8) | (t >>> 24); - - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; - // Mix Rcon - t ^= RCON[(ksRow / keySize) | 0] << 24; - } else if (keySize > 6 && ksRow % keySize == 4) { - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - } + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } + // Remove IV for subsequent blocks + this._iv = undefined; } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); - // Compute inv key schedule - var invKeySchedule = this._invKeySchedule = []; - for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; - - if (invKsRow % 4) { - var t = keySchedule[ksRow]; - } else { - var t = keySchedule[ksRow - 4]; - } + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 - if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; - } else { - invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ - INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; - } + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); - }, + } + }); - decryptBlock: function (M, offset) { - // Swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; + CTR.Decryptor = Encryptor; - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + return CTR; + }()); - // Inv swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - }, - _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { - // Shortcut - var nRounds = this._nRounds; + return CryptoJS.mode.CTR; - // Get input, add round key - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; +})); - // Key schedule row counter - var ksRow = 4; +/***/ }), - // Rounds - for (var round = 1; round < nRounds; round++) { - // Shift rows, sub bytes, mix columns, add round key - var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; +/***/ "./node_modules/crypto-js/mode-ecb.js": +/*!********************************************!*\ + !*** ./node_modules/crypto-js/mode-ecb.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Update state - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; - } +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { - // Shift rows, sub bytes, add round key - var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; - var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; - var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; - var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); - // Set output - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; - }, + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); - keySize: 256/32 + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } }); - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); - */ - C.AES = BlockCipher._createHelper(AES); + return ECB; }()); - return CryptoJS.AES; + return CryptoJS.mode.ECB; })); /***/ }), -/***/ "./node_modules/crypto-js/cipher-core.js": -/*!***********************************************!*\ - !*** ./node_modules/crypto-js/cipher-core.js ***! - \***********************************************/ +/***/ "./node_modules/crypto-js/mode-ofb.js": +/*!********************************************!*\ + !*** ./node_modules/crypto-js/mode-ofb.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -;(function (root, factory) { +;(function (root, factory, undef) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); } else {} }(this, function (CryptoJS) { /** - * Cipher core components. + * Output Feedback block mode. */ - CryptoJS.lib.Cipher || (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var Base64 = C_enc.Base64; - var C_algo = C.algo; - var EvpKDF = C_algo.EvpKDF; + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); - /** - * Abstract base cipher template. - * - * @property {number} keySize This cipher's key size. Default: 4 (128 bits) - * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) - * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. - * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. - */ - var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - * - * @property {WordArray} iv The IV to use for this operation. - */ - cfg: Base.extend(), + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; - /** - * Creates this cipher in encryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); - */ - createEncryptor: function (key, cfg) { - return this.create(this._ENC_XFORM_MODE, key, cfg); - }, + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); - /** - * Creates this cipher in decryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); - */ - createDecryptor: function (key, cfg) { - return this.create(this._DEC_XFORM_MODE, key, cfg); - }, + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); - /** - * Initializes a newly created cipher. - * - * @param {number} xformMode Either the encryption or decryption transormation mode constant. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @example - * - * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); - */ - init: function (xformMode, key, cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); - // Store transform mode and key - this._xformMode = xformMode; - this._key = key; + OFB.Decryptor = Encryptor; - // Set initial values - this.reset(); - }, + return OFB; + }()); - /** - * Resets this cipher to its initial state. - * - * @example - * - * cipher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - // Perform concrete-cipher logic - this._doReset(); - }, + return CryptoJS.mode.OFB; - /** - * Adds data to be encrypted or decrypted. - * - * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. - * - * @return {WordArray} The data after processing. - * - * @example - * - * var encrypted = cipher.process('data'); - * var encrypted = cipher.process(wordArray); - */ - process: function (dataUpdate) { - // Append - this._append(dataUpdate); +})); - // Process available blocks - return this._process(); - }, +/***/ }), - /** - * Finalizes the encryption or decryption process. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. - * - * @return {WordArray} The data after final processing. - * - * @example - * - * var encrypted = cipher.finalize(); - * var encrypted = cipher.finalize('data'); - * var encrypted = cipher.finalize(wordArray); - */ - finalize: function (dataUpdate) { - // Final data update - if (dataUpdate) { - this._append(dataUpdate); - } +/***/ "./node_modules/crypto-js/pad-ansix923.js": +/*!************************************************!*\ + !*** ./node_modules/crypto-js/pad-ansix923.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Perform concrete-cipher logic - var finalProcessedData = this._doFinalize(); +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { - return finalProcessedData; - }, + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; - keySize: 128/32, + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - ivSize: 128/32, + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; - _ENC_XFORM_MODE: 1, + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, - _DEC_XFORM_MODE: 2, + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - /** - * Creates shortcut functions to a cipher's object interface. - * - * @param {Cipher} cipher The cipher to create a helper for. - * - * @return {Object} An object with encrypt and decrypt shortcut functions. - * - * @static - * - * @example - * - * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); - */ - _createHelper: (function () { - function selectCipherStrategy(key) { - if (typeof key == 'string') { - return PasswordBasedCipher; - } else { - return SerializableCipher; - } - } + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; - return function (cipher) { - return { - encrypt: function (message, key, cfg) { - return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); - }, - decrypt: function (ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); - } - }; - }; - }()) - }); + return CryptoJS.pad.Ansix923; - /** - * Abstract base stream cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) - */ - var StreamCipher = C_lib.StreamCipher = Cipher.extend({ - _doFinalize: function () { - // Process partial blocks - var finalProcessedBlocks = this._process(!!'flush'); +})); - return finalProcessedBlocks; - }, +/***/ }), - blockSize: 1 - }); +/***/ "./node_modules/crypto-js/pad-iso10126.js": +/*!************************************************!*\ + !*** ./node_modules/crypto-js/pad-iso10126.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Mode namespace. - */ - var C_mode = C.mode = {}; +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { - /** - * Abstract base block cipher mode template. - */ - var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ - /** - * Creates this mode for encryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); - */ - createEncryptor: function (cipher, iv) { - return this.Encryptor.create(cipher, iv); - }, + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; - /** - * Creates this mode for decryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); - */ - createDecryptor: function (cipher, iv) { - return this.Decryptor.create(cipher, iv); - }, + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - /** - * Initializes a newly created mode. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @example - * - * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); - */ - init: function (cipher, iv) { - this._cipher = cipher; - this._iv = iv; - } - }); + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, - /** - * Cipher Block Chaining mode. - */ - var CBC = C_mode.CBC = (function () { - /** - * Abstract base CBC mode. - */ - var CBC = BlockCipherMode.extend(); + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - /** - * CBC encryptor. - */ - CBC.Encryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; - // XOR and encrypt - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); + return CryptoJS.pad.Iso10126; - /** - * CBC decryptor. - */ - CBC.Decryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; +})); - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); +/***/ }), - // Decrypt and XOR - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); +/***/ "./node_modules/crypto-js/pad-iso97971.js": +/*!************************************************!*\ + !*** ./node_modules/crypto-js/pad-iso97971.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { - function xorBlock(words, offset, blockSize) { - // Shortcut - var iv = this._iv; + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); - // Choose mixing block - if (iv) { - var block = iv; + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - var block = this._prevBlock; - } + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); - // XOR blocks - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= block[i]; - } - } + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; - return CBC; - }()); - /** - * Padding namespace. - */ - var C_pad = C.pad = {}; + return CryptoJS.pad.Iso97971; - /** - * PKCS #5/7 padding strategy. - */ - var Pkcs7 = C_pad.Pkcs7 = { - /** - * Pads data using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to pad. - * @param {number} blockSize The multiple that the data should be padded to. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.pad(wordArray, 4); - */ - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; +})); - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; +/***/ }), - // Create padding word - var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; +/***/ "./node_modules/crypto-js/pad-nopadding.js": +/*!*************************************************!*\ + !*** ./node_modules/crypto-js/pad-nopadding.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Create padding - var paddingWords = []; - for (var i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); - } - var padding = WordArray.create(paddingWords, nPaddingBytes); +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { - // Add padding - data.concat(padding); - }, + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, - /** - * Unpads data that had been padded using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to unpad. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.unpad(wordArray); - */ - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + unpad: function () { + } + }; - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - /** - * Abstract base block cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) - */ - var BlockCipher = C_lib.BlockCipher = Cipher.extend({ - /** - * Configuration options. - * - * @property {Mode} mode The block mode to use. Default: CBC - * @property {Padding} padding The padding strategy to use. Default: Pkcs7 - */ - cfg: Cipher.cfg.extend({ - mode: CBC, - padding: Pkcs7 - }), + return CryptoJS.pad.NoPadding; - reset: function () { - // Reset cipher - Cipher.reset.call(this); +})); - // Shortcuts - var cfg = this.cfg; - var iv = cfg.iv; - var mode = cfg.mode; +/***/ }), - // Reset block mode - if (this._xformMode == this._ENC_XFORM_MODE) { - var modeCreator = mode.createEncryptor; - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - var modeCreator = mode.createDecryptor; +/***/ "./node_modules/crypto-js/pad-zeropadding.js": +/*!***************************************************!*\ + !*** ./node_modules/crypto-js/pad-zeropadding.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Keep at least one block in the buffer for unpadding - this._minBufferSize = 1; - } - this._mode = modeCreator.call(mode, this, iv && iv.words); - }, +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { - _doProcessBlock: function (words, offset) { - this._mode.processBlock(words, offset); - }, + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; - _doFinalize: function () { - // Shortcut - var padding = this.cfg.padding; + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, - // Finalize - if (this._xformMode == this._ENC_XFORM_MODE) { - // Pad data - padding.pad(this._data, this.blockSize); + unpad: function (data) { + // Shortcut + var dataWords = data.words; - // Process final blocks - var finalProcessedBlocks = this._process(!!'flush'); - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - // Process final blocks - var finalProcessedBlocks = this._process(!!'flush'); + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } + }; - // Unpad data - padding.unpad(finalProcessedBlocks); - } - return finalProcessedBlocks; - }, + return CryptoJS.pad.ZeroPadding; - blockSize: 128/32 - }); +})); + +/***/ }), + +/***/ "./node_modules/crypto-js/pbkdf2.js": +/*!******************************************!*\ + !*** ./node_modules/crypto-js/pbkdf2.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); + } + else {} +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA1 = C_algo.SHA1; + var HMAC = C_algo.HMAC; /** - * A collection of cipher parameters. - * - * @property {WordArray} ciphertext The raw ciphertext. - * @property {WordArray} key The key to this ciphertext. - * @property {WordArray} iv The IV used in the ciphering operation. - * @property {WordArray} salt The salt used with a key derivation function. - * @property {Cipher} algorithm The cipher algorithm. - * @property {Mode} mode The block mode used in the ciphering operation. - * @property {Padding} padding The padding scheme used in the ciphering operation. - * @property {number} blockSize The block size of the cipher. - * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + * Password-Based Key Derivation Function 2 algorithm. */ - var CipherParams = C_lib.CipherParams = Base.extend({ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ /** - * Initializes a newly created cipher params object. - * - * @param {Object} cipherParams An object with any of the possible cipher parameters. - * - * @example + * Configuration options. * - * var cipherParams = CryptoJS.lib.CipherParams.create({ - * ciphertext: ciphertextWordArray, - * key: keyWordArray, - * iv: ivWordArray, - * salt: saltWordArray, - * algorithm: CryptoJS.algo.AES, - * mode: CryptoJS.mode.CBC, - * padding: CryptoJS.pad.PKCS7, - * blockSize: 4, - * formatter: CryptoJS.format.OpenSSL - * }); + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA1 + * @property {number} iterations The number of iterations to perform. Default: 1 */ - init: function (cipherParams) { - this.mixIn(cipherParams); - }, + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA1, + iterations: 1 + }), /** - * Converts this cipher params object to a string. - * - * @param {Format} formatter (Optional) The formatting strategy to use. - * - * @return {string} The stringified cipher params. + * Initializes a newly created key derivation function. * - * @throws Error If neither the formatter nor the default formatter is set. + * @param {Object} cfg (Optional) The configuration options to use for the derivation. * * @example * - * var string = cipherParams + ''; - * var string = cipherParams.toString(); - * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); */ - toString: function (formatter) { - return (formatter || this.formatter).stringify(this); - } - }); - - /** - * Format namespace. - */ - var C_format = C.format = {}; + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, - /** - * OpenSSL formatting strategy. - */ - var OpenSSLFormatter = C_format.OpenSSL = { /** - * Converts a cipher params object to an OpenSSL-compatible string. - * - * @param {CipherParams} cipherParams The cipher params object. + * Computes the Password-Based Key Derivation Function 2. * - * @return {string} The OpenSSL-compatible string. + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. * - * @static + * @return {WordArray} The derived key. * * @example * - * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + * var key = kdf.compute(password, salt); */ - stringify: function (cipherParams) { + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + // Shortcuts - var ciphertext = cipherParams.ciphertext; - var salt = cipherParams.salt; + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; - // Format - if (salt) { - var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); - } else { - var wordArray = ciphertext; - } + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); - return wordArray.toString(Base64); - }, + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; - /** - * Converts an OpenSSL-compatible string to a cipher params object. - * - * @param {string} openSSLStr The OpenSSL-compatible string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); - */ - parse: function (openSSLStr) { - // Parse base64 - var ciphertext = Base64.parse(openSSLStr); + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); - // Shortcut - var ciphertextWords = ciphertext.words; + // Shortcut + var intermediateWords = intermediate.words; - // Test for salt - if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { - // Extract salt - var salt = WordArray.create(ciphertextWords.slice(2, 4)); + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } - // Remove salt from ciphertext - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; + derivedKey.concat(block); + blockIndexWords[0]++; } + derivedKey.sigBytes = keySize * 4; - return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + return derivedKey; } - }; + }); /** - * A cipher wrapper that returns ciphertext as a serializable cipher params object. + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); */ - var SerializableCipher = C_lib.SerializableCipher = Base.extend({ - /** - * Configuration options. - * - * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL - */ - cfg: Base.extend({ - format: OpenSSLFormatter - }), - - /** - * Encrypts a message. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); - // Encrypt - var encryptor = cipher.createEncryptor(key, cfg); - var ciphertext = encryptor.finalize(message); - // Shortcut - var cipherCfg = encryptor.cfg; + return CryptoJS.PBKDF2; - // Create and return serializable cipher params - return CipherParams.create({ - ciphertext: ciphertext, - key: key, - iv: cipherCfg.iv, - algorithm: cipher, - mode: cipherCfg.mode, - padding: cipherCfg.padding, - blockSize: cipher.blockSize, - formatter: cfg.format - }); - }, +})); - /** - * Decrypts serialized ciphertext. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); +/***/ }), - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); +/***/ "./node_modules/crypto-js/rabbit-legacy.js": +/*!*************************************************!*\ + !*** ./node_modules/crypto-js/rabbit-legacy.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Decrypt - var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { - return plaintext; - }, + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; - /** - * Converts serialized ciphertext to CipherParams, - * else assumed CipherParams already and returns ciphertext unchanged. - * - * @param {CipherParams|string} ciphertext The ciphertext. - * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. - * - * @return {CipherParams} The unserialized ciphertext. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); - */ - _parse: function (ciphertext, format) { - if (typeof ciphertext == 'string') { - return format.parse(ciphertext, this); - } else { - return ciphertext; - } - } - }); + // Reusable objects + var S = []; + var C_ = []; + var G = []; /** - * Key derivation function namespace. + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. */ - var C_kdf = C.kdf = {}; + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; - /** - * OpenSSL key derivation function. - */ - var OpenSSLKdf = C_kdf.OpenSSL = { - /** - * Derives a key and IV from a password. - * - * @param {string} password The password to derive from. - * @param {number} keySize The size in words of the key to generate. - * @param {number} ivSize The size in words of the IV to generate. - * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. - * - * @return {CipherParams} A cipher params object with the key, IV, and salt. - * - * @static - * - * @example - * - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); - */ - execute: function (password, keySize, ivSize, salt) { - // Generate random salt - if (!salt) { - salt = WordArray.random(64/8); - } + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; - // Derive key and IV - var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; - // Separate key and IV - var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; + // Carry bit + this._b = 0; - // Return params - return CipherParams.create({ key: key, iv: iv, salt: salt }); - } - }; + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } - /** - * A serializable cipher wrapper that derives the key from a password, - * and returns ciphertext as a serializable cipher params object. - */ - var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ - /** - * Configuration options. - * - * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL - */ - cfg: SerializableCipher.cfg.extend({ - kdf: OpenSSLKdf - }), + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } - /** - * Encrypts a message using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); - // Add IV to config - cfg.iv = derivedParams.iv; + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; - // Encrypt - var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, - // Mix in derived params - ciphertext.mixIn(derivedParams); + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; - return ciphertext; + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } }, - /** - * Decrypts serialized ciphertext using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); + blockSize: 128/32, - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); + ivSize: 64/32 + }); - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; - // Add IV to config - cfg.iv = derivedParams.iv; + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } - // Decrypt - var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - return plaintext; + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; } - }); + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); }()); + return CryptoJS.RabbitLegacy; + })); /***/ }), -/***/ "./node_modules/crypto-js/core.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/core.js ***! - \****************************************/ +/***/ "./node_modules/crypto-js/rabbit.js": +/*!******************************************!*\ + !*** ./node_modules/crypto-js/rabbit.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -;(function (root, factory) { +;(function (root, factory, undef) { if (true) { // CommonJS - module.exports = exports = factory(); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); } else {} -}(this, function () { +}(this, function (CryptoJS) { - /** - * CryptoJS core components. - */ - var CryptoJS = CryptoJS || (function (Math, undefined) { - /* - * Local polyfil of Object.create - */ - var create = Object.create || (function () { - function F() {}; + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; - return function (obj) { - var subtype; + // Reusable objects + var S = []; + var C_ = []; + var G = []; - F.prototype = obj; + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; - subtype = new F(); + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } - F.prototype = null; + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; - return subtype; - }; - }()) + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; - /** - * CryptoJS namespace. - */ - var C = {}; + // Carry bit + this._b = 0; - /** - * Library namespace. - */ - var C_lib = C.lib = {}; + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } - /** - * Base object for prototypal inheritance. - */ - var Base = C_lib.Base = (function () { + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; - return { - /** - * Creates a new object that inherits from this object. - * - * @param {Object} overrides Properties to copy into the new object. - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * field: 'value', - * - * method: function () { - * } - * }); - */ - extend: function (overrides) { - // Spawn - var subtype = create(this); + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); - // Augment - if (overrides) { - subtype.mixIn(overrides); - } + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; - // Create default initializer - if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { - subtype.init = function () { - subtype.$super.init.apply(this, arguments); - }; + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); } + } + }, - // Initializer's prototype is the subtype object - subtype.init.prototype = subtype; + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; - // Reference supertype - subtype.$super = this; + // Iterate the system + nextState.call(this); - return subtype; - }, + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - /** - * Extends this object and runs the init method. - * Arguments to create() will be passed to init(). - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var instance = MyType.create(); - */ - create: function () { - var instance = this.extend(); - instance.init.apply(instance, arguments); + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - return instance; - }, + // Encrypt + M[offset + i] ^= S[i]; + } + }, - /** - * Initializes a newly created object. - * Override this method to add some logic when your objects are created. - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * init: function () { - * // ... - * } - * }); - */ - init: function () { - }, + blockSize: 128/32, - /** - * Copies properties into this object. - * - * @param {Object} properties The properties to mix in. - * - * @example - * - * MyType.mixIn({ - * field: 'value' - * }); - */ - mixIn: function (properties) { - for (var propertyName in properties) { - if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; - } - } + ivSize: 64/32 + }); - // IE won't copy toString using the loop above - if (properties.hasOwnProperty('toString')) { - this.toString = properties.toString; - } - }, + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = instance.clone(); - */ - clone: function () { - return this.init.prototype.extend(this); - } - }; - }()); + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } /** - * An array of 32-bit words. + * Shortcut functions to the cipher's object interface. * - * @property {Array} words The array of 32-bit words. - * @property {number} sigBytes The number of significant bytes in this word array. + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); */ - var WordArray = C_lib.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of 32-bit words. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.create(); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); - */ - init: function (words, sigBytes) { - words = this.words = words || []; + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 4; - } - }, - /** - * Converts this word array to a string. - * - * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex - * - * @return {string} The stringified word array. - * - * @example - * - * var string = wordArray + ''; - * var string = wordArray.toString(); - * var string = wordArray.toString(CryptoJS.enc.Utf8); - */ - toString: function (encoder) { - return (encoder || Hex).stringify(this); - }, + return CryptoJS.Rabbit; - /** - * Concatenates a word array to this word array. - * - * @param {WordArray} wordArray The word array to append. - * - * @return {WordArray} This word array. - * - * @example - * - * wordArray1.concat(wordArray2); - */ - concat: function (wordArray) { - // Shortcuts - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; +})); - // Clamp excess bits - this.clamp(); +/***/ }), - // Concat - if (thisSigBytes % 4) { - // Copy one byte at a time - for (var i = 0; i < thatSigBytes; i++) { - var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); - } - } else { - // Copy one word at a time - for (var i = 0; i < thatSigBytes; i += 4) { - thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; - } - } - this.sigBytes += thatSigBytes; +/***/ "./node_modules/crypto-js/rc4.js": +/*!***************************************!*\ + !*** ./node_modules/crypto-js/rc4.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Chainable - return this; - }, +;(function (root, factory, undef) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + } + else {} +}(this, function (CryptoJS) { - /** - * Removes insignificant bits. - * - * @example - * - * wordArray.clamp(); - */ - clamp: function () { - // Shortcuts - var words = this.words; - var sigBytes = this.sigBytes; + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; - // Clamp - words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); - words.length = Math.ceil(sigBytes / 4); - }, + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; - /** - * Creates a copy of this word array. - * - * @return {WordArray} The clone. - * - * @example - * - * var clone = wordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone.words = this.words.slice(0); + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } - return clone; - }, + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; - /** - * Creates a word array filled with random bytes. - * - * @param {number} nBytes The number of random bytes to generate. - * - * @return {WordArray} The random word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.random(16); - */ - random: function (nBytes) { - var words = []; + j = (j + S[i] + keyByte) % 256; - var r = (function (m_w) { - var m_w = m_w; - var m_z = 0x3ade68b1; - var mask = 0xffffffff; + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } - return function () { - m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; - m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; - var result = ((m_z << 0x10) + m_w) & mask; - result /= 0x100000000; - result += 0.5; - return result * (Math.random() > .5 ? 1 : -1); - } - }); + // Counters + this._i = this._j = 0; + }, - for (var i = 0, rcache; i < nBytes; i += 4) { - var _r = r((rcache || Math.random()) * 0x100000000); + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, - rcache = _r() * 0x3ade67b7; - words.push((_r() * 0x100000000) | 0); - } + keySize: 256/32, - return new WordArray.init(words, nBytes); - } + ivSize: 0 }); - /** - * Encoder namespace. - */ - var C_enc = C.enc = {}; - - /** - * Hex encoding strategy. - */ - var Hex = C_enc.Hex = { - /** - * Converts a word array to a hex string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The hex string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.enc.Hex.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; - // Convert - var hexChars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 0x0f).toString(16)); - } + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; - return hexChars.join(''); - }, + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; - /** - * Converts a hex string to a word array. - * - * @param {string} hexStr The hex string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Hex.parse(hexString); - */ - parse: function (hexStr) { - // Shortcut - var hexStrLength = hexStr.length; + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } - // Convert - var words = []; - for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); - } + // Update counters + this._i = i; + this._j = j; - return new WordArray.init(words, hexStrLength / 2); - } - }; + return keystreamWord; + } /** - * Latin1 encoding strategy. + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); */ - var Latin1 = C_enc.Latin1 = { - /** - * Converts a word array to a Latin1 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Latin1 string. - * - * @static - * - * @example - * - * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var latin1Chars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - latin1Chars.push(String.fromCharCode(bite)); - } - - return latin1Chars.join(''); - }, - - /** - * Converts a Latin1 string to a word array. - * - * @param {string} latin1Str The Latin1 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); - */ - parse: function (latin1Str) { - // Shortcut - var latin1StrLength = latin1Str.length; - - // Convert - var words = []; - for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); - } - - return new WordArray.init(words, latin1StrLength); - } - }; + C.RC4 = StreamCipher._createHelper(RC4); /** - * UTF-8 encoding strategy. + * Modified RC4 stream cipher algorithm. */ - var Utf8 = C_enc.Utf8 = { + var RC4Drop = C_algo.RC4Drop = RC4.extend({ /** - * Converts a word array to a UTF-8 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-8 string. - * - * @static - * - * @example + * Configuration options. * - * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + * @property {number} drop The number of keystream words to drop. Default 192 */ - stringify: function (wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error('Malformed UTF-8 data'); - } - }, + cfg: RC4.cfg.extend({ + drop: 192 + }), - /** - * Converts a UTF-8 string to a word array. - * - * @param {string} utf8Str The UTF-8 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); - */ - parse: function (utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } } - }; + }); /** - * Abstract buffered block algorithm template. + * Shortcut functions to the cipher's object interface. * - * The property blockSize must be implemented in a concrete subtype. + * @example * - * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); */ - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * - * bufferedBlockAlgorithm.reset(); - */ - reset: function () { - // Initial values - this._data = new WordArray.init(); - this._nDataBytes = 0; - }, + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); - /** - * Adds new data to this block algorithm's buffer. - * - * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. - * - * @example - * - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - */ - _append: function (data) { - // Convert string to WordArray, else assume WordArray already - if (typeof data == 'string') { - data = Utf8.parse(data); - } - // Append - this._data.concat(data); - this._nDataBytes += data.sigBytes; - }, + return CryptoJS.RC4; - /** - * Processes available data blocks. - * - * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. - * - * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. - * - * @return {WordArray} The processed data. - * - * @example - * - * var processedData = bufferedBlockAlgorithm._process(); - * var processedData = bufferedBlockAlgorithm._process(!!'flush'); - */ - _process: function (doFlush) { - // Shortcuts - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; +})); - // Count blocks ready - var nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - // Round up to include partial blocks - nBlocksReady = Math.ceil(nBlocksReady); - } else { - // Round down to include only full blocks, - // less the number of blocks that must remain in the buffer - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } +/***/ }), - // Count words ready - var nWordsReady = nBlocksReady * blockSize; +/***/ "./node_modules/crypto-js/ripemd160.js": +/*!*********************************************!*\ + !*** ./node_modules/crypto-js/ripemd160.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Count bytes ready - var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); +;(function (root, factory) { + if (true) { + // CommonJS + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + } + else {} +}(this, function (CryptoJS) { - // Process blocks - if (nWordsReady) { - for (var offset = 0; offset < nWordsReady; offset += blockSize) { - // Perform concrete-algorithm logic - this._doProcessBlock(dataWords, offset); - } + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. - // Remove processed words - var processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - // Return processed words - return new WordArray.init(processedWords, nBytesReady); - }, + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = bufferedBlockAlgorithm.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone._data = this._data.clone(); + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ - return clone; - }, + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; - _minBufferSize: 0 - }); + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); /** - * Abstract hasher template. - * - * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + * RIPEMD160 hash algorithm. */ - var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - */ - cfg: Base.extend(), + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, - /** - * Initializes a newly created hasher. - * - * @param {Object} cfg (Optional) The configuration options to use for this hash computation. - * - * @example - * - * var hasher = CryptoJS.algo.SHA256.create(); - */ - init: function (cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); + _doProcessBlock: function (M, offset) { - // Set initial values - this.reset(); - }, + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; - /** - * Resets this hasher to its initial state. - * - * @example - * - * hasher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; - // Perform concrete-hasher logic - this._doReset(); + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; }, - /** - * Updates this hasher with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {Hasher} This hasher. - * - * @example - * - * hasher.update('message'); - * hasher.update(wordArray); - */ - update: function (messageUpdate) { - // Append - this._append(messageUpdate); + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; - // Update the hash + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks this._process(); - // Chainable - return this; - }, + // Shortcuts + var hash = this._hash; + var H = hash.words; - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The hash. - * - * @example - * - * var hash = hasher.finalize(); - * var hash = hasher.finalize('message'); - * var hash = hasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Final message update - if (messageUpdate) { - this._append(messageUpdate); - } + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; - // Perform concrete-hasher logic - var hash = this._doFinalize(); + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + // Return final computed hash return hash; }, - blockSize: 512/32, - - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param {Hasher} hasher The hasher to create a helper for. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); - */ - _createHelper: function (hasher) { - return function (message, cfg) { - return new hasher.init(cfg).finalize(message); - }; - }, + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param {Hasher} hasher The hasher to use in this HMAC helper. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); - */ - _createHmacHelper: function (hasher) { - return function (message, key) { - return new C_algo.HMAC.init(hasher, key).finalize(message); - }; + return clone; } }); + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + /** - * Algorithm namespace. + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); */ - var C_algo = C.algo = {}; + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); - return C; + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); }(Math)); - return CryptoJS; + return CryptoJS.RIPEMD160; })); /***/ }), -/***/ "./node_modules/crypto-js/enc-base64.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/enc-base64.js ***! - \**********************************************/ +/***/ "./node_modules/crypto-js/sha1.js": +/*!****************************************!*\ + !*** ./node_modules/crypto-js/sha1.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21206,135 +21445,150 @@ function objectToString(o) { var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; - var C_enc = C.enc; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; /** - * Base64 encoding strategy. + * SHA-1 hash algorithm. */ - var Base64 = C_enc.Base64 = { - /** - * Converts a word array to a Base64 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Base64 string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = this._map; - - // Clamp excess bits - wordArray.clamp(); + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); } - } - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; } - return base64Chars.join(''); + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; }, - /** - * Converts a Base64 string to a word array. - * - * @param {string} base64Str The Base64 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64.parse(base64String); - */ - parse: function (base64Str) { + _doFinalize: function () { // Shortcuts - var base64StrLength = base64Str.length; - var map = this._map; - var reverseMap = this._reverseMap; + var data = this._data; + var dataWords = data.words; - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); + // Hash final blocks + this._process(); + // Return final computed hash + return this._hash; }, - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' - }; + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); }()); - return CryptoJS.enc.Base64; + return CryptoJS.SHA1; })); /***/ }), -/***/ "./node_modules/crypto-js/enc-utf16.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/enc-utf16.js ***! - \*********************************************/ +/***/ "./node_modules/crypto-js/sha224.js": +/*!******************************************!*\ + !*** ./node_modules/crypto-js/sha224.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -;(function (root, factory) { +;(function (root, factory, undef) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js")); } else {} }(this, function (CryptoJS) { @@ -21344,745 +21598,933 @@ function objectToString(o) { var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; - var C_enc = C.enc; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; /** - * UTF-16 BE encoding strategy. + * SHA-224 hash algorithm. */ - var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { - /** - * Converts a word array to a UTF-16 BE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 BE string. - * - * @static - * - * @example - * - * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 BE string to a word array. - * - * @param {string} utf16Str The UTF-16 BE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); - } + hash.sigBytes -= 4; - return WordArray.create(words, utf16StrLength * 2); + return hash; } - }; + }); /** - * UTF-16 LE encoding strategy. + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); */ - C_enc.Utf16LE = { - /** - * Converts a word array to a UTF-16 LE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 LE string. - * - * @static - * - * @example - * - * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 LE string to a word array. - * - * @param {string} utf16Str The UTF-16 LE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; + C.SHA224 = SHA256._createHelper(SHA224); - function swapEndian(word) { - return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); - } + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); }()); - return CryptoJS.enc.Utf16; + return CryptoJS.SHA224; })); /***/ }), -/***/ "./node_modules/crypto-js/evpkdf.js": +/***/ "./node_modules/crypto-js/sha256.js": /*!******************************************!*\ - !*** ./node_modules/crypto-js/evpkdf.js ***! + !*** ./node_modules/crypto-js/sha256.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -;(function (root, factory, undef) { +;(function (root, factory) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); } else {} }(this, function (CryptoJS) { - (function () { + (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; - var Base = C_lib.Base; var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; var C_algo = C.algo; - var MD5 = C_algo.MD5; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; /** - * This key derivation function is meant to conform with EVP_BytesToKey. - * www.openssl.org/docs/crypto/EVP_BytesToKey.html + * SHA-256 hash algorithm. */ - var EvpKDF = C_algo.EvpKDF = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hash algorithm to use. Default: MD5 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: MD5, - iterations: 1 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.EvpKDF.create(); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); }, - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { + _doProcessBlock: function (M, offset) { // Shortcut - var cfg = this.cfg; + var H = this._hash.words; - // Init hasher - var hasher = cfg.hasher.create(); + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; - // Initial values - var derivedKey = WordArray.create(); + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); - // Shortcuts - var derivedKeyWords = derivedKey.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); - // Generate key - while (derivedKeyWords.length < keySize) { - if (block) { - hasher.update(block); + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; } - var block = hasher.update(password).finalize(salt); - hasher.reset(); - // Iterations - for (var i = 1; i < iterations; i++) { - block = hasher.finalize(block); - hasher.reset(); - } + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); - derivedKey.concat(block); + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; } - derivedKey.sigBytes = keySize * 4; - return derivedKey; + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; } }); /** - * Derives a key from a password. + * Shortcut function to the hasher's object interface. * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. + * @param {WordArray|string} message The message to hash. * - * @return {WordArray} The derived key. + * @return {WordArray} The hash. * * @static * * @example * - * var key = CryptoJS.EvpKDF(password, salt); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); */ - C.EvpKDF = function (password, salt, cfg) { - return EvpKDF.create(cfg).compute(password, salt); - }; - }()); + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); - return CryptoJS.EvpKDF; + return CryptoJS.SHA256; })); /***/ }), -/***/ "./node_modules/crypto-js/format-hex.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/format-hex.js ***! - \**********************************************/ +/***/ "./node_modules/crypto-js/sha3.js": +/*!****************************************!*\ + !*** ./node_modules/crypto-js/sha3.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); } else {} }(this, function (CryptoJS) { - (function (undefined) { + (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; - var CipherParams = C_lib.CipherParams; - var C_enc = C.enc; - var Hex = C_enc.Hex; - var C_format = C.format; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; - var HexFormatter = C_format.Hex = { - /** - * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The hexadecimally encoded string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.format.Hex.stringify(cipherParams); - */ - stringify: function (cipherParams) { - return cipherParams.ciphertext.toString(Hex); - }, + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; - /** - * Converts a hexadecimally encoded ciphertext string to a cipher params object. - * - * @param {string} input The hexadecimally encoded string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.Hex.parse(hexString); - */ - parse: function (input) { - var ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext: ciphertext }); - } - }; - }()); + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } - return CryptoJS.format.Hex; + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } -})); + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; -/***/ }), + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } -/***/ "./node_modules/crypto-js/hmac.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/hmac.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var C_algo = C.algo; + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); /** - * HMAC algorithm. + * SHA-3 hash algorithm. */ - var HMAC = C_algo.HMAC = Base.extend({ + var SHA3 = C_algo.SHA3 = Hasher.extend({ /** - * Initializes a newly created HMAC. - * - * @param {Hasher} hasher The hash algorithm to use. - * @param {WordArray|string} key The secret key. - * - * @example + * Configuration options. * - * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 */ - init: function (hasher, key) { - // Init hasher - hasher = this._hasher = new hasher.init(); + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), - // Convert string to WordArray, else assume WordArray already - if (typeof key == 'string') { - key = Utf8.parse(key); + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); } + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { // Shortcuts - var hasherBlockSize = hasher.blockSize; - var hasherBlockSizeBytes = hasherBlockSize * 4; + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; - // Allow arbitrary length keys - if (key.sigBytes > hasherBlockSizeBytes) { - key = hasher.finalize(key); + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; } - // Clamp excess bits - key.clamp(); + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } - // Clone key for inner and outer pads - var oKey = this._oKey = key.clone(); - var iKey = this._iKey = key.clone(); + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; - // Shortcuts - var oKeyWords = oKey.words; - var iKeyWords = iKey.words; + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } - // XOR keys with pad constants - for (var i = 0; i < hasherBlockSize; i++) { - oKeyWords[i] ^= 0x5c5c5c5c; - iKeyWords[i] ^= 0x36363636; - } - oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; - // Set initial values - this.reset(); - }, + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } - /** - * Resets this HMAC to its initial state. - * - * @example - * - * hmacHasher.reset(); - */ - reset: function () { - // Shortcut - var hasher = this._hasher; + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } - // Reset - hasher.reset(); - hasher.update(this._iKey); + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } }, - /** - * Updates this HMAC with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {HMAC} This HMAC instance. - * - * @example - * - * hmacHasher.update('message'); - * hmacHasher.update(wordArray); - */ - update: function (messageUpdate) { - this._hasher.update(messageUpdate); + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; - // Chainable - return this; + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); }, - /** - * Finalizes the HMAC computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The HMAC. - * - * @example - * - * var hmac = hmacHasher.finalize(); - * var hmac = hmacHasher.finalize('message'); - * var hmac = hmacHasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Shortcut - var hasher = this._hasher; + clone: function () { + var clone = Hasher.clone.call(this); - // Compute HMAC - var innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } - return hmac; + return clone; } }); - }()); + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/crypto-js/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./lib-typedarrays */ "./node_modules/crypto-js/lib-typedarrays.js"), __webpack_require__(/*! ./enc-utf16 */ "./node_modules/crypto-js/enc-utf16.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./sha224 */ "./node_modules/crypto-js/sha224.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js"), __webpack_require__(/*! ./sha384 */ "./node_modules/crypto-js/sha384.js"), __webpack_require__(/*! ./sha3 */ "./node_modules/crypto-js/sha3.js"), __webpack_require__(/*! ./ripemd160 */ "./node_modules/crypto-js/ripemd160.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js"), __webpack_require__(/*! ./pbkdf2 */ "./node_modules/crypto-js/pbkdf2.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js"), __webpack_require__(/*! ./mode-cfb */ "./node_modules/crypto-js/mode-cfb.js"), __webpack_require__(/*! ./mode-ctr */ "./node_modules/crypto-js/mode-ctr.js"), __webpack_require__(/*! ./mode-ctr-gladman */ "./node_modules/crypto-js/mode-ctr-gladman.js"), __webpack_require__(/*! ./mode-ofb */ "./node_modules/crypto-js/mode-ofb.js"), __webpack_require__(/*! ./mode-ecb */ "./node_modules/crypto-js/mode-ecb.js"), __webpack_require__(/*! ./pad-ansix923 */ "./node_modules/crypto-js/pad-ansix923.js"), __webpack_require__(/*! ./pad-iso10126 */ "./node_modules/crypto-js/pad-iso10126.js"), __webpack_require__(/*! ./pad-iso97971 */ "./node_modules/crypto-js/pad-iso97971.js"), __webpack_require__(/*! ./pad-zeropadding */ "./node_modules/crypto-js/pad-zeropadding.js"), __webpack_require__(/*! ./pad-nopadding */ "./node_modules/crypto-js/pad-nopadding.js"), __webpack_require__(/*! ./format-hex */ "./node_modules/crypto-js/format-hex.js"), __webpack_require__(/*! ./aes */ "./node_modules/crypto-js/aes.js"), __webpack_require__(/*! ./tripledes */ "./node_modules/crypto-js/tripledes.js"), __webpack_require__(/*! ./rc4 */ "./node_modules/crypto-js/rc4.js"), __webpack_require__(/*! ./rabbit */ "./node_modules/crypto-js/rabbit.js"), __webpack_require__(/*! ./rabbit-legacy */ "./node_modules/crypto-js/rabbit-legacy.js")); - } - else {} -}(this, function (CryptoJS) { - return CryptoJS; + return CryptoJS.SHA3; })); /***/ }), -/***/ "./node_modules/crypto-js/lib-typedarrays.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/lib-typedarrays.js ***! - \***************************************************/ +/***/ "./node_modules/crypto-js/sha384.js": +/*!******************************************!*\ + !*** ./node_modules/crypto-js/sha384.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -;(function (root, factory) { +;(function (root, factory, undef) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js")); } else {} }(this, function (CryptoJS) { (function () { - // Check if typed arrays are supported - if (typeof ArrayBuffer != 'function') { - return; - } - // Shortcuts var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - - // Reference original init - var superInit = WordArray.init; - - // Augment WordArray.init to handle typed arrays - var subInit = WordArray.init = function (typedArray) { - // Convert buffers to uint8 - if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); - } + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; - // Convert other array views to uint8 - if ( - typedArray instanceof Int8Array || - (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || - typedArray instanceof Int16Array || - typedArray instanceof Uint16Array || - typedArray instanceof Int32Array || - typedArray instanceof Uint32Array || - typedArray instanceof Float32Array || - typedArray instanceof Float64Array - ) { - typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); - } + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, - // Handle Uint8Array - if (typedArray instanceof Uint8Array) { - // Shortcut - var typedArrayByteLength = typedArray.byteLength; + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); - // Extract bytes - var words = []; - for (var i = 0; i < typedArrayByteLength; i++) { - words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); - } + hash.sigBytes -= 16; - // Initialize this word array - superInit.call(this, words, typedArrayByteLength); - } else { - // Else call normal init - superInit.apply(this, arguments); + return hash; } - }; + }); - subInit.prototype = WordArray; + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); }()); - return CryptoJS.lib.WordArray; + return CryptoJS.SHA384; })); /***/ }), -/***/ "./node_modules/crypto-js/md5.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/md5.js ***! - \***************************************/ +/***/ "./node_modules/crypto-js/sha512.js": +/*!******************************************!*\ + !*** ./node_modules/crypto-js/sha512.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -;(function (root, factory) { +;(function (root, factory, undef) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); } else {} }(this, function (CryptoJS) { - (function (Math) { + (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; - var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; var C_algo = C.algo; - // Constants table - var T = []; + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } - // Compute constants + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; (function () { - for (var i = 0; i < 64; i++) { - T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); } }()); /** - * MD5 hash algorithm. + * SHA-512 hash algorithm. */ - var MD5 = C_algo.MD5 = Hasher.extend({ + var SHA512 = C_algo.SHA512 = Hasher.extend({ _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476 + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) ]); }, _doProcessBlock: function (M, offset) { - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - // Shortcuts var H = this._hash.words; - var M_offset_0 = M[offset + 0]; - var M_offset_1 = M[offset + 1]; - var M_offset_2 = M[offset + 2]; - var M_offset_3 = M[offset + 3]; - var M_offset_4 = M[offset + 4]; - var M_offset_5 = M[offset + 5]; - var M_offset_6 = M[offset + 6]; - var M_offset_7 = M[offset + 7]; - var M_offset_8 = M[offset + 8]; - var M_offset_9 = M[offset + 9]; - var M_offset_10 = M[offset + 10]; - var M_offset_11 = M[offset + 11]; - var M_offset_12 = M[offset + 12]; - var M_offset_13 = M[offset + 13]; - var M_offset_14 = M[offset + 14]; - var M_offset_15 = M[offset + 15]; + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; - // Working varialbes - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; - // Computation - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); }, _doFinalize: function () { @@ -22095,35 +22537,15 @@ function objectToString(o) { // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - - var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); - var nBitsTotalL = nBitsTotal; - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( - (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | - (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) - ); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | - (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) - ); - - data.sigBytes = (dataWords.length + 1) * 4; + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 4; i++) { - // Shortcut - var H_i = H[i]; - - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); // Return final computed hash return hash; @@ -22134,28 +22556,10 @@ function objectToString(o) { clone._hash = this._hash.clone(); return clone; - } - }); - - function FF(a, b, c, d, x, s, t) { - var n = a + ((b & c) | (~b & d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function GG(a, b, c, d, x, s, t) { - var n = a + ((b & d) | (c & ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function HH(a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } + }, - function II(a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } + blockSize: 1024/32 + }); /** * Shortcut function to the hasher's object interface. @@ -22168,10 +22572,10 @@ function objectToString(o) { * * @example * - * var hash = CryptoJS.MD5('message'); - * var hash = CryptoJS.MD5(wordArray); + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); */ - C.MD5 = Hasher._createHelper(MD5); + C.SHA512 = Hasher._createHelper(SHA512); /** * Shortcut function to the HMAC's object interface. @@ -22185,923 +22589,727 @@ function objectToString(o) { * * @example * - * var hmac = CryptoJS.HmacMD5(message, key); + * var hmac = CryptoJS.HmacSHA512(message, key); */ - C.HmacMD5 = Hasher._createHmacHelper(MD5); - }(Math)); - - - return CryptoJS.MD5; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-cfb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-cfb.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher Feedback block mode. - */ - CryptoJS.mode.CFB = (function () { - var CFB = CryptoJS.lib.BlockCipherMode.extend(); - - CFB.Encryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - CFB.Decryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { - // Shortcut - var iv = this._iv; - - // Generate keystream - if (iv) { - var keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - var keystream = this._prevBlock; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - - return CFB; + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); }()); - return CryptoJS.mode.CFB; + return CryptoJS.SHA512; })); /***/ }), -/***/ "./node_modules/crypto-js/mode-ctr-gladman.js": -/*!****************************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr-gladman.js ***! - \****************************************************/ +/***/ "./node_modules/crypto-js/tripledes.js": +/*!*********************************************!*\ + !*** ./node_modules/crypto-js/tripledes.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); } else {} }(this, function (CryptoJS) { - /** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ - CryptoJS.mode.CTRGladman = (function () { - var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); - - function incWord(word) - { - if (((word >> 24) & 0xff) === 0xff) { //overflow - var b1 = (word >> 16)&0xff; - var b2 = (word >> 8)&0xff; - var b3 = word & 0xff; - - if (b1 === 0xff) // overflow b1 - { - b1 = 0; - if (b2 === 0xff) - { - b2 = 0; - if (b3 === 0xff) - { - b3 = 0; - } - else - { - ++b3; - } - } - else - { - ++b2; - } - } - else - { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } - else - { - word += (0x01 << 24); - } - return word; - } - - function incCounter(counter) - { - if ((counter[0] = incWord(counter[0])) === 0) - { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = incWord(counter[1]); - } - return counter; - } - - var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - - incCounter(counter); - - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTRGladman.Decryptor = Encryptor; - - return CTRGladman; - }()); - + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; - return CryptoJS.mode.CTRGladman; + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Counter block mode. - */ - CryptoJS.mode.CTR = (function () { - var CTR = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = CTR.Encryptor = CTR.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Increment counter - counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTR.Decryptor = Encryptor; - - return CTR; - }()); - - - return CryptoJS.mode.CTR; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ecb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ecb.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Electronic Codebook block mode. - */ - CryptoJS.mode.ECB = (function () { - var ECB = CryptoJS.lib.BlockCipherMode.extend(); - - ECB.Encryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.encryptBlock(words, offset); - } - }); - - ECB.Decryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.decryptBlock(words, offset); - } - }); - - return ECB; - }()); - - - return CryptoJS.mode.ECB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ofb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ofb.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Output Feedback block mode. - */ - CryptoJS.mode.OFB = (function () { - var OFB = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = OFB.Encryptor = OFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var keystream = this._keystream; - - // Generate keystream - if (iv) { - keystream = this._keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - OFB.Decryptor = Encryptor; - - return OFB; - }()); - - - return CryptoJS.mode.OFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-ansix923.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-ansix923.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ANSI X.923 padding strategy. - */ - CryptoJS.pad.AnsiX923 = { - pad: function (data, blockSize) { - // Shortcuts - var dataSigBytes = data.sigBytes; - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - - // Compute last byte position - var lastBytePos = dataSigBytes + nPaddingBytes - 1; - - // Pad - data.clamp(); - data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); - data.sigBytes += nPaddingBytes; - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Ansix923; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso10126.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso10126.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO 10126 padding strategy. - */ - CryptoJS.pad.Iso10126 = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Pad - data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). - concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Iso10126; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso97971.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso97971.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO/IEC 9797-1 Padding Method 2. - */ - CryptoJS.pad.Iso97971 = { - pad: function (data, blockSize) { - // Add 0x80 byte - data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); - - // Zero pad the rest - CryptoJS.pad.ZeroPadding.pad(data, blockSize); - }, - - unpad: function (data) { - // Remove zero padding - CryptoJS.pad.ZeroPadding.unpad(data); - - // Remove one more byte -- the 0x80 byte - data.sigBytes--; - } - }; - - - return CryptoJS.pad.Iso97971; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-nopadding.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/pad-nopadding.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * A noop padding strategy. - */ - CryptoJS.pad.NoPadding = { - pad: function () { - }, - - unpad: function () { - } - }; - - - return CryptoJS.pad.NoPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-zeropadding.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/pad-zeropadding.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Zero padding strategy. - */ - CryptoJS.pad.ZeroPadding = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Pad - data.clamp(); - data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); - }, - - unpad: function (data) { - // Shortcut - var dataWords = data.words; - - // Unpad - var i = data.sigBytes - 1; - while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { - i--; - } - data.sigBytes = i + 1; - } - }; - - - return CryptoJS.pad.ZeroPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pbkdf2.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/pbkdf2.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA1 = C_algo.SHA1; - var HMAC = C_algo.HMAC; - - /** - * Password-Based Key Derivation Function 2 algorithm. - */ - var PBKDF2 = C_algo.PBKDF2 = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hasher to use. Default: SHA1 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: SHA1, - iterations: 1 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.PBKDF2.create(); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - // Shortcut - var cfg = this.cfg; - - // Init HMAC - var hmac = HMAC.create(cfg.hasher, password); - - // Initial values - var derivedKey = WordArray.create(); - var blockIndex = WordArray.create([0x00000001]); + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { // Shortcuts - var derivedKeyWords = derivedKey.words; - var blockIndexWords = blockIndex.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - var block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); + var key = this._key; + var keyWords = key.words; - // Shortcuts - var blockWords = block.words; - var blockWordsLength = blockWords.length; + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } - // Iterations - var intermediate = block; - for (var i = 1; i < iterations; i++) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; - // Shortcut - var intermediateWords = intermediate.words; + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; - // XOR intermediate with block - for (var j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; - } + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); } - derivedKey.concat(block); - blockIndexWords[0]++; + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.PBKDF2(password, salt); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.PBKDF2 = function (password, salt, cfg) { - return PBKDF2.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.PBKDF2; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit-legacy.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/rabbit-legacy.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - /** - * Rabbit stream cipher algorithm. - * - * This is a legacy version that neglected to convert the key to little-endian. - * This error doesn't affect the cipher's security, - * but it does affect its compatibility with other implementations. - */ - var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, - // Carry bit - this._b = 0; + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); - // IV setup - if (iv) { + // Rounds + for (var round = 0; round < 16; round++) { // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); - // Encrypt - M[offset + i] ^= S[i]; - } + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; }, - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; + keySize: 64/32, - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; + ivSize: 64/32, - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + blockSize: 64/32 + }); - // High XOR low - G[i] = gh ^ gl; - } + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; } /** @@ -23109,2888 +23317,376 @@ function objectToString(o) { * * @example * - * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); */ - C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); - }()); - - - return CryptoJS.RabbitLegacy; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/rabbit.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; + C.DES = BlockCipher._createHelper(DES); /** - * Rabbit stream cipher algorithm + * Triple-DES block cipher algorithm. */ - var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ _doReset: function () { // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Swap endian - for (var i = 0; i < 4; i++) { - K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | - (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); - } - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; + var key = this._key; + var keyWords = key.words; - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); }, - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); }, - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + keySize: 192/32, - // High XOR low - G[i] = gh ^ gl; - } + ivSize: 64/32, - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } + blockSize: 64/32 + }); /** * Shortcut functions to the cipher's object interface. * * @example * - * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); */ - C.Rabbit = StreamCipher._createHelper(Rabbit); + C.TripleDES = BlockCipher._createHelper(TripleDES); }()); - return CryptoJS.Rabbit; + return CryptoJS.TripleDES; })); /***/ }), -/***/ "./node_modules/crypto-js/rc4.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/rc4.js ***! - \***************************************/ +/***/ "./node_modules/crypto-js/x64-core.js": +/*!********************************************!*\ + !*** ./node_modules/crypto-js/x64-core.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -;(function (root, factory, undef) { +;(function (root, factory) { if (true) { // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); + module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); } else {} }(this, function (CryptoJS) { - (function () { + (function (undefined) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; /** - * RC4 stream cipher algorithm. + * x64 namespace. */ - var RC4 = C_algo.RC4 = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySigBytes = key.sigBytes; - - // Init sbox - var S = this._S = []; - for (var i = 0; i < 256; i++) { - S[i] = i; - } - - // Key setup - for (var i = 0, j = 0; i < 256; i++) { - var keyByteIndex = i % keySigBytes; - var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; - - j = (j + S[i] + keyByte) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - } - - // Counters - this._i = this._j = 0; - }, - - _doProcessBlock: function (M, offset) { - M[offset] ^= generateKeystreamWord.call(this); - }, - - keySize: 256/32, - - ivSize: 0 - }); - - function generateKeystreamWord() { - // Shortcuts - var S = this._S; - var i = this._i; - var j = this._j; - - // Generate keystream word - var keystreamWord = 0; - for (var n = 0; n < 4; n++) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - - keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); - } - - // Update counters - this._i = i; - this._j = j; - - return keystreamWord; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); - */ - C.RC4 = StreamCipher._createHelper(RC4); + var C_x64 = C.x64 = {}; /** - * Modified RC4 stream cipher algorithm. + * A 64-bit word. */ - var RC4Drop = C_algo.RC4Drop = RC4.extend({ + var X64Word = C_x64.Word = Base.extend({ /** - * Configuration options. + * Initializes a newly created 64-bit word. * - * @property {number} drop The number of keystream words to drop. Default 192 + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); */ - cfg: RC4.cfg.extend({ - drop: 192 - }), + init: function (high, low) { + this.high = high; + this.low = low; + } - _doReset: function () { - RC4._doReset.call(this); + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; - // Drop - for (var i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); - } - } - }); + // return X64Word.create(high, low); + // }, - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); - */ - C.RC4Drop = StreamCipher._createHelper(RC4Drop); - }()); + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + // return X64Word.create(high, low); + // }, - return CryptoJS.RC4; + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; -})); + // return X64Word.create(high, low); + // }, -/***/ }), + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; -/***/ "./node_modules/crypto-js/ripemd160.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/ripemd160.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // return X64Word.create(high, low); + // }, -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } - /** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. + // return X64Word.create(high, low); + // }, - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + // return X64Word.create(high, low); + // }, - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, - // Constants table - var _zl = WordArray.create([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); - var _zr = WordArray.create([ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); - var _sl = WordArray.create([ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); - var _sr = WordArray.create([ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; - var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); - var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + // return X64Word.create(high, low); + // } + }); /** - * RIPEMD160 hash algorithm. + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. */ - var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ - _doReset: function () { - this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); - }, - - _doProcessBlock: function (M, offset) { - - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - // Swap - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - // Shortcut - var H = this._hash.words; - var hl = _hl.words; - var hr = _hr.words; - var zl = _zl.words; - var zr = _zr.words; - var sl = _sl.words; - var sr = _sr.words; - - // Working variables - var al, bl, cl, dl, el; - var ar, br, cr, dr, er; - - ar = al = H[0]; - br = bl = H[1]; - cr = cl = H[2]; - dr = dl = H[3]; - er = el = H[4]; - // Computation - var t; - for (var i = 0; i < 80; i += 1) { - t = (al + M[offset+zl[i]])|0; - if (i<16){ - t += f1(bl,cl,dl) + hl[0]; - } else if (i<32) { - t += f2(bl,cl,dl) + hl[1]; - } else if (i<48) { - t += f3(bl,cl,dl) + hl[2]; - } else if (i<64) { - t += f4(bl,cl,dl) + hl[3]; - } else {// if (i<80) { - t += f5(bl,cl,dl) + hl[4]; - } - t = t|0; - t = rotl(t,sl[i]); - t = (t+el)|0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; - t = (ar + M[offset+zr[i]])|0; - if (i<16){ - t += f5(br,cr,dr) + hr[0]; - } else if (i<32) { - t += f4(br,cr,dr) + hr[1]; - } else if (i<48) { - t += f3(br,cr,dr) + hr[2]; - } else if (i<64) { - t += f2(br,cr,dr) + hr[3]; - } else {// if (i<80) { - t += f1(br,cr,dr) + hr[4]; - } - t = t|0; - t = rotl(t,sr[i]) ; - t = (t+er)|0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; } - // Intermediate hash value - t = (H[1] + cl + dr)|0; - H[1] = (H[2] + dl + er)|0; - H[2] = (H[3] + el + ar)|0; - H[3] = (H[4] + al + br)|0; - H[4] = (H[0] + bl + cr)|0; - H[0] = t; }, - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | - (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) - ); - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 5; i++) { - // Shortcut - var H_i = H[i]; + var x64Words = this.words; + var x64WordsLength = x64Words.length; - // Swap - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); } - // Return final computed hash - return hash; + return X32WordArray.create(x32Words, this.sigBytes); }, + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } return clone; } }); + }()); - function f1(x, y, z) { - return ((x) ^ (y) ^ (z)); - - } - - function f2(x, y, z) { - return (((x)&(y)) | ((~x)&(z))); - } - - function f3(x, y, z) { - return (((x) | (~(y))) ^ (z)); - } - - function f4(x, y, z) { - return (((x) & (z)) | ((y)&(~(z)))); - } - - function f5(x, y, z) { - return ((x) ^ ((y) |(~(z)))); - - } - - function rotl(x,n) { - return (x<>>(32-n)); - } - - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.RIPEMD160('message'); - * var hash = CryptoJS.RIPEMD160(wordArray); - */ - C.RIPEMD160 = Hasher._createHelper(RIPEMD160); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacRIPEMD160(message, key); - */ - C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); - }(Math)); - - - return CryptoJS.RIPEMD160; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha1.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha1.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Reusable object - var W = []; - - /** - * SHA-1 hash algorithm. - */ - var SHA1 = C_algo.SHA1 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476, - 0xc3d2e1f0 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - - // Computation - for (var i = 0; i < 80; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = (n << 1) | (n >>> 31); - } - - var t = ((a << 5) | (a >>> 27)) + e + W[i]; - if (i < 20) { - t += ((b & c) | (~b & d)) + 0x5a827999; - } else if (i < 40) { - t += (b ^ c ^ d) + 0x6ed9eba1; - } else if (i < 60) { - t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; - } else /* if (i < 80) */ { - t += (b ^ c ^ d) - 0x359d3e2a; - } - - e = d; - d = c; - c = (b << 30) | (b >>> 2); - b = a; - a = t; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA1('message'); - * var hash = CryptoJS.SHA1(wordArray); - */ - C.SHA1 = Hasher._createHelper(SHA1); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA1(message, key); - */ - C.HmacSHA1 = Hasher._createHmacHelper(SHA1); - }()); - - - return CryptoJS.SHA1; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha224.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha224.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - - /** - * SHA-224 hash algorithm. - */ - var SHA224 = C_algo.SHA224 = SHA256.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 - ]); - }, - - _doFinalize: function () { - var hash = SHA256._doFinalize.call(this); - - hash.sigBytes -= 4; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA224('message'); - * var hash = CryptoJS.SHA224(wordArray); - */ - C.SHA224 = SHA256._createHelper(SHA224); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA224(message, key); - */ - C.HmacSHA224 = SHA256._createHmacHelper(SHA224); - }()); - - - return CryptoJS.SHA224; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha256.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha256.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Initialization and round constants tables - var H = []; - var K = []; - - // Compute constants - (function () { - function isPrime(n) { - var sqrtN = Math.sqrt(n); - for (var factor = 2; factor <= sqrtN; factor++) { - if (!(n % factor)) { - return false; - } - } - - return true; - } - - function getFractionalBits(n) { - return ((n - (n | 0)) * 0x100000000) | 0; - } - - var n = 2; - var nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); - } - K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); - - nPrime++; - } - - n++; - } - }()); - - // Reusable object - var W = []; - - /** - * SHA-256 hash algorithm. - */ - var SHA256 = C_algo.SHA256 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init(H.slice(0)); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - var f = H[5]; - var g = H[6]; - var h = H[7]; - - // Computation - for (var i = 0; i < 64; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ - ((gamma0x << 14) | (gamma0x >>> 18)) ^ - (gamma0x >>> 3); - - var gamma1x = W[i - 2]; - var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ - ((gamma1x << 13) | (gamma1x >>> 19)) ^ - (gamma1x >>> 10); - - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - - var ch = (e & f) ^ (~e & g); - var maj = (a & b) ^ (a & c) ^ (b & c); - - var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); - var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); - - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; - - h = g; - g = f; - f = e; - e = (d + t1) | 0; - d = c; - c = b; - b = a; - a = (t1 + t2) | 0; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - H[5] = (H[5] + f) | 0; - H[6] = (H[6] + g) | 0; - H[7] = (H[7] + h) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA256('message'); - * var hash = CryptoJS.SHA256(wordArray); - */ - C.SHA256 = Hasher._createHelper(SHA256); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA256(message, key); - */ - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); - }(Math)); - - - return CryptoJS.SHA256; + return CryptoJS; })); /***/ }), -/***/ "./node_modules/crypto-js/sha3.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha3.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var C_algo = C.algo; - - // Constants tables - var RHO_OFFSETS = []; - var PI_INDEXES = []; - var ROUND_CONSTANTS = []; - - // Compute Constants - (function () { - // Compute rho offset constants - var x = 1, y = 0; - for (var t = 0; t < 24; t++) { - RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; - - var newX = y % 5; - var newY = (2 * x + 3 * y) % 5; - x = newX; - y = newY; - } - - // Compute pi index constants - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; - } - } - - // Compute round constants - var LFSR = 0x01; - for (var i = 0; i < 24; i++) { - var roundConstantMsw = 0; - var roundConstantLsw = 0; - - for (var j = 0; j < 7; j++) { - if (LFSR & 0x01) { - var bitPosition = (1 << j) - 1; - if (bitPosition < 32) { - roundConstantLsw ^= 1 << bitPosition; - } else /* if (bitPosition >= 32) */ { - roundConstantMsw ^= 1 << (bitPosition - 32); - } - } - - // Compute next LFSR - if (LFSR & 0x80) { - // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 - LFSR = (LFSR << 1) ^ 0x71; - } else { - LFSR <<= 1; - } - } - - ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); - } - }()); - - // Reusable objects for temporary values - var T = []; - (function () { - for (var i = 0; i < 25; i++) { - T[i] = X64Word.create(); - } - }()); - - /** - * SHA-3 hash algorithm. - */ - var SHA3 = C_algo.SHA3 = Hasher.extend({ - /** - * Configuration options. - * - * @property {number} outputLength - * The desired number of bits in the output hash. - * Only values permitted are: 224, 256, 384, 512. - * Default: 512 - */ - cfg: Hasher.cfg.extend({ - outputLength: 512 - }), - - _doReset: function () { - var state = this._state = [] - for (var i = 0; i < 25; i++) { - state[i] = new X64Word.init(); - } - - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var state = this._state; - var nBlockSizeLanes = this.blockSize / 2; - - // Absorb - for (var i = 0; i < nBlockSizeLanes; i++) { - // Shortcuts - var M2i = M[offset + 2 * i]; - var M2i1 = M[offset + 2 * i + 1]; - - // Swap endian - M2i = ( - (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | - (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) - ); - M2i1 = ( - (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | - (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) - ); - - // Absorb message into state - var lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; - } - - // Rounds - for (var round = 0; round < 24; round++) { - // Theta - for (var x = 0; x < 5; x++) { - // Mix column lanes - var tMsw = 0, tLsw = 0; - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - tMsw ^= lane.high; - tLsw ^= lane.low; - } - - // Temporary values - var Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; - } - for (var x = 0; x < 5; x++) { - // Shortcuts - var Tx4 = T[(x + 4) % 5]; - var Tx1 = T[(x + 1) % 5]; - var Tx1Msw = Tx1.high; - var Tx1Lsw = Tx1.low; - - // Mix surrounding columns - var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); - var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - lane.high ^= tMsw; - lane.low ^= tLsw; - } - } - - // Rho Pi - for (var laneIndex = 1; laneIndex < 25; laneIndex++) { - // Shortcuts - var lane = state[laneIndex]; - var laneMsw = lane.high; - var laneLsw = lane.low; - var rhoOffset = RHO_OFFSETS[laneIndex]; - - // Rotate lanes - if (rhoOffset < 32) { - var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); - var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); - } else /* if (rhoOffset >= 32) */ { - var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); - var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); - } - - // Transpose lanes - var TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; - } - - // Rho pi at x = y = 0 - var T0 = T[0]; - var state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; - - // Chi - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - // Shortcuts - var laneIndex = x + 5 * y; - var lane = state[laneIndex]; - var TLane = T[laneIndex]; - var Tx1Lane = T[((x + 1) % 5) + 5 * y]; - var Tx2Lane = T[((x + 2) % 5) + 5 * y]; - - // Mix rows - lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); - lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); - } - } - - // Iota - var lane = state[0]; - var roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low;; - } - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - var blockSizeBits = this.blockSize * 32; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); - dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var state = this._state; - var outputLengthBytes = this.cfg.outputLength / 8; - var outputLengthLanes = outputLengthBytes / 8; - - // Squeeze - var hashWords = []; - for (var i = 0; i < outputLengthLanes; i++) { - // Shortcuts - var lane = state[i]; - var laneMsw = lane.high; - var laneLsw = lane.low; - - // Swap endian - laneMsw = ( - (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | - (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) - ); - laneLsw = ( - (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | - (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) - ); - - // Squeeze state to retrieve hash - hashWords.push(laneLsw); - hashWords.push(laneMsw); - } - - // Return final computed hash - return new WordArray.init(hashWords, outputLengthBytes); - }, - - clone: function () { - var clone = Hasher.clone.call(this); - - var state = clone._state = this._state.slice(0); - for (var i = 0; i < 25; i++) { - state[i] = state[i].clone(); - } - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA3('message'); - * var hash = CryptoJS.SHA3(wordArray); - */ - C.SHA3 = Hasher._createHelper(SHA3); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA3(message, key); - */ - C.HmacSHA3 = Hasher._createHmacHelper(SHA3); - }(Math)); - - - return CryptoJS.SHA3; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha384.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha384.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - var SHA512 = C_algo.SHA512; - - /** - * SHA-384 hash algorithm. - */ - var SHA384 = C_algo.SHA384 = SHA512.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), - new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), - new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), - new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) - ]); - }, - - _doFinalize: function () { - var hash = SHA512._doFinalize.call(this); - - hash.sigBytes -= 16; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA384('message'); - * var hash = CryptoJS.SHA384(wordArray); - */ - C.SHA384 = SHA512._createHelper(SHA384); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA384(message, key); - */ - C.HmacSHA384 = SHA512._createHmacHelper(SHA384); - }()); - - - return CryptoJS.SHA384; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha512.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha512.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - - function X64Word_create() { - return X64Word.create.apply(X64Word, arguments); - } - - // Constants - var K = [ - X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), - X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), - X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), - X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), - X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), - X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), - X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), - X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), - X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), - X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), - X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), - X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), - X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), - X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), - X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), - X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), - X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), - X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), - X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), - X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), - X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), - X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), - X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), - X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), - X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), - X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), - X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), - X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), - X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), - X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), - X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), - X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), - X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), - X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), - X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), - X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), - X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), - X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), - X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), - X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) - ]; - - // Reusable objects - var W = []; - (function () { - for (var i = 0; i < 80; i++) { - W[i] = X64Word_create(); - } - }()); - - /** - * SHA-512 hash algorithm. - */ - var SHA512 = C_algo.SHA512 = Hasher.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), - new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), - new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), - new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var H = this._hash.words; - - var H0 = H[0]; - var H1 = H[1]; - var H2 = H[2]; - var H3 = H[3]; - var H4 = H[4]; - var H5 = H[5]; - var H6 = H[6]; - var H7 = H[7]; - - var H0h = H0.high; - var H0l = H0.low; - var H1h = H1.high; - var H1l = H1.low; - var H2h = H2.high; - var H2l = H2.low; - var H3h = H3.high; - var H3l = H3.low; - var H4h = H4.high; - var H4l = H4.low; - var H5h = H5.high; - var H5l = H5.low; - var H6h = H6.high; - var H6l = H6.low; - var H7h = H7.high; - var H7l = H7.low; - - // Working variables - var ah = H0h; - var al = H0l; - var bh = H1h; - var bl = H1l; - var ch = H2h; - var cl = H2l; - var dh = H3h; - var dl = H3l; - var eh = H4h; - var el = H4l; - var fh = H5h; - var fl = H5l; - var gh = H6h; - var gl = H6l; - var hh = H7h; - var hl = H7l; - - // Rounds - for (var i = 0; i < 80; i++) { - // Shortcut - var Wi = W[i]; - - // Extend message - if (i < 16) { - var Wih = Wi.high = M[offset + i * 2] | 0; - var Wil = Wi.low = M[offset + i * 2 + 1] | 0; - } else { - // Gamma0 - var gamma0x = W[i - 15]; - var gamma0xh = gamma0x.high; - var gamma0xl = gamma0x.low; - var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); - var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); - - // Gamma1 - var gamma1x = W[i - 2]; - var gamma1xh = gamma1x.high; - var gamma1xl = gamma1x.low; - var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); - var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7 = W[i - 7]; - var Wi7h = Wi7.high; - var Wi7l = Wi7.low; - - var Wi16 = W[i - 16]; - var Wi16h = Wi16.high; - var Wi16l = Wi16.low; - - var Wil = gamma0l + Wi7l; - var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); - var Wil = Wil + gamma1l; - var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); - var Wil = Wil + Wi16l; - var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); - - Wi.high = Wih; - Wi.low = Wil; - } - - var chh = (eh & fh) ^ (~eh & gh); - var chl = (el & fl) ^ (~el & gl); - var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); - var majl = (al & bl) ^ (al & cl) ^ (bl & cl); - - var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); - var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); - var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); - var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); - - // t1 = h + sigma1 + ch + K[i] + W[i] - var Ki = K[i]; - var Kih = Ki.high; - var Kil = Ki.low; - - var t1l = hl + sigma1l; - var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); - var t1l = t1l + chl; - var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); - var t1l = t1l + Kil; - var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); - var t1l = t1l + Wil; - var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); - - // t2 = sigma0 + maj - var t2l = sigma0l + majl; - var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); - - // Update working variables - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = (dl + t1l) | 0; - eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = (t1l + t2l) | 0; - ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; - } - - // Intermediate hash value - H0l = H0.low = (H0l + al); - H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); - H1l = H1.low = (H1l + bl); - H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); - H2l = H2.low = (H2l + cl); - H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); - H3l = H3.low = (H3l + dl); - H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); - H4l = H4.low = (H4l + el); - H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); - H5l = H5.low = (H5l + fl); - H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); - H6l = H6.low = (H6l + gl); - H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); - H7l = H7.low = (H7l + hl); - H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Convert hash to 32-bit word array before returning - var hash = this._hash.toX32(); - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - }, - - blockSize: 1024/32 - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA512('message'); - * var hash = CryptoJS.SHA512(wordArray); - */ - C.SHA512 = Hasher._createHelper(SHA512); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA512(message, key); - */ - C.HmacSHA512 = Hasher._createHmacHelper(SHA512); - }()); - - - return CryptoJS.SHA512; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/tripledes.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/tripledes.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Permuted Choice 1 constants - var PC1 = [ - 57, 49, 41, 33, 25, 17, 9, 1, - 58, 50, 42, 34, 26, 18, 10, 2, - 59, 51, 43, 35, 27, 19, 11, 3, - 60, 52, 44, 36, 63, 55, 47, 39, - 31, 23, 15, 7, 62, 54, 46, 38, - 30, 22, 14, 6, 61, 53, 45, 37, - 29, 21, 13, 5, 28, 20, 12, 4 - ]; - - // Permuted Choice 2 constants - var PC2 = [ - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 - ]; - - // Cumulative bit shift constants - var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; - - // SBOXes and round permutation constants - var SBOX_P = [ - { - 0x0: 0x808200, - 0x10000000: 0x8000, - 0x20000000: 0x808002, - 0x30000000: 0x2, - 0x40000000: 0x200, - 0x50000000: 0x808202, - 0x60000000: 0x800202, - 0x70000000: 0x800000, - 0x80000000: 0x202, - 0x90000000: 0x800200, - 0xa0000000: 0x8200, - 0xb0000000: 0x808000, - 0xc0000000: 0x8002, - 0xd0000000: 0x800002, - 0xe0000000: 0x0, - 0xf0000000: 0x8202, - 0x8000000: 0x0, - 0x18000000: 0x808202, - 0x28000000: 0x8202, - 0x38000000: 0x8000, - 0x48000000: 0x808200, - 0x58000000: 0x200, - 0x68000000: 0x808002, - 0x78000000: 0x2, - 0x88000000: 0x800200, - 0x98000000: 0x8200, - 0xa8000000: 0x808000, - 0xb8000000: 0x800202, - 0xc8000000: 0x800002, - 0xd8000000: 0x8002, - 0xe8000000: 0x202, - 0xf8000000: 0x800000, - 0x1: 0x8000, - 0x10000001: 0x2, - 0x20000001: 0x808200, - 0x30000001: 0x800000, - 0x40000001: 0x808002, - 0x50000001: 0x8200, - 0x60000001: 0x200, - 0x70000001: 0x800202, - 0x80000001: 0x808202, - 0x90000001: 0x808000, - 0xa0000001: 0x800002, - 0xb0000001: 0x8202, - 0xc0000001: 0x202, - 0xd0000001: 0x800200, - 0xe0000001: 0x8002, - 0xf0000001: 0x0, - 0x8000001: 0x808202, - 0x18000001: 0x808000, - 0x28000001: 0x800000, - 0x38000001: 0x200, - 0x48000001: 0x8000, - 0x58000001: 0x800002, - 0x68000001: 0x2, - 0x78000001: 0x8202, - 0x88000001: 0x8002, - 0x98000001: 0x800202, - 0xa8000001: 0x202, - 0xb8000001: 0x808200, - 0xc8000001: 0x800200, - 0xd8000001: 0x0, - 0xe8000001: 0x8200, - 0xf8000001: 0x808002 - }, - { - 0x0: 0x40084010, - 0x1000000: 0x4000, - 0x2000000: 0x80000, - 0x3000000: 0x40080010, - 0x4000000: 0x40000010, - 0x5000000: 0x40084000, - 0x6000000: 0x40004000, - 0x7000000: 0x10, - 0x8000000: 0x84000, - 0x9000000: 0x40004010, - 0xa000000: 0x40000000, - 0xb000000: 0x84010, - 0xc000000: 0x80010, - 0xd000000: 0x0, - 0xe000000: 0x4010, - 0xf000000: 0x40080000, - 0x800000: 0x40004000, - 0x1800000: 0x84010, - 0x2800000: 0x10, - 0x3800000: 0x40004010, - 0x4800000: 0x40084010, - 0x5800000: 0x40000000, - 0x6800000: 0x80000, - 0x7800000: 0x40080010, - 0x8800000: 0x80010, - 0x9800000: 0x0, - 0xa800000: 0x4000, - 0xb800000: 0x40080000, - 0xc800000: 0x40000010, - 0xd800000: 0x84000, - 0xe800000: 0x40084000, - 0xf800000: 0x4010, - 0x10000000: 0x0, - 0x11000000: 0x40080010, - 0x12000000: 0x40004010, - 0x13000000: 0x40084000, - 0x14000000: 0x40080000, - 0x15000000: 0x10, - 0x16000000: 0x84010, - 0x17000000: 0x4000, - 0x18000000: 0x4010, - 0x19000000: 0x80000, - 0x1a000000: 0x80010, - 0x1b000000: 0x40000010, - 0x1c000000: 0x84000, - 0x1d000000: 0x40004000, - 0x1e000000: 0x40000000, - 0x1f000000: 0x40084010, - 0x10800000: 0x84010, - 0x11800000: 0x80000, - 0x12800000: 0x40080000, - 0x13800000: 0x4000, - 0x14800000: 0x40004000, - 0x15800000: 0x40084010, - 0x16800000: 0x10, - 0x17800000: 0x40000000, - 0x18800000: 0x40084000, - 0x19800000: 0x40000010, - 0x1a800000: 0x40004010, - 0x1b800000: 0x80010, - 0x1c800000: 0x0, - 0x1d800000: 0x4010, - 0x1e800000: 0x40080010, - 0x1f800000: 0x84000 - }, - { - 0x0: 0x104, - 0x100000: 0x0, - 0x200000: 0x4000100, - 0x300000: 0x10104, - 0x400000: 0x10004, - 0x500000: 0x4000004, - 0x600000: 0x4010104, - 0x700000: 0x4010000, - 0x800000: 0x4000000, - 0x900000: 0x4010100, - 0xa00000: 0x10100, - 0xb00000: 0x4010004, - 0xc00000: 0x4000104, - 0xd00000: 0x10000, - 0xe00000: 0x4, - 0xf00000: 0x100, - 0x80000: 0x4010100, - 0x180000: 0x4010004, - 0x280000: 0x0, - 0x380000: 0x4000100, - 0x480000: 0x4000004, - 0x580000: 0x10000, - 0x680000: 0x10004, - 0x780000: 0x104, - 0x880000: 0x4, - 0x980000: 0x100, - 0xa80000: 0x4010000, - 0xb80000: 0x10104, - 0xc80000: 0x10100, - 0xd80000: 0x4000104, - 0xe80000: 0x4010104, - 0xf80000: 0x4000000, - 0x1000000: 0x4010100, - 0x1100000: 0x10004, - 0x1200000: 0x10000, - 0x1300000: 0x4000100, - 0x1400000: 0x100, - 0x1500000: 0x4010104, - 0x1600000: 0x4000004, - 0x1700000: 0x0, - 0x1800000: 0x4000104, - 0x1900000: 0x4000000, - 0x1a00000: 0x4, - 0x1b00000: 0x10100, - 0x1c00000: 0x4010000, - 0x1d00000: 0x104, - 0x1e00000: 0x10104, - 0x1f00000: 0x4010004, - 0x1080000: 0x4000000, - 0x1180000: 0x104, - 0x1280000: 0x4010100, - 0x1380000: 0x0, - 0x1480000: 0x10004, - 0x1580000: 0x4000100, - 0x1680000: 0x100, - 0x1780000: 0x4010004, - 0x1880000: 0x10000, - 0x1980000: 0x4010104, - 0x1a80000: 0x10104, - 0x1b80000: 0x4000004, - 0x1c80000: 0x4000104, - 0x1d80000: 0x4010000, - 0x1e80000: 0x4, - 0x1f80000: 0x10100 - }, - { - 0x0: 0x80401000, - 0x10000: 0x80001040, - 0x20000: 0x401040, - 0x30000: 0x80400000, - 0x40000: 0x0, - 0x50000: 0x401000, - 0x60000: 0x80000040, - 0x70000: 0x400040, - 0x80000: 0x80000000, - 0x90000: 0x400000, - 0xa0000: 0x40, - 0xb0000: 0x80001000, - 0xc0000: 0x80400040, - 0xd0000: 0x1040, - 0xe0000: 0x1000, - 0xf0000: 0x80401040, - 0x8000: 0x80001040, - 0x18000: 0x40, - 0x28000: 0x80400040, - 0x38000: 0x80001000, - 0x48000: 0x401000, - 0x58000: 0x80401040, - 0x68000: 0x0, - 0x78000: 0x80400000, - 0x88000: 0x1000, - 0x98000: 0x80401000, - 0xa8000: 0x400000, - 0xb8000: 0x1040, - 0xc8000: 0x80000000, - 0xd8000: 0x400040, - 0xe8000: 0x401040, - 0xf8000: 0x80000040, - 0x100000: 0x400040, - 0x110000: 0x401000, - 0x120000: 0x80000040, - 0x130000: 0x0, - 0x140000: 0x1040, - 0x150000: 0x80400040, - 0x160000: 0x80401000, - 0x170000: 0x80001040, - 0x180000: 0x80401040, - 0x190000: 0x80000000, - 0x1a0000: 0x80400000, - 0x1b0000: 0x401040, - 0x1c0000: 0x80001000, - 0x1d0000: 0x400000, - 0x1e0000: 0x40, - 0x1f0000: 0x1000, - 0x108000: 0x80400000, - 0x118000: 0x80401040, - 0x128000: 0x0, - 0x138000: 0x401000, - 0x148000: 0x400040, - 0x158000: 0x80000000, - 0x168000: 0x80001040, - 0x178000: 0x40, - 0x188000: 0x80000040, - 0x198000: 0x1000, - 0x1a8000: 0x80001000, - 0x1b8000: 0x80400040, - 0x1c8000: 0x1040, - 0x1d8000: 0x80401000, - 0x1e8000: 0x400000, - 0x1f8000: 0x401040 - }, - { - 0x0: 0x80, - 0x1000: 0x1040000, - 0x2000: 0x40000, - 0x3000: 0x20000000, - 0x4000: 0x20040080, - 0x5000: 0x1000080, - 0x6000: 0x21000080, - 0x7000: 0x40080, - 0x8000: 0x1000000, - 0x9000: 0x20040000, - 0xa000: 0x20000080, - 0xb000: 0x21040080, - 0xc000: 0x21040000, - 0xd000: 0x0, - 0xe000: 0x1040080, - 0xf000: 0x21000000, - 0x800: 0x1040080, - 0x1800: 0x21000080, - 0x2800: 0x80, - 0x3800: 0x1040000, - 0x4800: 0x40000, - 0x5800: 0x20040080, - 0x6800: 0x21040000, - 0x7800: 0x20000000, - 0x8800: 0x20040000, - 0x9800: 0x0, - 0xa800: 0x21040080, - 0xb800: 0x1000080, - 0xc800: 0x20000080, - 0xd800: 0x21000000, - 0xe800: 0x1000000, - 0xf800: 0x40080, - 0x10000: 0x40000, - 0x11000: 0x80, - 0x12000: 0x20000000, - 0x13000: 0x21000080, - 0x14000: 0x1000080, - 0x15000: 0x21040000, - 0x16000: 0x20040080, - 0x17000: 0x1000000, - 0x18000: 0x21040080, - 0x19000: 0x21000000, - 0x1a000: 0x1040000, - 0x1b000: 0x20040000, - 0x1c000: 0x40080, - 0x1d000: 0x20000080, - 0x1e000: 0x0, - 0x1f000: 0x1040080, - 0x10800: 0x21000080, - 0x11800: 0x1000000, - 0x12800: 0x1040000, - 0x13800: 0x20040080, - 0x14800: 0x20000000, - 0x15800: 0x1040080, - 0x16800: 0x80, - 0x17800: 0x21040000, - 0x18800: 0x40080, - 0x19800: 0x21040080, - 0x1a800: 0x0, - 0x1b800: 0x21000000, - 0x1c800: 0x1000080, - 0x1d800: 0x40000, - 0x1e800: 0x20040000, - 0x1f800: 0x20000080 - }, - { - 0x0: 0x10000008, - 0x100: 0x2000, - 0x200: 0x10200000, - 0x300: 0x10202008, - 0x400: 0x10002000, - 0x500: 0x200000, - 0x600: 0x200008, - 0x700: 0x10000000, - 0x800: 0x0, - 0x900: 0x10002008, - 0xa00: 0x202000, - 0xb00: 0x8, - 0xc00: 0x10200008, - 0xd00: 0x202008, - 0xe00: 0x2008, - 0xf00: 0x10202000, - 0x80: 0x10200000, - 0x180: 0x10202008, - 0x280: 0x8, - 0x380: 0x200000, - 0x480: 0x202008, - 0x580: 0x10000008, - 0x680: 0x10002000, - 0x780: 0x2008, - 0x880: 0x200008, - 0x980: 0x2000, - 0xa80: 0x10002008, - 0xb80: 0x10200008, - 0xc80: 0x0, - 0xd80: 0x10202000, - 0xe80: 0x202000, - 0xf80: 0x10000000, - 0x1000: 0x10002000, - 0x1100: 0x10200008, - 0x1200: 0x10202008, - 0x1300: 0x2008, - 0x1400: 0x200000, - 0x1500: 0x10000000, - 0x1600: 0x10000008, - 0x1700: 0x202000, - 0x1800: 0x202008, - 0x1900: 0x0, - 0x1a00: 0x8, - 0x1b00: 0x10200000, - 0x1c00: 0x2000, - 0x1d00: 0x10002008, - 0x1e00: 0x10202000, - 0x1f00: 0x200008, - 0x1080: 0x8, - 0x1180: 0x202000, - 0x1280: 0x200000, - 0x1380: 0x10000008, - 0x1480: 0x10002000, - 0x1580: 0x2008, - 0x1680: 0x10202008, - 0x1780: 0x10200000, - 0x1880: 0x10202000, - 0x1980: 0x10200008, - 0x1a80: 0x2000, - 0x1b80: 0x202008, - 0x1c80: 0x200008, - 0x1d80: 0x0, - 0x1e80: 0x10000000, - 0x1f80: 0x10002008 - }, - { - 0x0: 0x100000, - 0x10: 0x2000401, - 0x20: 0x400, - 0x30: 0x100401, - 0x40: 0x2100401, - 0x50: 0x0, - 0x60: 0x1, - 0x70: 0x2100001, - 0x80: 0x2000400, - 0x90: 0x100001, - 0xa0: 0x2000001, - 0xb0: 0x2100400, - 0xc0: 0x2100000, - 0xd0: 0x401, - 0xe0: 0x100400, - 0xf0: 0x2000000, - 0x8: 0x2100001, - 0x18: 0x0, - 0x28: 0x2000401, - 0x38: 0x2100400, - 0x48: 0x100000, - 0x58: 0x2000001, - 0x68: 0x2000000, - 0x78: 0x401, - 0x88: 0x100401, - 0x98: 0x2000400, - 0xa8: 0x2100000, - 0xb8: 0x100001, - 0xc8: 0x400, - 0xd8: 0x2100401, - 0xe8: 0x1, - 0xf8: 0x100400, - 0x100: 0x2000000, - 0x110: 0x100000, - 0x120: 0x2000401, - 0x130: 0x2100001, - 0x140: 0x100001, - 0x150: 0x2000400, - 0x160: 0x2100400, - 0x170: 0x100401, - 0x180: 0x401, - 0x190: 0x2100401, - 0x1a0: 0x100400, - 0x1b0: 0x1, - 0x1c0: 0x0, - 0x1d0: 0x2100000, - 0x1e0: 0x2000001, - 0x1f0: 0x400, - 0x108: 0x100400, - 0x118: 0x2000401, - 0x128: 0x2100001, - 0x138: 0x1, - 0x148: 0x2000000, - 0x158: 0x100000, - 0x168: 0x401, - 0x178: 0x2100400, - 0x188: 0x2000001, - 0x198: 0x2100000, - 0x1a8: 0x0, - 0x1b8: 0x2100401, - 0x1c8: 0x100401, - 0x1d8: 0x400, - 0x1e8: 0x2000400, - 0x1f8: 0x100001 - }, - { - 0x0: 0x8000820, - 0x1: 0x20000, - 0x2: 0x8000000, - 0x3: 0x20, - 0x4: 0x20020, - 0x5: 0x8020820, - 0x6: 0x8020800, - 0x7: 0x800, - 0x8: 0x8020000, - 0x9: 0x8000800, - 0xa: 0x20800, - 0xb: 0x8020020, - 0xc: 0x820, - 0xd: 0x0, - 0xe: 0x8000020, - 0xf: 0x20820, - 0x80000000: 0x800, - 0x80000001: 0x8020820, - 0x80000002: 0x8000820, - 0x80000003: 0x8000000, - 0x80000004: 0x8020000, - 0x80000005: 0x20800, - 0x80000006: 0x20820, - 0x80000007: 0x20, - 0x80000008: 0x8000020, - 0x80000009: 0x820, - 0x8000000a: 0x20020, - 0x8000000b: 0x8020800, - 0x8000000c: 0x0, - 0x8000000d: 0x8020020, - 0x8000000e: 0x8000800, - 0x8000000f: 0x20000, - 0x10: 0x20820, - 0x11: 0x8020800, - 0x12: 0x20, - 0x13: 0x800, - 0x14: 0x8000800, - 0x15: 0x8000020, - 0x16: 0x8020020, - 0x17: 0x20000, - 0x18: 0x0, - 0x19: 0x20020, - 0x1a: 0x8020000, - 0x1b: 0x8000820, - 0x1c: 0x8020820, - 0x1d: 0x20800, - 0x1e: 0x820, - 0x1f: 0x8000000, - 0x80000010: 0x20000, - 0x80000011: 0x800, - 0x80000012: 0x8020020, - 0x80000013: 0x20820, - 0x80000014: 0x20, - 0x80000015: 0x8020000, - 0x80000016: 0x8000000, - 0x80000017: 0x8000820, - 0x80000018: 0x8020820, - 0x80000019: 0x8000020, - 0x8000001a: 0x8000800, - 0x8000001b: 0x0, - 0x8000001c: 0x20800, - 0x8000001d: 0x820, - 0x8000001e: 0x20020, - 0x8000001f: 0x8020800 - } - ]; - - // Masks that select the SBOX input - var SBOX_MASK = [ - 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, - 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f - ]; - - /** - * DES block cipher algorithm. - */ - var DES = C_algo.DES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - - // Select 56 bits according to PC1 - var keyBits = []; - for (var i = 0; i < 56; i++) { - var keyBitPos = PC1[i] - 1; - keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; - } - - // Assemble 16 subkeys - var subKeys = this._subKeys = []; - for (var nSubKey = 0; nSubKey < 16; nSubKey++) { - // Create subkey - var subKey = subKeys[nSubKey] = []; - - // Shortcut - var bitShift = BIT_SHIFTS[nSubKey]; - - // Select 48 bits according to PC2 - for (var i = 0; i < 24; i++) { - // Select from the left 28 key bits - subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); - - // Select from the right 28 key bits - subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); - } - - // Since each subkey is applied to an expanded 32-bit input, - // the subkey can be broken into 8 values scaled to 32-bits, - // which allows the key to be used without expansion - subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); - for (var i = 1; i < 7; i++) { - subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); - } - subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); - } - - // Compute inverse subkeys - var invSubKeys = this._invSubKeys = []; - for (var i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._subKeys); - }, - - decryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); - }, - - _doCryptBlock: function (M, offset, subKeys) { - // Get input - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; - - // Initial permutation - exchangeLR.call(this, 4, 0x0f0f0f0f); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeRL.call(this, 2, 0x33333333); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeLR.call(this, 1, 0x55555555); - - // Rounds - for (var round = 0; round < 16; round++) { - // Shortcuts - var subKey = subKeys[round]; - var lBlock = this._lBlock; - var rBlock = this._rBlock; - - // Feistel function - var f = 0; - for (var i = 0; i < 8; i++) { - f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; - } - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; - } - - // Undo swap from last round - var t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; - - // Final permutation - exchangeLR.call(this, 1, 0x55555555); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeRL.call(this, 2, 0x33333333); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeLR.call(this, 4, 0x0f0f0f0f); - - // Set output - M[offset] = this._lBlock; - M[offset + 1] = this._rBlock; - }, - - keySize: 64/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - // Swap bits across the left and right words - function exchangeLR(offset, mask) { - var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; - } - - function exchangeRL(offset, mask) { - var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); - */ - C.DES = BlockCipher._createHelper(DES); - - /** - * Triple-DES block cipher algorithm. - */ - var TripleDES = C_algo.TripleDES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - - // Create DES instances - this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); - this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); - this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); - }, - - encryptBlock: function (M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); - }, - - decryptBlock: function (M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); - }, - - keySize: 192/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); - */ - C.TripleDES = BlockCipher._createHelper(TripleDES); - }()); - - - return CryptoJS.TripleDES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/x64-core.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/x64-core.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var X32WordArray = C_lib.WordArray; - - /** - * x64 namespace. - */ - var C_x64 = C.x64 = {}; - - /** - * A 64-bit word. - */ - var X64Word = C_x64.Word = Base.extend({ - /** - * Initializes a newly created 64-bit word. - * - * @param {number} high The high 32 bits. - * @param {number} low The low 32 bits. - * - * @example - * - * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); - */ - init: function (high, low) { - this.high = high; - this.low = low; - } - - /** - * Bitwise NOTs this word. - * - * @return {X64Word} A new x64-Word object after negating. - * - * @example - * - * var negated = x64Word.not(); - */ - // not: function () { - // var high = ~this.high; - // var low = ~this.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ANDs this word with the passed word. - * - * @param {X64Word} word The x64-Word to AND with this word. - * - * @return {X64Word} A new x64-Word object after ANDing. - * - * @example - * - * var anded = x64Word.and(anotherX64Word); - */ - // and: function (word) { - // var high = this.high & word.high; - // var low = this.low & word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to OR with this word. - * - * @return {X64Word} A new x64-Word object after ORing. - * - * @example - * - * var ored = x64Word.or(anotherX64Word); - */ - // or: function (word) { - // var high = this.high | word.high; - // var low = this.low | word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise XORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to XOR with this word. - * - * @return {X64Word} A new x64-Word object after XORing. - * - * @example - * - * var xored = x64Word.xor(anotherX64Word); - */ - // xor: function (word) { - // var high = this.high ^ word.high; - // var low = this.low ^ word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the left. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftL(25); - */ - // shiftL: function (n) { - // if (n < 32) { - // var high = (this.high << n) | (this.low >>> (32 - n)); - // var low = this.low << n; - // } else { - // var high = this.low << (n - 32); - // var low = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the right. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftR(7); - */ - // shiftR: function (n) { - // if (n < 32) { - // var low = (this.low >>> n) | (this.high << (32 - n)); - // var high = this.high >>> n; - // } else { - // var low = this.high >>> (n - 32); - // var high = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Rotates this word n bits to the left. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotL(25); - */ - // rotL: function (n) { - // return this.shiftL(n).or(this.shiftR(64 - n)); - // }, - - /** - * Rotates this word n bits to the right. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotR(7); - */ - // rotR: function (n) { - // return this.shiftR(n).or(this.shiftL(64 - n)); - // }, - - /** - * Adds this word with the passed word. - * - * @param {X64Word} word The x64-Word to add with this word. - * - * @return {X64Word} A new x64-Word object after adding. - * - * @example - * - * var added = x64Word.add(anotherX64Word); - */ - // add: function (word) { - // var low = (this.low + word.low) | 0; - // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; - // var high = (this.high + word.high + carry) | 0; - - // return X64Word.create(high, low); - // } - }); - - /** - * An array of 64-bit words. - * - * @property {Array} words The array of CryptoJS.x64.Word objects. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var X64WordArray = C_x64.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.x64.WordArray.create(); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ]); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ], 10); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 8; - } - }, - - /** - * Converts this 64-bit word array to a 32-bit word array. - * - * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. - * - * @example - * - * var x32WordArray = x64WordArray.toX32(); - */ - toX32: function () { - // Shortcuts - var x64Words = this.words; - var x64WordsLength = x64Words.length; - - // Convert - var x32Words = []; - for (var i = 0; i < x64WordsLength; i++) { - var x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); - } - - return X32WordArray.create(x32Words, this.sigBytes); - }, - - /** - * Creates a copy of this word array. - * - * @return {X64WordArray} The clone. - * - * @example - * - * var clone = x64WordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - - // Clone "words" array - var words = clone.words = this.words.slice(0); - - // Clone each X64Word object - var wordsLength = words.length; - for (var i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); - } - - return clone; - } - }); - }()); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/decimal.js/decimal.mjs": -/*!*********************************************!*\ - !*** ./node_modules/decimal.js/decimal.mjs ***! - \*********************************************/ -/*! exports provided: Decimal, default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/decimal.js/decimal.mjs": +/*!*********************************************!*\ + !*** ./node_modules/decimal.js/decimal.mjs ***! + \*********************************************/ +/*! exports provided: Decimal, default */ +/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); @@ -30516,7081 +28212,10457 @@ function max() { /* - * Return a new Decimal whose value is the minimum of the arguments. + * Return a new Decimal whose value is the minimum of the arguments. + * + * arguments {number|string|Decimal} + * + */ +function min() { + return maxOrMin(this, arguments, 'gt'); +} + + +/* + * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits + * using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ +function mod(x, y) { + return new this(x).mod(y); +} + + +/* + * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant + * digits using rounding mode `rounding`. + * + * x {number|string|Decimal} + * y {number|string|Decimal} + * + */ +function mul(x, y) { + return new this(x).mul(y); +} + + +/* + * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} The base. + * y {number|string|Decimal} The exponent. + * + */ +function pow(x, y) { + return new this(x).pow(y); +} + + +/* + * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with + * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros + * are produced). + * + * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive. + * + */ +function random(sd) { + var d, e, k, n, + i = 0, + r = new this(1), + rd = []; + + if (sd === void 0) sd = this.precision; + else checkInt32(sd, 1, MAX_DIGITS); + + k = Math.ceil(sd / LOG_BASE); + + if (!this.crypto) { + for (; i < k;) rd[i++] = Math.random() * 1e7 | 0; + + // Browsers supporting crypto.getRandomValues. + } else if (crypto.getRandomValues) { + d = crypto.getRandomValues(new Uint32Array(k)); + + for (; i < k;) { + n = d[i]; + + // 0 <= n < 4294967296 + // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865). + if (n >= 4.29e9) { + d[i] = crypto.getRandomValues(new Uint32Array(1))[0]; + } else { + + // 0 <= n <= 4289999999 + // 0 <= (n % 1e7) <= 9999999 + rd[i++] = n % 1e7; + } + } + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + d = crypto.randomBytes(k *= 4); + + for (; i < k;) { + + // 0 <= n < 2147483648 + n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24); + + // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286). + if (n >= 2.14e9) { + crypto.randomBytes(4).copy(d, i); + } else { + + // 0 <= n <= 2139999999 + // 0 <= (n % 1e7) <= 9999999 + rd.push(n % 1e7); + i += 4; + } + } + + i = k / 4; + } else { + throw Error(cryptoUnavailable); + } + + k = rd[--i]; + sd %= LOG_BASE; + + // Convert trailing digits to zeros according to sd. + if (k && sd) { + n = mathpow(10, LOG_BASE - sd); + rd[i] = (k / n | 0) * n; + } + + // Remove trailing words which are zero. + for (; rd[i] === 0; i--) rd.pop(); + + // Zero? + if (i < 0) { + e = 0; + rd = [0]; + } else { + e = -1; + + // Remove leading words which are zero and adjust exponent accordingly. + for (; rd[0] === 0; e -= LOG_BASE) rd.shift(); + + // Count the digits of the first word of rd to determine leading zeros. + for (k = 1, n = rd[0]; n >= 10; n /= 10) k++; + + // Adjust the exponent for leading zeros of the first word of rd. + if (k < LOG_BASE) e -= LOG_BASE - k; + } + + r.e = e; + r.d = rd; + + return r; +} + + +/* + * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`. + * + * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL). + * + * x {number|string|Decimal} + * + */ +function round(x) { + return finalise(x = new this(x), x.e + 1, this.rounding); +} + + +/* + * Return + * 1 if x > 0, + * -1 if x < 0, + * 0 if x is 0, + * -0 if x is -0, + * NaN otherwise + * + */ +function sign(x) { + x = new this(x); + return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN; +} + + +/* + * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits + * using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function sin(x) { + return new this(x).sin(); +} + + +/* + * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision` + * significant digits using rounding mode `rounding`. + * + * x {number|string|Decimal} A value in radians. + * + */ +function sinh(x) { + return new this(x).sinh(); +} + + +/* + * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant + * digits using rounding mode `rounding`. * - * arguments {number|string|Decimal} + * x {number|string|Decimal} * */ -function min() { - return maxOrMin(this, arguments, 'gt'); +function sqrt(x) { + return new this(x).sqrt(); } /* - * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits + * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits * using rounding mode `rounding`. * * x {number|string|Decimal} * y {number|string|Decimal} * */ -function mod(x, y) { - return new this(x).mod(y); +function sub(x, y) { + return new this(x).sub(y); } /* - * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant + * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant * digits using rounding mode `rounding`. * - * x {number|string|Decimal} - * y {number|string|Decimal} + * x {number|string|Decimal} A value in radians. * */ -function mul(x, y) { - return new this(x).mul(y); +function tan(x) { + return new this(x).tan(); } /* - * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision + * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision` * significant digits using rounding mode `rounding`. * - * x {number|string|Decimal} The base. - * y {number|string|Decimal} The exponent. + * x {number|string|Decimal} A value in radians. * */ -function pow(x, y) { - return new this(x).pow(y); +function tanh(x) { + return new this(x).tanh(); } /* - * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with - * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros - * are produced). + * Return a new Decimal whose value is `x` truncated to an integer. * - * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive. + * x {number|string|Decimal} * */ -function random(sd) { - var d, e, k, n, - i = 0, - r = new this(1), - rd = []; - - if (sd === void 0) sd = this.precision; - else checkInt32(sd, 1, MAX_DIGITS); - - k = Math.ceil(sd / LOG_BASE); - - if (!this.crypto) { - for (; i < k;) rd[i++] = Math.random() * 1e7 | 0; - - // Browsers supporting crypto.getRandomValues. - } else if (crypto.getRandomValues) { - d = crypto.getRandomValues(new Uint32Array(k)); - - for (; i < k;) { - n = d[i]; - - // 0 <= n < 4294967296 - // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865). - if (n >= 4.29e9) { - d[i] = crypto.getRandomValues(new Uint32Array(1))[0]; - } else { - - // 0 <= n <= 4289999999 - // 0 <= (n % 1e7) <= 9999999 - rd[i++] = n % 1e7; - } - } - - // Node.js supporting crypto.randomBytes. - } else if (crypto.randomBytes) { - - // buffer - d = crypto.randomBytes(k *= 4); +function trunc(x) { + return finalise(x = new this(x), x.e + 1, 1); +} - for (; i < k;) { - // 0 <= n < 2147483648 - n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24); +// Create and configure initial Decimal constructor. +var Decimal = clone(DEFAULTS); - // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286). - if (n >= 2.14e9) { - crypto.randomBytes(4).copy(d, i); - } else { +// Create the internal constants from their string values. +LN10 = new Decimal(LN10); +PI = new Decimal(PI); - // 0 <= n <= 2139999999 - // 0 <= (n % 1e7) <= 9999999 - rd.push(n % 1e7); - i += 4; - } - } +/* harmony default export */ __webpack_exports__["default"] = (Decimal); + + +/***/ }), + +/***/ "./node_modules/ethjs-abi/lib/index.js": +/*!*********************************************!*\ + !*** ./node_modules/ethjs-abi/lib/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +/* eslint-disable */ + +var utils = __webpack_require__(/*! ./utils/index.js */ "./node_modules/ethjs-abi/lib/utils/index.js"); +var uint256Coder = utils.uint256Coder; +var coderBoolean = utils.coderBoolean; +var coderFixedBytes = utils.coderFixedBytes; +var coderAddress = utils.coderAddress; +var coderDynamicBytes = utils.coderDynamicBytes; +var coderString = utils.coderString; +var coderArray = utils.coderArray; +var paramTypePart = utils.paramTypePart; +var getParamCoder = utils.getParamCoder; + +function Result() {} + +function encodeParams(types, values) { + if (types.length !== values.length) { + throw new Error('[ethjs-abi] while encoding params, types/values mismatch, types length ' + types.length + ' should be ' + values.length); + } + + var parts = []; + + types.forEach(function (type, index) { + var coder = getParamCoder(type); + parts.push({ dynamic: coder.dynamic, value: coder.encode(values[index]) }); + }); + + function alignSize(size) { + return parseInt(32 * Math.ceil(size / 32)); + } + + var staticSize = 0, + dynamicSize = 0; + parts.forEach(function (part) { + if (part.dynamic) { + staticSize += 32; + dynamicSize += alignSize(part.value.length); + } else { + staticSize += alignSize(part.value.length); + } + }); + + var offset = 0, + dynamicOffset = staticSize; + var data = new Buffer(staticSize + dynamicSize); + + parts.forEach(function (part, index) { + if (part.dynamic) { + uint256Coder.encode(dynamicOffset).copy(data, offset); + offset += 32; + + part.value.copy(data, dynamicOffset); + dynamicOffset += alignSize(part.value.length); + } else { + part.value.copy(data, offset); + offset += alignSize(part.value.length); + } + }); + + return '0x' + data.toString('hex'); +} + +// decode bytecode data from output names and types +function decodeParams(names, types, data) { + // Names is optional, so shift over all the parameters if not provided + if (arguments.length < 3) { + data = types; + types = names; + names = []; + } + + data = utils.hexOrBuffer(data); + var values = new Result(); + + var offset = 0; + types.forEach(function (type, index) { + var coder = getParamCoder(type); + if (coder.dynamic) { + var dynamicOffset = uint256Coder.decode(data, offset); + var result = coder.decode(data, dynamicOffset.value.toNumber()); + offset += dynamicOffset.consumed; + } else { + var result = coder.decode(data, offset); + offset += result.consumed; + } + values[index] = result.value; + if (names[index]) { + values[names[index]] = result.value; + } + }); + return values; +} + +// encode method ABI object with values in an array, output bytecode +function encodeMethod(method, values) { + var signature = method.name + '(' + utils.getKeys(method.inputs, 'type').join(',') + ')'; + var signatureEncoded = '0x' + new Buffer(utils.keccak256(signature), 'hex').slice(0, 4).toString('hex'); + var paramsEncoded = encodeParams(utils.getKeys(method.inputs, 'type'), values).substring(2); + + return '' + signatureEncoded + paramsEncoded; +} + +// decode method data bytecode, from method ABI object +function decodeMethod(method, data) { + var outputNames = utils.getKeys(method.outputs, 'name', true); + var outputTypes = utils.getKeys(method.outputs, 'type'); + + return decodeParams(outputNames, outputTypes, utils.hexOrBuffer(data)); +} + +// decode method data bytecode, from method ABI object +function encodeEvent(eventObject, values) { + return encodeMethod(eventObject, values); +} + +// decode method data bytecode, from method ABI object +function decodeEvent(eventObject, data) { + var inputNames = utils.getKeys(eventObject.inputs, 'name', true); + var inputTypes = utils.getKeys(eventObject.inputs, 'type'); + + return decodeParams(inputNames, inputTypes, utils.hexOrBuffer(data)); +} + +module.exports = { + encodeParams: encodeParams, + decodeParams: decodeParams, + encodeMethod: encodeMethod, + decodeMethod: decodeMethod, + encodeEvent: encodeEvent, + decodeEvent: decodeEvent +}; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)) + +/***/ }), + +/***/ "./node_modules/ethjs-abi/lib/utils/index.js": +/*!***************************************************!*\ + !*** ./node_modules/ethjs-abi/lib/utils/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js"); +var numberToBN = __webpack_require__(/*! number-to-bn */ "./node_modules/number-to-bn/src/index.js"); +var keccak256 = __webpack_require__(/*! js-sha3 */ "./node_modules/js-sha3/src/sha3.js").keccak_256; + +// from ethereumjs-util +function stripZeros(aInput) { + var a = aInput; // eslint-disable-line + var first = a[0]; // eslint-disable-line + while (a.length > 0 && first.toString() === '0') { + a = a.slice(1); + first = a[0]; + } + return a; +} + +function bnToBuffer(bnInput) { + var bn = bnInput; // eslint-disable-line + var hex = bn.toString(16); // eslint-disable-line + if (hex.length % 2) { + hex = '0' + hex; + } + return stripZeros(new Buffer(hex, 'hex')); +} + +function isHexString(value, length) { + if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) { + return false; + } + if (length && value.length !== 2 + 2 * length) { + return false; + } + return true; +} + +function hexOrBuffer(valueInput, name) { + var value = valueInput; // eslint-disable-line + if (!Buffer.isBuffer(value)) { + if (!isHexString(value)) { + var error = new Error(name ? '[ethjs-abi] invalid ' + name : '[ethjs-abi] invalid hex or buffer, must be a prefixed alphanumeric even length hex string'); + error.reason = '[ethjs-abi] invalid hex string, hex must be prefixed and alphanumeric (e.g. 0x023..)'; + error.value = value; + throw error; + } + + value = value.substring(2); + if (value.length % 2) { + value = '0' + value; + } + value = new Buffer(value, 'hex'); + } + + return value; +} + +function hexlify(value) { + if (typeof value === 'number') { + return '0x' + bnToBuffer(new BN(value)).toString('hex'); + } else if (value.mod || value.modulo) { + return '0x' + bnToBuffer(value).toString('hex'); + } else { + // eslint-disable-line + return '0x' + hexOrBuffer(value).toString('hex'); + } +} + +// getKeys([{a: 1, b: 2}, {a: 3, b: 4}], 'a') => [1, 3] +function getKeys(params, key, allowEmpty) { + var result = []; // eslint-disable-line + + if (!Array.isArray(params)) { + throw new Error('[ethjs-abi] while getting keys, invalid params value ' + JSON.stringify(params)); + } + + for (var i = 0; i < params.length; i++) { + // eslint-disable-line + var value = params[i][key]; // eslint-disable-line + if (allowEmpty && !value) { + value = ''; + } else if (typeof value !== 'string') { + throw new Error('[ethjs-abi] while getKeys found invalid ABI data structure, type value not string'); + } + result.push(value); + } + + return result; +} + +function coderNumber(size, signed) { + return { + encode: function encodeNumber(valueInput) { + var value = valueInput; // eslint-disable-line + + if (typeof value === 'object' && value.toString && (value.toTwos || value.dividedToIntegerBy)) { + value = value.toString(10).split('.')[0]; + } + + if (typeof value === 'string' || typeof value === 'number') { + value = String(value).split('.')[0]; + } + + value = numberToBN(value); + value = value.toTwos(size * 8).maskn(size * 8); + if (signed) { + value = value.fromTwos(size * 8).toTwos(256); + } + return value.toArrayLike(Buffer, 'be', 32); + }, + decode: function decodeNumber(data, offset) { + var junkLength = 32 - size; // eslint-disable-line + var value = new BN(data.slice(offset + junkLength, offset + 32)); // eslint-disable-line + if (signed) { + value = value.fromTwos(size * 8); + } else { + value = value.maskn(size * 8); + } + return { + consumed: 32, + value: new BN(value.toString(10)) + }; + } + }; +} +var uint256Coder = coderNumber(32, false); + +var coderBoolean = { + encode: function encodeBoolean(value) { + return uint256Coder.encode(value ? 1 : 0); + }, + decode: function decodeBoolean(data, offset) { + var result = uint256Coder.decode(data, offset); // eslint-disable-line + return { + consumed: result.consumed, + value: !result.value.isZero() + }; + } +}; + +function coderFixedBytes(length) { + return { + encode: function encodeFixedBytes(valueInput) { + var value = valueInput; // eslint-disable-line + value = hexOrBuffer(value); + + if (value.length === 32) { + return value; + } + + var result = new Buffer(32); // eslint-disable-line + result.fill(0); + value.copy(result); + return result; + }, + decode: function decodeFixedBytes(data, offset) { + if (data.length < offset + 32) { + throw new Error('[ethjs-abi] while decoding fixed bytes, invalid bytes data length: ' + length); + } + + return { + consumed: 32, + value: '0x' + data.slice(offset, offset + length).toString('hex') + }; + } + }; +} + +var coderAddress = { + encode: function encodeAddress(valueInput) { + var value = valueInput; // eslint-disable-line + var result = new Buffer(32); // eslint-disable-line + if (!isHexString(value, 20)) { + throw new Error('[ethjs-abi] while encoding address, invalid address value, not alphanumeric 20 byte hex string'); + } + value = hexOrBuffer(value); + result.fill(0); + value.copy(result, 12); + return result; + }, + decode: function decodeAddress(data, offset) { + if (data.length === 0) { + return { + consumed: 32, + value: '0x' + }; + } + if (data.length < offset + 32) { + throw new Error('[ethjs-abi] while decoding address data, invalid address data, invalid byte length ' + data.length); + } + return { + consumed: 32, + value: '0x' + data.slice(offset + 12, offset + 32).toString('hex') + }; + } +}; + +function encodeDynamicBytesHelper(value) { + var dataLength = parseInt(32 * Math.ceil(value.length / 32)); // eslint-disable-line + var padding = new Buffer(dataLength - value.length); // eslint-disable-line + padding.fill(0); + + return Buffer.concat([uint256Coder.encode(value.length), value, padding]); +} + +function decodeDynamicBytesHelper(data, offset) { + if (data.length < offset + 32) { + throw new Error('[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: ' + data.length + ' should be less than ' + (offset + 32)); + } + + var length = uint256Coder.decode(data, offset).value; // eslint-disable-line + length = length.toNumber(); + if (data.length < offset + 32 + length) { + throw new Error('[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: ' + data.length + ' should be less than ' + (offset + 32 + length)); + } + + return { + consumed: parseInt(32 + 32 * Math.ceil(length / 32), 10), + value: data.slice(offset + 32, offset + 32 + length) + }; +} + +var coderDynamicBytes = { + encode: function encodeDynamicBytes(value) { + return encodeDynamicBytesHelper(hexOrBuffer(value)); + }, + decode: function decodeDynamicBytes(data, offset) { + var result = decodeDynamicBytesHelper(data, offset); // eslint-disable-line + result.value = '0x' + result.value.toString('hex'); + return result; + }, + dynamic: true +}; + +var coderString = { + encode: function encodeString(value) { + return encodeDynamicBytesHelper(new Buffer(value, 'utf8')); + }, + decode: function decodeString(data, offset) { + var result = decodeDynamicBytesHelper(data, offset); // eslint-disable-line + result.value = result.value.toString('utf8'); + return result; + }, + dynamic: true +}; + +function coderArray(coder, lengthInput) { + return { + encode: function encodeArray(value) { + var result = new Buffer(0); // eslint-disable-line + var length = lengthInput; // eslint-disable-line + + if (!Array.isArray(value)) { + throw new Error('[ethjs-abi] while encoding array, invalid array data, not type Object (Array)'); + } + + if (length === -1) { + length = value.length; + result = uint256Coder.encode(length); + } + + if (length !== value.length) { + throw new Error('[ethjs-abi] while encoding array, size mismatch array length ' + length + ' does not equal ' + value.length); + } + + value.forEach(function (resultValue) { + result = Buffer.concat([result, coder.encode(resultValue)]); + }); + + return result; + }, + decode: function decodeArray(data, offsetInput) { + var length = lengthInput; // eslint-disable-line + var offset = offsetInput; // eslint-disable-line + // @TODO: + // if (data.length < offset + length * 32) { throw new Error('invalid array'); } + + var consumed = 0; // eslint-disable-line + var decodeResult; // eslint-disable-line + + if (length === -1) { + decodeResult = uint256Coder.decode(data, offset); + length = decodeResult.value.toNumber(); + consumed += decodeResult.consumed; + offset += decodeResult.consumed; + } + + var value = []; // eslint-disable-line + + for (var i = 0; i < length; i++) { + // eslint-disable-line + var loopResult = coder.decode(data, offset); + consumed += loopResult.consumed; + offset += loopResult.consumed; + value.push(loopResult.value); + } + + return { + consumed: consumed, + value: value + }; + }, + dynamic: lengthInput === -1 + }; +} + +// Break the type up into [staticType][staticArray]*[dynamicArray]? | [dynamicType] and +// build the coder up from its parts +var paramTypePart = new RegExp(/^((u?int|bytes)([0-9]*)|(address|bool|string)|(\[([0-9]*)\]))/); + +function getParamCoder(typeInput) { + var type = typeInput; // eslint-disable-line + var coder = null; // eslint-disable-line + var invalidTypeErrorMessage = '[ethjs-abi] while getting param coder (getParamCoder) type value ' + JSON.stringify(type) + ' is either invalid or unsupported by ethjs-abi.'; + + while (type) { + var part = type.match(paramTypePart); // eslint-disable-line + if (!part) { + throw new Error(invalidTypeErrorMessage); + } + type = type.substring(part[0].length); + + var prefix = part[2] || part[4] || part[5]; // eslint-disable-line + switch (prefix) { + case 'int':case 'uint': + if (coder) { + throw new Error(invalidTypeErrorMessage); + } + var intSize = parseInt(part[3] || 256); // eslint-disable-line + if (intSize === 0 || intSize > 256 || intSize % 8 !== 0) { + throw new Error('[ethjs-abi] while getting param coder for type ' + type + ', invalid ' + prefix + ' width: ' + type); + } + + coder = coderNumber(intSize / 8, prefix === 'int'); + break; + + case 'bool': + if (coder) { + throw new Error(invalidTypeErrorMessage); + } + coder = coderBoolean; + break; + + case 'string': + if (coder) { + throw new Error(invalidTypeErrorMessage); + } + coder = coderString; + break; + + case 'bytes': + if (coder) { + throw new Error(invalidTypeErrorMessage); + } + if (part[3]) { + var size = parseInt(part[3]); // eslint-disable-line + if (size === 0 || size > 32) { + throw new Error('[ethjs-abi] while getting param coder for prefix bytes, invalid type ' + type + ', size ' + size + ' should be 0 or greater than 32'); + } + coder = coderFixedBytes(size); + } else { + coder = coderDynamicBytes; + } + break; + + case 'address': + if (coder) { + throw new Error(invalidTypeErrorMessage); + } + coder = coderAddress; + break; + + case '[]': + if (!coder || coder.dynamic) { + throw new Error(invalidTypeErrorMessage); + } + coder = coderArray(coder, -1); + break; + + // "[0-9+]" + default: + if (!coder || coder.dynamic) { + throw new Error(invalidTypeErrorMessage); + } + var defaultSize = parseInt(part[6]); // eslint-disable-line + coder = coderArray(coder, defaultSize); + } + } + + if (!coder) { + throw new Error(invalidTypeErrorMessage); + } + return coder; +} + +module.exports = { + BN: BN, + bnToBuffer: bnToBuffer, + isHexString: isHexString, + hexOrBuffer: hexOrBuffer, + hexlify: hexlify, + stripZeros: stripZeros, + + keccak256: keccak256, + + getKeys: getKeys, + numberToBN: numberToBN, + coderNumber: coderNumber, + uint256Coder: uint256Coder, + coderBoolean: coderBoolean, + coderFixedBytes: coderFixedBytes, + coderAddress: coderAddress, + coderDynamicBytes: coderDynamicBytes, + coderString: coderString, + coderArray: coderArray, + paramTypePart: paramTypePart, + getParamCoder: getParamCoder +}; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)) + +/***/ }), + +/***/ "./node_modules/events/events.js": +/*!***************************************!*\ + !*** ./node_modules/events/events.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +EventEmitter.defaultMaxListeners = 10; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; +}; + +EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + + if (!this._events) + this._events = {}; + + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event + } else { + // At least give some kind of context to the user + var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + err.context = er; + throw err; + } + } + } + + handler = this._events[type]; + + if (isUndefined(handler)) + return false; + + if (isFunction(handler)) { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + args = Array.prototype.slice.call(arguments, 1); + handler.apply(this, args); + } + } else if (isObject(handler)) { + args = Array.prototype.slice.call(arguments, 1); + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } + + return true; +}; + +EventEmitter.prototype.addListener = function(type, listener) { + var m; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events) + this._events = {}; + + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + else if (isObject(this._events[type])) + // If we've already got an array, just append. + this._events[type].push(listener); + else + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } + } + } + + return this; +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + var fired = false; + + function g() { + this.removeListener(type, g); + + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + + g.listener = listener; + this.on(type, g); + + return this; +}; + +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events || !this._events[type]) + return this; + + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } + + return this; +}; + +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } + + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else if (listeners) { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + + return this; +}; + +EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; +}; + +EventEmitter.prototype.listenerCount = function(type) { + if (this._events) { + var evlistener = this._events[type]; + + if (isFunction(evlistener)) + return 1; + else if (evlistener) + return evlistener.length; + } + return 0; +}; + +EventEmitter.listenerCount = function(emitter, type) { + return emitter.listenerCount(type); +}; + +function isFunction(arg) { + return typeof arg === 'function'; +} + +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isUndefined(arg) { + return arg === void 0; +} + + +/***/ }), + +/***/ "./node_modules/fast-deep-equal/index.js": +/*!***********************************************!*\ + !*** ./node_modules/fast-deep-equal/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isArray = Array.isArray; +var keyList = Object.keys; +var hasProp = Object.prototype.hasOwnProperty; + +module.exports = function equal(a, b) { + if (a === b) return true; + + var arrA = isArray(a) + , arrB = isArray(b) + , i + , length + , key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = 0; i < length; i++) + if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + if (a instanceof Object && b instanceof Object) { + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) + return false; + + for (i = 0; i < length; i++) + if (!hasProp.call(b, keys[i])) return false; + + for (i = 0; i < length; i++) { + key = keys[i]; + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + return false; +}; + + +/***/ }), + +/***/ "./node_modules/fast-json-stable-stringify/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/fast-json-stable-stringify/index.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); + + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } + + if (node === null) return 'null'; + + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); + + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); +}; + + +/***/ }), + +/***/ "./node_modules/https-browserify/index.js": +/*!************************************************!*\ + !*** ./node_modules/https-browserify/index.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var http = __webpack_require__(/*! http */ "./node_modules/stream-http/index.js") +var url = __webpack_require__(/*! url */ "./node_modules/url/url.js") + +var https = module.exports + +for (var key in http) { + if (http.hasOwnProperty(key)) https[key] = http[key] +} + +https.request = function (params, cb) { + params = validateParams(params) + return http.request.call(this, params, cb) +} + +https.get = function (params, cb) { + params = validateParams(params) + return http.get.call(this, params, cb) +} + +function validateParams (params) { + if (typeof params === 'string') { + params = url.parse(params) + } + if (!params.protocol) { + params.protocol = 'https:' + } + if (params.protocol !== 'https:') { + throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"') + } + return params +} + + +/***/ }), + +/***/ "./node_modules/ieee754/index.js": +/*!***************************************!*\ + !*** ./node_modules/ieee754/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + + +/***/ }), + +/***/ "./node_modules/inherits/inherits_browser.js": +/*!***************************************************!*\ + !*** ./node_modules/inherits/inherits_browser.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} + + +/***/ }), + +/***/ "./node_modules/ipfs-mini/lib/index.js": +/*!*********************************************!*\ + !*** ./node_modules/ipfs-mini/lib/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var XMLHttpRequest = __webpack_require__(/*! ./lib/XMLHttpRequest */ "./node_modules/ipfs-mini/lib/lib/XMLHttpRequest-browser.js"); + +module.exports = IPFS; + +/** + * The constructor object + * @param {Object} `provider` the provider object + * @return {Object} `ipfs` returns an IPFS instance + * @throws if the `new` flag is not used + */ +function IPFS(provider) { + if (!(this instanceof IPFS)) { + throw new Error('[ipfs-mini] IPFS instance must be instantiated with "new" flag (e.g. var ipfs = new IPFS("http://localhost:8545");).'); + } + + var self = this; + self.setProvider(provider || {}); +} + +/** + * Sets the provider of the IPFS instance + * @param {Object} `provider` the provider object + * @throws if the provider object is not an object + */ +IPFS.prototype.setProvider = function setProvider(provider) { + if (typeof provider !== 'object') { + throw new Error('[ifpsjs] provider must be type Object, got \'' + typeof provider + '\'.'); + } + var self = this; + var data = self.provider = Object.assign({ + host: '127.0.0.1', + pinning: true, + port: '5001', + protocol: 'http', + base: '/api/v0' }, provider || {}); + self.requestBase = String(data.protocol + '://' + data.host + ':' + data.port + data.base); +}; + +/** + * Sends an async data packet to an IPFS node + * @param {Object} `opts` the options object + * @param {Function} `cb` the provider callback + * @callback returns an error if any, or the data from IPFS + */ +IPFS.prototype.sendAsync = function sendAsync(opts, cb) { + var self = this; + var request = new XMLHttpRequest(); // eslint-disable-line + var options = opts || {}; + var callback = cb || function emptyCallback() {}; + + request.onreadystatechange = function () { + if (request.readyState === 4 && request.timeout !== 1) { + if (request.status !== 200) { + callback(new Error('[ipfs-mini] status ' + request.status + ': ' + request.responseText), null); + } else { + try { + callback(null, options.jsonParse ? JSON.parse(request.responseText) : request.responseText); + } catch (jsonError) { + callback(new Error('[ipfs-mini] while parsing data: \'' + String(request.responseText) + '\', error: ' + String(jsonError) + ' with provider: \'' + self.requestBase + '\'', null)); + } + } + } + }; + + var pinningURI = self.provider.pinning && opts.uri === '/add' ? '?pin=true' : ''; + + if (options.payload) { + request.open('POST', '' + self.requestBase + opts.uri + pinningURI); + } else { + request.open('GET', '' + self.requestBase + opts.uri + pinningURI); + } + + if (options.accept) { + request.setRequestHeader('accept', options.accept); + } + + if (options.payload && options.boundary) { + request.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + options.boundary); + request.send(options.payload); + } else { + request.send(); + } +}; + +/** + * creates a boundary that isn't part of the payload + */ +function createBoundary(data) { + while (true) { + var boundary = '----IPFSMini' + Math.random() * 100000 + '.' + Math.random() * 100000; + if (data.indexOf(boundary) === -1) { + return boundary; + } + } +} + +/** + * Add an string or buffer to IPFS + * @param {String|Buffer} `input` a single string or buffer + * @param {Function} `callback` a callback, with (error, ipfsHash String) + * @callback {String} `ipfsHash` returns an IPFS hash string + */ +IPFS.prototype.add = function addData(input, callback) { + var data = typeof input === 'object' && input.isBuffer ? input.toString('binary') : input; + var boundary = createBoundary(data); + var payload = '--' + boundary + '\r\nContent-Disposition: form-data; name="path"\r\nContent-Type: application/octet-stream\r\n\r\n' + data + '\r\n--' + boundary + '--'; + + var addCallback = function addCallback(err, result) { + return callback(err, !err ? result.Hash : null); + }; + this.sendAsync({ + jsonParse: true, + accept: 'application/json', + uri: '/add', + payload: payload, boundary: boundary + }, addCallback); +}; + +/** + * Add an JSON object to IPFS + * @param {Object} `jsonData` a single JSON object + * @param {Function} `callback` a callback, with (error, ipfsHash String) + * @callback {String} `ipfsHash` returns an IPFS hash string + */ +IPFS.prototype.addJSON = function addJson(jsonData, callback) { + var self = this; + self.add(JSON.stringify(jsonData), callback); +}; + +/** + * Get an object stat `/object/stat` for an IPFS hash + * @param {String} `ipfsHash` a single IPFS hash String + * @param {Function} `callback` a callback, with (error, stats Object) + * @callback {Object} `stats` returns the stats object for that IPFS hash + */ +IPFS.prototype.stat = function cat(ipfsHash, callback) { + var self = this; + self.sendAsync({ jsonParse: true, uri: '/object/stat/' + ipfsHash }, callback); +}; + +/** + * Get the data from an IPFS hash + * @param {String} `ipfsHash` a single IPFS hash String + * @param {Function} `callback` a callback, with (error, stats Object) + * @callback {String} `data` returns the output data + */ +IPFS.prototype.cat = function cat(ipfsHash, callback) { + var self = this; + self.sendAsync({ uri: '/cat/' + ipfsHash }, callback); +}; + +/** + * Get the data from an IPFS hash that is a JSON object + * @param {String} `ipfsHash` a single IPFS hash String + * @param {Function} `callback` a callback, with (error, json Object) + * @callback {Object} `data` returns the output data JSON object + */ +IPFS.prototype.catJSON = function cat(ipfsHash, callback) { + var self = this; + self.cat(ipfsHash, function (jsonError, jsonResult) { + // eslint-disable-line + if (jsonError) { + return callback(jsonError, null); + } + + try { + callback(null, JSON.parse(jsonResult)); + } catch (jsonParseError) { + callback(jsonParseError, null); + } + }); +}; + +/***/ }), + +/***/ "./node_modules/ipfs-mini/lib/lib/XMLHttpRequest-browser.js": +/*!******************************************************************!*\ + !*** ./node_modules/ipfs-mini/lib/lib/XMLHttpRequest-browser.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var XMLHttpRequest = window.XMLHttpRequest; // eslint-disable-line + +module.exports = XMLHttpRequest; + +/***/ }), + +/***/ "./node_modules/is-hex-prefixed/src/index.js": +/*!***************************************************!*\ + !*** ./node_modules/is-hex-prefixed/src/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Returns a `Boolean` on whether or not the a `String` starts with '0x' + * @param {String} str the string input value + * @return {Boolean} a boolean if it is or is not hex prefixed + * @throws if the str input is not a string + */ +module.exports = function isHexPrefixed(str) { + if (typeof str !== 'string') { + throw new Error("[is-hex-prefixed] value must be type 'string', is currently type " + (typeof str) + ", while checking isHexPrefixed."); + } + + return str.slice(0, 2) === '0x'; +} + + +/***/ }), + +/***/ "./node_modules/isarray/index.js": +/*!***************************************!*\ + !*** ./node_modules/isarray/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), + +/***/ "./node_modules/js-sha3/src/sha3.js": +/*!******************************************!*\ + !*** ./node_modules/js-sha3/src/sha3.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process, global) {/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.5.5 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2016 + * @license MIT + */ +(function (root) { + 'use strict'; - i = k / 4; - } else { - throw Error(cryptoUnavailable); + var NODE_JS = typeof process == 'object' && process.versions && process.versions.node; + if (NODE_JS) { + root = global; } + var COMMON_JS = !root.JS_SHA3_TEST && typeof module == 'object' && module.exports; + var HEX_CHARS = '0123456789abcdef'.split(''); + var SHAKE_PADDING = [31, 7936, 2031616, 520093696]; + var KECCAK_PADDING = [1, 256, 65536, 16777216]; + var PADDING = [6, 1536, 393216, 100663296]; + var SHIFT = [0, 8, 16, 24]; + var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, + 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, + 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, + 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, + 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]; + var BITS = [224, 256, 384, 512]; + var SHAKE_BITS = [128, 256]; + var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array']; - k = rd[--i]; - sd %= LOG_BASE; + var createOutputMethod = function (bits, padding, outputType) { + return function (message) { + return new Keccak(bits, padding, bits).update(message)[outputType](); + } + }; - // Convert trailing digits to zeros according to sd. - if (k && sd) { - n = mathpow(10, LOG_BASE - sd); - rd[i] = (k / n | 0) * n; - } + var createShakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits) { + return new Keccak(bits, padding, outputBits).update(message)[outputType](); + } + }; - // Remove trailing words which are zero. - for (; rd[i] === 0; i--) rd.pop(); + var createMethod = function (bits, padding) { + var method = createOutputMethod(bits, padding, 'hex'); + method.create = function () { + return new Keccak(bits, padding, bits); + }; + method.update = function (message) { + return method.create().update(message); + }; + for (var i = 0;i < OUTPUT_TYPES.length;++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createOutputMethod(bits, padding, type); + } + return method; + }; - // Zero? - if (i < 0) { - e = 0; - rd = [0]; - } else { - e = -1; + var createShakeMethod = function (bits, padding) { + var method = createShakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits) { + return new Keccak(bits, padding, outputBits); + }; + method.update = function (message, outputBits) { + return method.create(outputBits).update(message); + }; + for (var i = 0;i < OUTPUT_TYPES.length;++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createShakeOutputMethod(bits, padding, type); + } + return method; + }; - // Remove leading words which are zero and adjust exponent accordingly. - for (; rd[0] === 0; e -= LOG_BASE) rd.shift(); + var algorithms = [ + {name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod}, + {name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod}, + {name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod} + ]; - // Count the digits of the first word of rd to determine leading zeros. - for (k = 1, n = rd[0]; n >= 10; n /= 10) k++; + var methods = {}; - // Adjust the exponent for leading zeros of the first word of rd. - if (k < LOG_BASE) e -= LOG_BASE - k; + for (var i = 0;i < algorithms.length;++i) { + var algorithm = algorithms[i]; + var bits = algorithm.bits; + for (var j = 0;j < bits.length;++j) { + methods[algorithm.name +'_' + bits[j]] = algorithm.createMethod(bits[j], algorithm.padding); + } } - r.e = e; - r.d = rd; - - return r; -} - - -/* - * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`. - * - * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL). - * - * x {number|string|Decimal} - * - */ -function round(x) { - return finalise(x = new this(x), x.e + 1, this.rounding); -} - - -/* - * Return - * 1 if x > 0, - * -1 if x < 0, - * 0 if x is 0, - * -0 if x is -0, - * NaN otherwise - * - */ -function sign(x) { - x = new this(x); - return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN; -} - - -/* - * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits - * using rounding mode `rounding`. - * - * x {number|string|Decimal} A value in radians. - * - */ -function sin(x) { - return new this(x).sin(); -} + function Keccak(bits, padding, outputBits) { + this.blocks = []; + this.s = []; + this.padding = padding; + this.outputBits = outputBits; + this.reset = true; + this.block = 0; + this.start = 0; + this.blockCount = (1600 - (bits << 1)) >> 5; + this.byteCount = this.blockCount << 2; + this.outputBlocks = outputBits >> 5; + this.extraBytes = (outputBits & 31) >> 3; + for (var i = 0;i < 50;++i) { + this.s[i] = 0; + } + }; -/* - * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision` - * significant digits using rounding mode `rounding`. - * - * x {number|string|Decimal} A value in radians. - * - */ -function sinh(x) { - return new this(x).sinh(); -} + Keccak.prototype.update = function (message) { + var notString = typeof message != 'string'; + if (notString && message.constructor == root.ArrayBuffer) { + message = new Uint8Array(message); + } + var length = message.length, blocks = this.blocks, byteCount = this.byteCount, + blockCount = this.blockCount, index = 0, s = this.s, i, code; + + while (index < length) { + if (this.reset) { + this.reset = false; + blocks[0] = this.block; + for (i = 1;i < blockCount + 1;++i) { + blocks[i] = 0; + } + } + if (notString) { + for (i = this.start;index < length && i < byteCount;++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = this.start;index < length && i < byteCount;++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } + } + } + this.lastByteIndex = i; + if (i >= byteCount) { + this.start = i - byteCount; + this.block = blocks[blockCount]; + for (i = 0;i < blockCount;++i) { + s[i] ^= blocks[i]; + } + f(s); + this.reset = true; + } else { + this.start = i; + } + } + return this; + }; + Keccak.prototype.finalize = function () { + var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s; + blocks[i >> 2] |= this.padding[i & 3]; + if (this.lastByteIndex == this.byteCount) { + blocks[0] = blocks[blockCount]; + for (i = 1;i < blockCount + 1;++i) { + blocks[i] = 0; + } + } + blocks[blockCount - 1] |= 0x80000000; + for (i = 0;i < blockCount;++i) { + s[i] ^= blocks[i]; + } + f(s); + }; -/* - * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant - * digits using rounding mode `rounding`. - * - * x {number|string|Decimal} - * - */ -function sqrt(x) { - return new this(x).sqrt(); -} + Keccak.prototype.toString = Keccak.prototype.hex = function () { + this.finalize(); + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var hex = '', block; + while (j < outputBlocks) { + for (i = 0;i < blockCount && j < outputBlocks;++i, ++j) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] + + HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] + + HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] + + HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F]; + } + if (j % blockCount == 0) { + f(s); + i = 0; + } + } + if (extraBytes) { + block = s[i]; + if (extraBytes > 0) { + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F]; + } + if (extraBytes > 1) { + hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F]; + } + if (extraBytes > 2) { + hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F]; + } + } + return hex; + }; -/* - * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits - * using rounding mode `rounding`. - * - * x {number|string|Decimal} - * y {number|string|Decimal} - * - */ -function sub(x, y) { - return new this(x).sub(y); -} + Keccak.prototype.arrayBuffer = function () { + this.finalize(); + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var bytes = this.outputBits >> 3; + var buffer; + if (extraBytes) { + buffer = new ArrayBuffer((outputBlocks + 1) << 2); + } else { + buffer = new ArrayBuffer(bytes); + } + var array = new Uint32Array(buffer); + while (j < outputBlocks) { + for (i = 0;i < blockCount && j < outputBlocks;++i, ++j) { + array[j] = s[i]; + } + if (j % blockCount == 0) { + f(s); + } + } + if (extraBytes) { + array[i] = s[i]; + buffer = buffer.slice(0, bytes); + } + return buffer; + }; -/* - * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant - * digits using rounding mode `rounding`. - * - * x {number|string|Decimal} A value in radians. - * - */ -function tan(x) { - return new this(x).tan(); -} + Keccak.prototype.buffer = Keccak.prototype.arrayBuffer; + Keccak.prototype.digest = Keccak.prototype.array = function () { + this.finalize(); -/* - * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision` - * significant digits using rounding mode `rounding`. - * - * x {number|string|Decimal} A value in radians. - * - */ -function tanh(x) { - return new this(x).tanh(); -} + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var array = [], offset, block; + while (j < outputBlocks) { + for (i = 0;i < blockCount && j < outputBlocks;++i, ++j) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + array[offset + 1] = (block >> 8) & 0xFF; + array[offset + 2] = (block >> 16) & 0xFF; + array[offset + 3] = (block >> 24) & 0xFF; + } + if (j % blockCount == 0) { + f(s); + } + } + if (extraBytes) { + offset = j << 2; + block = s[i]; + if (extraBytes > 0) { + array[offset] = block & 0xFF; + } + if (extraBytes > 1) { + array[offset + 1] = (block >> 8) & 0xFF; + } + if (extraBytes > 2) { + array[offset + 2] = (block >> 16) & 0xFF; + } + } + return array; + }; + var f = function (s) { + var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, + b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, + b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, + b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; + for (n = 0;n < 48;n += 2) { + c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; + c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; + c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; + c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; + c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; + c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; + c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; + c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; + c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; + c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; -/* - * Return a new Decimal whose value is `x` truncated to an integer. - * - * x {number|string|Decimal} - * - */ -function trunc(x) { - return finalise(x = new this(x), x.e + 1, 1); -} + h = c8 ^ ((c2 << 1) | (c3 >>> 31)); + l = c9 ^ ((c3 << 1) | (c2 >>> 31)); + s[0] ^= h; + s[1] ^= l; + s[10] ^= h; + s[11] ^= l; + s[20] ^= h; + s[21] ^= l; + s[30] ^= h; + s[31] ^= l; + s[40] ^= h; + s[41] ^= l; + h = c0 ^ ((c4 << 1) | (c5 >>> 31)); + l = c1 ^ ((c5 << 1) | (c4 >>> 31)); + s[2] ^= h; + s[3] ^= l; + s[12] ^= h; + s[13] ^= l; + s[22] ^= h; + s[23] ^= l; + s[32] ^= h; + s[33] ^= l; + s[42] ^= h; + s[43] ^= l; + h = c2 ^ ((c6 << 1) | (c7 >>> 31)); + l = c3 ^ ((c7 << 1) | (c6 >>> 31)); + s[4] ^= h; + s[5] ^= l; + s[14] ^= h; + s[15] ^= l; + s[24] ^= h; + s[25] ^= l; + s[34] ^= h; + s[35] ^= l; + s[44] ^= h; + s[45] ^= l; + h = c4 ^ ((c8 << 1) | (c9 >>> 31)); + l = c5 ^ ((c9 << 1) | (c8 >>> 31)); + s[6] ^= h; + s[7] ^= l; + s[16] ^= h; + s[17] ^= l; + s[26] ^= h; + s[27] ^= l; + s[36] ^= h; + s[37] ^= l; + s[46] ^= h; + s[47] ^= l; + h = c6 ^ ((c0 << 1) | (c1 >>> 31)); + l = c7 ^ ((c1 << 1) | (c0 >>> 31)); + s[8] ^= h; + s[9] ^= l; + s[18] ^= h; + s[19] ^= l; + s[28] ^= h; + s[29] ^= l; + s[38] ^= h; + s[39] ^= l; + s[48] ^= h; + s[49] ^= l; + b0 = s[0]; + b1 = s[1]; + b32 = (s[11] << 4) | (s[10] >>> 28); + b33 = (s[10] << 4) | (s[11] >>> 28); + b14 = (s[20] << 3) | (s[21] >>> 29); + b15 = (s[21] << 3) | (s[20] >>> 29); + b46 = (s[31] << 9) | (s[30] >>> 23); + b47 = (s[30] << 9) | (s[31] >>> 23); + b28 = (s[40] << 18) | (s[41] >>> 14); + b29 = (s[41] << 18) | (s[40] >>> 14); + b20 = (s[2] << 1) | (s[3] >>> 31); + b21 = (s[3] << 1) | (s[2] >>> 31); + b2 = (s[13] << 12) | (s[12] >>> 20); + b3 = (s[12] << 12) | (s[13] >>> 20); + b34 = (s[22] << 10) | (s[23] >>> 22); + b35 = (s[23] << 10) | (s[22] >>> 22); + b16 = (s[33] << 13) | (s[32] >>> 19); + b17 = (s[32] << 13) | (s[33] >>> 19); + b48 = (s[42] << 2) | (s[43] >>> 30); + b49 = (s[43] << 2) | (s[42] >>> 30); + b40 = (s[5] << 30) | (s[4] >>> 2); + b41 = (s[4] << 30) | (s[5] >>> 2); + b22 = (s[14] << 6) | (s[15] >>> 26); + b23 = (s[15] << 6) | (s[14] >>> 26); + b4 = (s[25] << 11) | (s[24] >>> 21); + b5 = (s[24] << 11) | (s[25] >>> 21); + b36 = (s[34] << 15) | (s[35] >>> 17); + b37 = (s[35] << 15) | (s[34] >>> 17); + b18 = (s[45] << 29) | (s[44] >>> 3); + b19 = (s[44] << 29) | (s[45] >>> 3); + b10 = (s[6] << 28) | (s[7] >>> 4); + b11 = (s[7] << 28) | (s[6] >>> 4); + b42 = (s[17] << 23) | (s[16] >>> 9); + b43 = (s[16] << 23) | (s[17] >>> 9); + b24 = (s[26] << 25) | (s[27] >>> 7); + b25 = (s[27] << 25) | (s[26] >>> 7); + b6 = (s[36] << 21) | (s[37] >>> 11); + b7 = (s[37] << 21) | (s[36] >>> 11); + b38 = (s[47] << 24) | (s[46] >>> 8); + b39 = (s[46] << 24) | (s[47] >>> 8); + b30 = (s[8] << 27) | (s[9] >>> 5); + b31 = (s[9] << 27) | (s[8] >>> 5); + b12 = (s[18] << 20) | (s[19] >>> 12); + b13 = (s[19] << 20) | (s[18] >>> 12); + b44 = (s[29] << 7) | (s[28] >>> 25); + b45 = (s[28] << 7) | (s[29] >>> 25); + b26 = (s[38] << 8) | (s[39] >>> 24); + b27 = (s[39] << 8) | (s[38] >>> 24); + b8 = (s[48] << 14) | (s[49] >>> 18); + b9 = (s[49] << 14) | (s[48] >>> 18); -// Create and configure initial Decimal constructor. -var Decimal = clone(DEFAULTS); + s[0] = b0 ^ (~b2 & b4); + s[1] = b1 ^ (~b3 & b5); + s[10] = b10 ^ (~b12 & b14); + s[11] = b11 ^ (~b13 & b15); + s[20] = b20 ^ (~b22 & b24); + s[21] = b21 ^ (~b23 & b25); + s[30] = b30 ^ (~b32 & b34); + s[31] = b31 ^ (~b33 & b35); + s[40] = b40 ^ (~b42 & b44); + s[41] = b41 ^ (~b43 & b45); + s[2] = b2 ^ (~b4 & b6); + s[3] = b3 ^ (~b5 & b7); + s[12] = b12 ^ (~b14 & b16); + s[13] = b13 ^ (~b15 & b17); + s[22] = b22 ^ (~b24 & b26); + s[23] = b23 ^ (~b25 & b27); + s[32] = b32 ^ (~b34 & b36); + s[33] = b33 ^ (~b35 & b37); + s[42] = b42 ^ (~b44 & b46); + s[43] = b43 ^ (~b45 & b47); + s[4] = b4 ^ (~b6 & b8); + s[5] = b5 ^ (~b7 & b9); + s[14] = b14 ^ (~b16 & b18); + s[15] = b15 ^ (~b17 & b19); + s[24] = b24 ^ (~b26 & b28); + s[25] = b25 ^ (~b27 & b29); + s[34] = b34 ^ (~b36 & b38); + s[35] = b35 ^ (~b37 & b39); + s[44] = b44 ^ (~b46 & b48); + s[45] = b45 ^ (~b47 & b49); + s[6] = b6 ^ (~b8 & b0); + s[7] = b7 ^ (~b9 & b1); + s[16] = b16 ^ (~b18 & b10); + s[17] = b17 ^ (~b19 & b11); + s[26] = b26 ^ (~b28 & b20); + s[27] = b27 ^ (~b29 & b21); + s[36] = b36 ^ (~b38 & b30); + s[37] = b37 ^ (~b39 & b31); + s[46] = b46 ^ (~b48 & b40); + s[47] = b47 ^ (~b49 & b41); + s[8] = b8 ^ (~b0 & b2); + s[9] = b9 ^ (~b1 & b3); + s[18] = b18 ^ (~b10 & b12); + s[19] = b19 ^ (~b11 & b13); + s[28] = b28 ^ (~b20 & b22); + s[29] = b29 ^ (~b21 & b23); + s[38] = b38 ^ (~b30 & b32); + s[39] = b39 ^ (~b31 & b33); + s[48] = b48 ^ (~b40 & b42); + s[49] = b49 ^ (~b41 & b43); -// Create the internal constants from their string values. -LN10 = new Decimal(LN10); -PI = new Decimal(PI); + s[0] ^= RC[n]; + s[1] ^= RC[n + 1]; + } + } -/* harmony default export */ __webpack_exports__["default"] = (Decimal); + if (COMMON_JS) { + module.exports = methods; + } else if (root) { + for (var key in methods) { + root[key] = methods[key]; + } + } +}(this)); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) + +/***/ }), + +/***/ "./node_modules/json-schema-traverse/index.js": +/*!****************************************************!*\ + !*** ./node_modules/json-schema-traverse/index.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var traverse = module.exports = function (schema, opts, cb) { + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + _traverse(opts, cb, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; + + +/***/ }), + +/***/ "./node_modules/lodash/_baseFor.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseFor.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "./node_modules/lodash/_createBaseFor.js"); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + + +/***/ }), + +/***/ "./node_modules/lodash/_baseForOwn.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseForOwn.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + + +/***/ }), + +/***/ "./node_modules/lodash/_baseFunctions.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_baseFunctions.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"), + isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"); + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ +function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); +} + +module.exports = baseFunctions; + + +/***/ }), + +/***/ "./node_modules/lodash/_baseGetTag.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseGetTag.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + + +/***/ }), + +/***/ "./node_modules/lodash/_baseMerge.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseMerge.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), + assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), + baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), + baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ "./node_modules/lodash/_baseMergeDeep.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"), + safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"); + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +module.exports = baseMerge; /***/ }), -/***/ "./node_modules/ethjs-abi/lib/index.js": -/*!*********************************************!*\ - !*** ./node_modules/ethjs-abi/lib/index.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_baseMergeDeep.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_baseMergeDeep.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(Buffer) { +var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), + cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), + cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"), + copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), + initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), + isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"), + isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), + isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + isPlainObject = __webpack_require__(/*! ./isPlainObject */ "./node_modules/lodash/isPlainObject.js"), + isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"), + safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"), + toPlainObject = __webpack_require__(/*! ./toPlainObject */ "./node_modules/lodash/toPlainObject.js"); -/* eslint-disable */ +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); -var utils = __webpack_require__(/*! ./utils/index.js */ "./node_modules/ethjs-abi/lib/utils/index.js"); -var uint256Coder = utils.uint256Coder; -var coderBoolean = utils.coderBoolean; -var coderFixedBytes = utils.coderFixedBytes; -var coderAddress = utils.coderAddress; -var coderDynamicBytes = utils.coderDynamicBytes; -var coderString = utils.coderString; -var coderArray = utils.coderArray; -var paramTypePart = utils.paramTypePart; -var getParamCoder = utils.getParamCoder; + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; -function Result() {} + var isCommon = newValue === undefined; -function encodeParams(types, values) { - if (types.length !== values.length) { - throw new Error('[ethjs-abi] while encoding params, types/values mismatch, types length ' + types.length + ' should be ' + values.length); + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); } + assignMergeValue(object, key, newValue); +} - var parts = []; +module.exports = baseMergeDeep; - types.forEach(function (type, index) { - var coder = getParamCoder(type); - parts.push({ dynamic: coder.dynamic, value: coder.encode(values[index]) }); + +/***/ }), + +/***/ "./node_modules/lodash/_baseRest.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseRest.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), + overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"), + setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js"); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; + + +/***/ }), + +/***/ "./node_modules/lodash/_baseToPairs.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseToPairs.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"); + +/** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ +function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; }); +} - function alignSize(size) { - return parseInt(32 * Math.ceil(size / 32)); +module.exports = baseToPairs; + + +/***/ }), + +/***/ "./node_modules/lodash/_castFunction.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_castFunction.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + + +/***/ }), + +/***/ "./node_modules/lodash/_cloneArrayBuffer.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_cloneArrayBuffer.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; + + +/***/ }), + +/***/ "./node_modules/lodash/_cloneBuffer.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_cloneBuffer.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - var staticSize = 0, - dynamicSize = 0; - parts.forEach(function (part) { - if (part.dynamic) { - staticSize += 32; - dynamicSize += alignSize(part.value.length); - } else { - staticSize += alignSize(part.value.length); - } - }); + buffer.copy(result); + return result; +} - var offset = 0, - dynamicOffset = staticSize; - var data = new Buffer(staticSize + dynamicSize); +module.exports = cloneBuffer; - parts.forEach(function (part, index) { - if (part.dynamic) { - uint256Coder.encode(dynamicOffset).copy(data, offset); - offset += 32; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - part.value.copy(data, dynamicOffset); - dynamicOffset += alignSize(part.value.length); - } else { - part.value.copy(data, offset); - offset += alignSize(part.value.length); - } - }); +/***/ }), - return '0x' + data.toString('hex'); +/***/ "./node_modules/lodash/_cloneTypedArray.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_cloneTypedArray.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"); + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } -// decode bytecode data from output names and types -function decodeParams(names, types, data) { - // Names is optional, so shift over all the parameters if not provided - if (arguments.length < 3) { - data = types; - types = names; - names = []; +module.exports = cloneTypedArray; + + +/***/ }), + +/***/ "./node_modules/lodash/_copyArray.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_copyArray.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; } + return array; +} - data = utils.hexOrBuffer(data); - var values = new Result(); +module.exports = copyArray; - var offset = 0; - types.forEach(function (type, index) { - var coder = getParamCoder(type); - if (coder.dynamic) { - var dynamicOffset = uint256Coder.decode(data, offset); - var result = coder.decode(data, dynamicOffset.value.toNumber()); - offset += dynamicOffset.consumed; - } else { - var result = coder.decode(data, offset); - offset += result.consumed; + +/***/ }), + +/***/ "./node_modules/lodash/_copyObject.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_copyObject.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), + baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; } - values[index] = result.value; - if (names[index]) { - values[names[index]] = result.value; + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); } - }); - return values; + } + return object; } -// encode method ABI object with values in an array, output bytecode -function encodeMethod(method, values) { - var signature = method.name + '(' + utils.getKeys(method.inputs, 'type').join(',') + ')'; - var signatureEncoded = '0x' + new Buffer(utils.keccak256(signature), 'hex').slice(0, 4).toString('hex'); - var paramsEncoded = encodeParams(utils.getKeys(method.inputs, 'type'), values).substring(2); +module.exports = copyObject; - return '' + signatureEncoded + paramsEncoded; -} -// decode method data bytecode, from method ABI object -function decodeMethod(method, data) { - var outputNames = utils.getKeys(method.outputs, 'name', true); - var outputTypes = utils.getKeys(method.outputs, 'type'); +/***/ }), - return decodeParams(outputNames, outputTypes, utils.hexOrBuffer(data)); -} +/***/ "./node_modules/lodash/_copySymbols.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_copySymbols.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -// decode method data bytecode, from method ABI object -function encodeEvent(eventObject, values) { - return encodeMethod(eventObject, values); +var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"); + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); } -// decode method data bytecode, from method ABI object -function decodeEvent(eventObject, data) { - var inputNames = utils.getKeys(eventObject.inputs, 'name', true); - var inputTypes = utils.getKeys(eventObject.inputs, 'type'); +module.exports = copySymbols; - return decodeParams(inputNames, inputTypes, utils.hexOrBuffer(data)); + +/***/ }), + +/***/ "./node_modules/lodash/_copySymbolsIn.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_copySymbolsIn.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); } -module.exports = { - encodeParams: encodeParams, - decodeParams: decodeParams, - encodeMethod: encodeMethod, - decodeMethod: decodeMethod, - encodeEvent: encodeEvent, - decodeEvent: decodeEvent -}; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)) +module.exports = copySymbolsIn; + /***/ }), -/***/ "./node_modules/ethjs-abi/lib/utils/index.js": -/*!***************************************************!*\ - !*** ./node_modules/ethjs-abi/lib/utils/index.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_createAssigner.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_createAssigner.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(Buffer) { - -var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js"); -var numberToBN = __webpack_require__(/*! number-to-bn */ "./node_modules/number-to-bn/src/index.js"); -var keccak256 = __webpack_require__(/*! js-sha3 */ "./node_modules/js-sha3/src/sha3.js").keccak_256; - -// from ethereumjs-util -function stripZeros(aInput) { - var a = aInput; // eslint-disable-line - var first = a[0]; // eslint-disable-line - while (a.length > 0 && first.toString() === '0') { - a = a.slice(1); - first = a[0]; - } - return a; -} +var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), + isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"); -function bnToBuffer(bnInput) { - var bn = bnInput; // eslint-disable-line - var hex = bn.toString(16); // eslint-disable-line - if (hex.length % 2) { - hex = '0' + hex; - } - return stripZeros(new Buffer(hex, 'hex')); -} +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; -function isHexString(value, length) { - if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) { - return false; - } - if (length && value.length !== 2 + 2 * length) { - return false; - } - return true; -} + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; -function hexOrBuffer(valueInput, name) { - var value = valueInput; // eslint-disable-line - if (!Buffer.isBuffer(value)) { - if (!isHexString(value)) { - var error = new Error(name ? '[ethjs-abi] invalid ' + name : '[ethjs-abi] invalid hex or buffer, must be a prefixed alphanumeric even length hex string'); - error.reason = '[ethjs-abi] invalid hex string, hex must be prefixed and alphanumeric (e.g. 0x023..)'; - error.value = value; - throw error; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; } - - value = value.substring(2); - if (value.length % 2) { - value = '0' + value; + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } } - value = new Buffer(value, 'hex'); - } - - return value; -} - -function hexlify(value) { - if (typeof value === 'number') { - return '0x' + bnToBuffer(new BN(value)).toString('hex'); - } else if (value.mod || value.modulo) { - return '0x' + bnToBuffer(value).toString('hex'); - } else { - // eslint-disable-line - return '0x' + hexOrBuffer(value).toString('hex'); - } + return object; + }); } -// getKeys([{a: 1, b: 2}, {a: 3, b: 4}], 'a') => [1, 3] -function getKeys(params, key, allowEmpty) { - var result = []; // eslint-disable-line - - if (!Array.isArray(params)) { - throw new Error('[ethjs-abi] while getting keys, invalid params value ' + JSON.stringify(params)); - } - - for (var i = 0; i < params.length; i++) { - // eslint-disable-line - var value = params[i][key]; // eslint-disable-line - if (allowEmpty && !value) { - value = ''; - } else if (typeof value !== 'string') { - throw new Error('[ethjs-abi] while getKeys found invalid ABI data structure, type value not string'); - } - result.push(value); - } +module.exports = createAssigner; - return result; -} -function coderNumber(size, signed) { - return { - encode: function encodeNumber(valueInput) { - var value = valueInput; // eslint-disable-line +/***/ }), - if (typeof value === 'object' && value.toString && (value.toTwos || value.dividedToIntegerBy)) { - value = value.toString(10).split('.')[0]; - } +/***/ "./node_modules/lodash/_createBaseFor.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_createBaseFor.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - if (typeof value === 'string' || typeof value === 'number') { - value = String(value).split('.')[0]; - } +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; - value = numberToBN(value); - value = value.toTwos(size * 8).maskn(size * 8); - if (signed) { - value = value.fromTwos(size * 8).toTwos(256); - } - return value.toArrayLike(Buffer, 'be', 32); - }, - decode: function decodeNumber(data, offset) { - var junkLength = 32 - size; // eslint-disable-line - var value = new BN(data.slice(offset + junkLength, offset + 32)); // eslint-disable-line - if (signed) { - value = value.fromTwos(size * 8); - } else { - value = value.maskn(size * 8); + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; } - return { - consumed: 32, - value: new BN(value.toString(10)) - }; } + return object; }; } -var uint256Coder = coderNumber(32, false); -var coderBoolean = { - encode: function encodeBoolean(value) { - return uint256Coder.encode(value ? 1 : 0); - }, - decode: function decodeBoolean(data, offset) { - var result = uint256Coder.decode(data, offset); // eslint-disable-line - return { - consumed: result.consumed, - value: !result.value.isZero() - }; - } -}; +module.exports = createBaseFor; -function coderFixedBytes(length) { - return { - encode: function encodeFixedBytes(valueInput) { - var value = valueInput; // eslint-disable-line - value = hexOrBuffer(value); - if (value.length === 32) { - return value; - } +/***/ }), - var result = new Buffer(32); // eslint-disable-line - result.fill(0); - value.copy(result); - return result; - }, - decode: function decodeFixedBytes(data, offset) { - if (data.length < offset + 32) { - throw new Error('[ethjs-abi] while decoding fixed bytes, invalid bytes data length: ' + length); - } +/***/ "./node_modules/lodash/_createToPairs.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_createToPairs.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return { - consumed: 32, - value: '0x' + data.slice(offset, offset + length).toString('hex') - }; +var baseToPairs = __webpack_require__(/*! ./_baseToPairs */ "./node_modules/lodash/_baseToPairs.js"), + getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), + mapToArray = __webpack_require__(/*! ./_mapToArray */ "./node_modules/lodash/_mapToArray.js"), + setToPairs = __webpack_require__(/*! ./_setToPairs */ "./node_modules/lodash/_setToPairs.js"); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); } + return baseToPairs(object, keysFunc(object)); }; } -var coderAddress = { - encode: function encodeAddress(valueInput) { - var value = valueInput; // eslint-disable-line - var result = new Buffer(32); // eslint-disable-line - if (!isHexString(value, 20)) { - throw new Error('[ethjs-abi] while encoding address, invalid address value, not alphanumeric 20 byte hex string'); - } - value = hexOrBuffer(value); - result.fill(0); - value.copy(result, 12); - return result; - }, - decode: function decodeAddress(data, offset) { - if (data.length === 0) { - return { - consumed: 32, - value: '0x' - }; - } - if (data.length < offset + 32) { - throw new Error('[ethjs-abi] while decoding address data, invalid address data, invalid byte length ' + data.length); - } - return { - consumed: 32, - value: '0x' + data.slice(offset + 12, offset + 32).toString('hex') - }; - } -}; +module.exports = createToPairs; -function encodeDynamicBytesHelper(value) { - var dataLength = parseInt(32 * Math.ceil(value.length / 32)); // eslint-disable-line - var padding = new Buffer(dataLength - value.length); // eslint-disable-line - padding.fill(0); - return Buffer.concat([uint256Coder.encode(value.length), value, padding]); -} +/***/ }), -function decodeDynamicBytesHelper(data, offset) { - if (data.length < offset + 32) { - throw new Error('[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: ' + data.length + ' should be less than ' + (offset + 32)); - } +/***/ "./node_modules/lodash/_customDefaultsMerge.js": +/*!*****************************************************!*\ + !*** ./node_modules/lodash/_customDefaultsMerge.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var length = uint256Coder.decode(data, offset).value; // eslint-disable-line - length = length.toNumber(); - if (data.length < offset + 32 + length) { - throw new Error('[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: ' + data.length + ' should be less than ' + (offset + 32 + length)); - } +var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); - return { - consumed: parseInt(32 + 32 * Math.ceil(length / 32), 10), - value: data.slice(offset + 32, offset + 32 + length) - }; +/** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ +function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; } -var coderDynamicBytes = { - encode: function encodeDynamicBytes(value) { - return encodeDynamicBytesHelper(hexOrBuffer(value)); - }, - decode: function decodeDynamicBytes(data, offset) { - var result = decodeDynamicBytesHelper(data, offset); // eslint-disable-line - result.value = '0x' + result.value.toString('hex'); - return result; - }, - dynamic: true -}; - -var coderString = { - encode: function encodeString(value) { - return encodeDynamicBytesHelper(new Buffer(value, 'utf8')); - }, - decode: function decodeString(data, offset) { - var result = decodeDynamicBytesHelper(data, offset); // eslint-disable-line - result.value = result.value.toString('utf8'); - return result; - }, - dynamic: true -}; - -function coderArray(coder, lengthInput) { - return { - encode: function encodeArray(value) { - var result = new Buffer(0); // eslint-disable-line - var length = lengthInput; // eslint-disable-line +module.exports = customDefaultsMerge; - if (!Array.isArray(value)) { - throw new Error('[ethjs-abi] while encoding array, invalid array data, not type Object (Array)'); - } - if (length === -1) { - length = value.length; - result = uint256Coder.encode(length); - } +/***/ }), - if (length !== value.length) { - throw new Error('[ethjs-abi] while encoding array, size mismatch array length ' + length + ' does not equal ' + value.length); - } +/***/ "./node_modules/lodash/_defineProperty.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_defineProperty.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - value.forEach(function (resultValue) { - result = Buffer.concat([result, coder.encode(resultValue)]); - }); +var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"); - return result; - }, - decode: function decodeArray(data, offsetInput) { - var length = lengthInput; // eslint-disable-line - var offset = offsetInput; // eslint-disable-line - // @TODO: - // if (data.length < offset + length * 32) { throw new Error('invalid array'); } +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); - var consumed = 0; // eslint-disable-line - var decodeResult; // eslint-disable-line +module.exports = defineProperty; - if (length === -1) { - decodeResult = uint256Coder.decode(data, offset); - length = decodeResult.value.toNumber(); - consumed += decodeResult.consumed; - offset += decodeResult.consumed; - } - var value = []; // eslint-disable-line +/***/ }), - for (var i = 0; i < length; i++) { - // eslint-disable-line - var loopResult = coder.decode(data, offset); - consumed += loopResult.consumed; - offset += loopResult.consumed; - value.push(loopResult.value); - } +/***/ "./node_modules/lodash/_freeGlobal.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_freeGlobal.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return { - consumed: consumed, - value: value - }; - }, - dynamic: lengthInput === -1 - }; -} +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -// Break the type up into [staticType][staticArray]*[dynamicArray]? | [dynamicType] and -// build the coder up from its parts -var paramTypePart = new RegExp(/^((u?int|bytes)([0-9]*)|(address|bool|string)|(\[([0-9]*)\]))/); +module.exports = freeGlobal; -function getParamCoder(typeInput) { - var type = typeInput; // eslint-disable-line - var coder = null; // eslint-disable-line - var invalidTypeErrorMessage = '[ethjs-abi] while getting param coder (getParamCoder) type value ' + JSON.stringify(type) + ' is either invalid or unsupported by ethjs-abi.'; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) - while (type) { - var part = type.match(paramTypePart); // eslint-disable-line - if (!part) { - throw new Error(invalidTypeErrorMessage); - } - type = type.substring(part[0].length); +/***/ }), - var prefix = part[2] || part[4] || part[5]; // eslint-disable-line - switch (prefix) { - case 'int':case 'uint': - if (coder) { - throw new Error(invalidTypeErrorMessage); - } - var intSize = parseInt(part[3] || 256); // eslint-disable-line - if (intSize === 0 || intSize > 256 || intSize % 8 !== 0) { - throw new Error('[ethjs-abi] while getting param coder for type ' + type + ', invalid ' + prefix + ' width: ' + type); - } +/***/ "./node_modules/lodash/_getAllKeys.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_getAllKeys.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - coder = coderNumber(intSize / 8, prefix === 'int'); - break; +var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); - case 'bool': - if (coder) { - throw new Error(invalidTypeErrorMessage); - } - coder = coderBoolean; - break; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); - case 'string': - if (coder) { - throw new Error(invalidTypeErrorMessage); - } - coder = coderString; - break; +module.exports = nativeKeys; - case 'bytes': - if (coder) { - throw new Error(invalidTypeErrorMessage); - } - if (part[3]) { - var size = parseInt(part[3]); // eslint-disable-line - if (size === 0 || size > 32) { - throw new Error('[ethjs-abi] while getting param coder for prefix bytes, invalid type ' + type + ', size ' + size + ' should be 0 or greater than 32'); - } - coder = coderFixedBytes(size); - } else { - coder = coderDynamicBytes; - } - break; - case 'address': - if (coder) { - throw new Error(invalidTypeErrorMessage); - } - coder = coderAddress; - break; +/***/ }), - case '[]': - if (!coder || coder.dynamic) { - throw new Error(invalidTypeErrorMessage); - } - coder = coderArray(coder, -1); - break; +/***/ "./node_modules/lodash/_getAllKeysIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getAllKeysIn.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // "[0-9+]" - default: - if (!coder || coder.dynamic) { - throw new Error(invalidTypeErrorMessage); - } - var defaultSize = parseInt(part[6]); // eslint-disable-line - coder = coderArray(coder, defaultSize); +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); } } + return result; +} - if (!coder) { - throw new Error(invalidTypeErrorMessage); - } - return coder; +module.exports = nativeKeysIn; + + +/***/ }), + +/***/ "./node_modules/lodash/_getNative.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_getNative.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; } -module.exports = { - BN: BN, - bnToBuffer: bnToBuffer, - isHexString: isHexString, - hexOrBuffer: hexOrBuffer, - hexlify: hexlify, - stripZeros: stripZeros, +module.exports = getValue; - keccak256: keccak256, - getKeys: getKeys, - numberToBN: numberToBN, - coderNumber: coderNumber, - uint256Coder: uint256Coder, - coderBoolean: coderBoolean, - coderFixedBytes: coderFixedBytes, - coderAddress: coderAddress, - coderDynamicBytes: coderDynamicBytes, - coderString: coderString, - coderArray: coderArray, - paramTypePart: paramTypePart, - getParamCoder: getParamCoder -}; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)) +/***/ }), + +/***/ "./node_modules/lodash/_getPrototype.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getPrototype.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; + /***/ }), -/***/ "./node_modules/events/events.js": -/*!***************************************!*\ - !*** ./node_modules/events/events.js ***! - \***************************************/ +/***/ "./node_modules/lodash/_getSymbols.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_getSymbols.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -function EventEmitter() { - this._events = this._events || {}; - this._maxListeners = this._maxListeners || undefined; +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; } -module.exports = EventEmitter; -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; +module.exports = stubArray; -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; -// By default EventEmitters will print a warning if more than 10 listeners are -// added to it. This is a useful default which helps finding memory leaks. -EventEmitter.defaultMaxListeners = 10; +/***/ }), -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -EventEmitter.prototype.setMaxListeners = function(n) { - if (!isNumber(n) || n < 0 || isNaN(n)) - throw TypeError('n must be a positive number'); - this._maxListeners = n; - return this; -}; +/***/ "./node_modules/lodash/_getSymbolsIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getSymbolsIn.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -EventEmitter.prototype.emit = function(type) { - var er, handler, len, args, i, listeners; +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} - if (!this._events) - this._events = {}; +module.exports = stubArray; - // If there is no 'error' event listener then throw. - if (type === 'error') { - if (!this._events.error || - (isObject(this._events.error) && !this._events.error.length)) { - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } else { - // At least give some kind of context to the user - var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); - err.context = er; - throw err; - } - } - } - handler = this._events[type]; +/***/ }), - if (isUndefined(handler)) - return false; +/***/ "./node_modules/lodash/_getTag.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/_getTag.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - if (isFunction(handler)) { - switch (arguments.length) { - // fast cases - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - // slower - default: - args = Array.prototype.slice.call(arguments, 1); - handler.apply(this, args); - } - } else if (isObject(handler)) { - args = Array.prototype.slice.call(arguments, 1); - listeners = handler.slice(); - len = listeners.length; - for (i = 0; i < len; i++) - listeners[i].apply(this, args); - } +/** Used for built-in method references. */ +var objectProto = Object.prototype; - return true; -}; +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; -EventEmitter.prototype.addListener = function(type, listener) { - var m; +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} - if (!isFunction(listener)) - throw TypeError('listener must be a function'); +module.exports = objectToString; - if (!this._events) - this._events = {}; - // To avoid recursion in the case that type === "newListener"! Before - // adding it to the listeners, first emit "newListener". - if (this._events.newListener) - this.emit('newListener', type, - isFunction(listener.listener) ? - listener.listener : listener); +/***/ }), - if (!this._events[type]) - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - else if (isObject(this._events[type])) - // If we've already got an array, just append. - this._events[type].push(listener); - else - // Adding the second element, need to change to array. - this._events[type] = [this._events[type], listener]; +/***/ "./node_modules/lodash/_initCloneArray.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_initCloneArray.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // Check for listener leak - if (isObject(this._events[type]) && !this._events[type].warned) { - if (!isUndefined(this._maxListeners)) { - m = this._maxListeners; - } else { - m = EventEmitter.defaultMaxListeners; - } +/** Used for built-in method references. */ +var objectProto = Object.prototype; - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - if (typeof console.trace === 'function') { - // not supported in IE 10 - console.trace(); - } - } - } +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - return this; -}; +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); -EventEmitter.prototype.on = EventEmitter.prototype.addListener; + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} -EventEmitter.prototype.once = function(type, listener) { - if (!isFunction(listener)) - throw TypeError('listener must be a function'); +module.exports = initCloneArray; - var fired = false; - function g() { - this.removeListener(type, g); +/***/ }), - if (!fired) { - fired = true; - listener.apply(this, arguments); - } - } +/***/ "./node_modules/lodash/_initCloneByTag.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_initCloneByTag.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - g.listener = listener; - this.on(type, g); +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} - return this; -}; +module.exports = identity; -// emits a 'removeListener' event iff the listener was removed -EventEmitter.prototype.removeListener = function(type, listener) { - var list, position, length, i; - if (!isFunction(listener)) - throw TypeError('listener must be a function'); +/***/ }), - if (!this._events || !this._events[type]) - return this; +/***/ "./node_modules/lodash/_initCloneObject.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_initCloneObject.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - list = this._events[type]; - length = list.length; - position = -1; +var baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"), + getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), + isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"); - if (list === listener || - (isFunction(list.listener) && list.listener === listener)) { - delete this._events[type]; - if (this._events.removeListener) - this.emit('removeListener', type, listener); +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} - } else if (isObject(list)) { - for (i = length; i-- > 0;) { - if (list[i] === listener || - (list[i].listener && list[i].listener === listener)) { - position = i; - break; - } - } +module.exports = initCloneObject; - if (position < 0) - return this; - if (list.length === 1) { - list.length = 0; - delete this._events[type]; - } else { - list.splice(position, 1); - } +/***/ }), - if (this._events.removeListener) - this.emit('removeListener', type, listener); - } +/***/ "./node_modules/lodash/_isFlattenable.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_isFlattenable.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return this; -}; +var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), + isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); -EventEmitter.prototype.removeAllListeners = function(type) { - var key, listeners; +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; - if (!this._events) - return this; +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} - // not listening for removeListener, no need to emit - if (!this._events.removeListener) { - if (arguments.length === 0) - this._events = {}; - else if (this._events[type]) - delete this._events[type]; - return this; - } +module.exports = isFlattenable; - // emit removeListener for all listeners on all events - if (arguments.length === 0) { - for (key in this._events) { - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = {}; - return this; - } - listeners = this._events[type]; +/***/ }), - if (isFunction(listeners)) { - this.removeListener(type, listeners); - } else if (listeners) { - // LIFO order - while (listeners.length) - this.removeListener(type, listeners[listeners.length - 1]); - } - delete this._events[type]; +/***/ "./node_modules/lodash/_isIterateeCall.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_isIterateeCall.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - return this; -}; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} -EventEmitter.prototype.listeners = function(type) { - var ret; - if (!this._events || !this._events[type]) - ret = []; - else if (isFunction(this._events[type])) - ret = [this._events[type]]; - else - ret = this._events[type].slice(); - return ret; -}; +module.exports = stubFalse; -EventEmitter.prototype.listenerCount = function(type) { - if (this._events) { - var evlistener = this._events[type]; - if (isFunction(evlistener)) - return 1; - else if (evlistener) - return evlistener.length; - } - return 0; -}; +/***/ }), -EventEmitter.listenerCount = function(emitter, type) { - return emitter.listenerCount(type); -}; +/***/ "./node_modules/lodash/_isPrototype.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_isPrototype.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -function isFunction(arg) { - return typeof arg === 'function'; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; } -function isNumber(arg) { - return typeof arg === 'number'; -} +module.exports = stubFalse; -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -function isUndefined(arg) { - return arg === void 0; +/***/ }), + +/***/ "./node_modules/lodash/_listCacheClear.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_listCacheClear.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; } +module.exports = listCacheClear; + /***/ }), -/***/ "./node_modules/fast-deep-equal/index.js": -/*!***********************************************!*\ - !*** ./node_modules/fast-deep-equal/index.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_listCacheDelete.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_listCacheDelete.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); -var isArray = Array.isArray; -var keyList = Object.keys; -var hasProp = Object.prototype.hasOwnProperty; +/** Used for built-in method references. */ +var arrayProto = Array.prototype; -module.exports = function equal(a, b) { - if (a === b) return true; +/** Built-in value references. */ +var splice = arrayProto.splice; - var arrA = isArray(a) - , arrB = isArray(b) - , i - , length - , key; +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - if (arrA && arrB) { - length = a.length; - if (length != b.length) return false; - for (i = 0; i < length; i++) - if (!equal(a[i], b[i])) return false; - return true; + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); } + --this.size; + return true; +} - if (arrA != arrB) return false; +module.exports = listCacheDelete; - var dateA = a instanceof Date - , dateB = b instanceof Date; - if (dateA != dateB) return false; - if (dateA && dateB) return a.getTime() == b.getTime(); - var regexpA = a instanceof RegExp - , regexpB = b instanceof RegExp; - if (regexpA != regexpB) return false; - if (regexpA && regexpB) return a.toString() == b.toString(); +/***/ }), - if (a instanceof Object && b instanceof Object) { - var keys = keyList(a); - length = keys.length; +/***/ "./node_modules/lodash/_listCacheGet.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheGet.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (length !== keyList(b).length) - return false; +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); - for (i = 0; i < length; i++) - if (!hasProp.call(b, keys[i])) return false; +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - for (i = 0; i < length; i++) { - key = keys[i]; - if (!equal(a[key], b[key])) return false; - } + return index < 0 ? undefined : data[index][1]; +} - return true; - } +module.exports = listCacheGet; - return false; -}; + +/***/ }), + +/***/ "./node_modules/lodash/_listCacheHas.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheHas.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; /***/ }), -/***/ "./node_modules/fast-json-stable-stringify/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/fast-json-stable-stringify/index.js ***! - \**********************************************************/ +/***/ "./node_modules/lodash/_listCacheSet.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheSet.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); -module.exports = function (data, opts) { - if (!opts) opts = {}; - if (typeof opts === 'function') opts = { cmp: opts }; - var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} - var cmp = opts.cmp && (function (f) { - return function (node) { - return function (a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); +module.exports = listCacheSet; - var seen = []; - return (function stringify (node) { - if (node && node.toJSON && typeof node.toJSON === 'function') { - node = node.toJSON(); - } - if (node === undefined) return; - if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; - if (typeof node !== 'object') return JSON.stringify(node); +/***/ }), - var i, out; - if (Array.isArray(node)) { - out = '['; - for (i = 0; i < node.length; i++) { - if (i) out += ','; - out += stringify(node[i]) || 'null'; - } - return out + ']'; - } +/***/ "./node_modules/lodash/_mapToArray.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_mapToArray.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - if (node === null) return 'null'; +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} - if (seen.indexOf(node) !== -1) { - if (cycles) return JSON.stringify('__cycle__'); - throw new TypeError('Converting circular structure to JSON'); - } +module.exports = stubArray; - var seenIndex = seen.push(node) - 1; - var keys = Object.keys(node).sort(cmp && cmp(node)); - out = ''; - for (i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = stringify(node[key]); - if (!value) continue; - if (out) out += ','; - out += JSON.stringify(key) + ':' + value; - } - seen.splice(seenIndex, 1); - return '{' + out + '}'; - })(data); -}; +/***/ }), + +/***/ "./node_modules/lodash/_overArg.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_overArg.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; /***/ }), -/***/ "./node_modules/https-browserify/index.js": -/*!************************************************!*\ - !*** ./node_modules/https-browserify/index.js ***! - \************************************************/ +/***/ "./node_modules/lodash/_overRest.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_overRest.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var http = __webpack_require__(/*! http */ "./node_modules/stream-http/index.js") -var url = __webpack_require__(/*! url */ "./node_modules/url/url.js") - -var https = module.exports +var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js"); -for (var key in http) { - if (http.hasOwnProperty(key)) https[key] = http[key] -} +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; -https.request = function (params, cb) { - params = validateParams(params) - return http.request.call(this, params, cb) -} +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); -https.get = function (params, cb) { - params = validateParams(params) - return http.get.call(this, params, cb) + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; } -function validateParams (params) { - if (typeof params === 'string') { - params = url.parse(params) - } - if (!params.protocol) { - params.protocol = 'https:' - } - if (params.protocol !== 'https:') { - throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"') - } - return params -} +module.exports = overRest; /***/ }), -/***/ "./node_modules/ieee754/index.js": -/*!***************************************!*\ - !*** ./node_modules/ieee754/index.js ***! - \***************************************/ +/***/ "./node_modules/lodash/_root.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/_root.js ***! + \**************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] +var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js"); - i += d +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} +module.exports = root; - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 +/***/ }), - value = Math.abs(value) +/***/ "./node_modules/lodash/_safeGet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_safeGet.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } +/** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + return key == '__proto__' + ? undefined + : object[key]; +} - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } +module.exports = safeGet; - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} +/***/ }), - buffer[offset + i - d] |= s * 128 +/***/ "./node_modules/lodash/_setToPairs.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_setToPairs.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; } +module.exports = stubArray; + /***/ }), -/***/ "./node_modules/inherits/inherits_browser.js": -/*!***************************************************!*\ - !*** ./node_modules/inherits/inherits_browser.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_setToString.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_setToString.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; } +module.exports = identity; + /***/ }), -/***/ "./node_modules/ipfs-mini/lib/index.js": -/*!*********************************************!*\ - !*** ./node_modules/ipfs-mini/lib/index.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/assign.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/assign.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - +var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), + copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), + isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); -var XMLHttpRequest = __webpack_require__(/*! ./lib/XMLHttpRequest */ "./node_modules/ipfs-mini/lib/lib/XMLHttpRequest-browser.js"); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -module.exports = IPFS; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The constructor object - * @param {Object} `provider` the provider object - * @return {Object} `ipfs` returns an IPFS instance - * @throws if the `new` flag is not used + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ -function IPFS(provider) { - if (!(this instanceof IPFS)) { - throw new Error('[ipfs-mini] IPFS instance must be instantiated with "new" flag (e.g. var ipfs = new IPFS("http://localhost:8545");).'); +var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } } +}); - var self = this; - self.setProvider(provider || {}); -} +module.exports = assign; -/** - * Sets the provider of the IPFS instance - * @param {Object} `provider` the provider object - * @throws if the provider object is not an object - */ -IPFS.prototype.setProvider = function setProvider(provider) { - if (typeof provider !== 'object') { - throw new Error('[ifpsjs] provider must be type Object, got \'' + typeof provider + '\'.'); - } - var self = this; - var data = self.provider = Object.assign({ - host: '127.0.0.1', - pinning: true, - port: '5001', - protocol: 'http', - base: '/api/v0' }, provider || {}); - self.requestBase = String(data.protocol + '://' + data.host + ':' + data.port + data.base); -}; + +/***/ }), + +/***/ "./node_modules/lodash/clone.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/clone.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js"); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; /** - * Sends an async data packet to an IPFS node - * @param {Object} `opts` the options object - * @param {Function} `cb` the provider callback - * @callback returns an error if any, or the data from IPFS + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true */ -IPFS.prototype.sendAsync = function sendAsync(opts, cb) { - var self = this; - var request = new XMLHttpRequest(); // eslint-disable-line - var options = opts || {}; - var callback = cb || function emptyCallback() {}; +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} - request.onreadystatechange = function () { - if (request.readyState === 4 && request.timeout !== 1) { - if (request.status !== 200) { - callback(new Error('[ipfs-mini] status ' + request.status + ': ' + request.responseText), null); - } else { - try { - callback(null, options.jsonParse ? JSON.parse(request.responseText) : request.responseText); - } catch (jsonError) { - callback(new Error('[ipfs-mini] while parsing data: \'' + String(request.responseText) + '\', error: ' + String(jsonError) + ' with provider: \'' + self.requestBase + '\'', null)); - } - } - } - }; +module.exports = clone; - var pinningURI = self.provider.pinning && opts.uri === '/add' ? '?pin=true' : ''; - if (options.payload) { - request.open('POST', '' + self.requestBase + opts.uri + pinningURI); - } else { - request.open('GET', '' + self.requestBase + opts.uri + pinningURI); - } +/***/ }), - if (options.accept) { - request.setRequestHeader('accept', options.accept); - } +/***/ "./node_modules/lodash/defaults.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/defaults.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (options.payload && options.boundary) { - request.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + options.boundary); - request.send(options.payload); - } else { - request.send(); - } -}; +var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), + eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), + isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * creates a boundary that isn't part of the payload + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ -function createBoundary(data) { - while (true) { - var boundary = '----IPFSMini' + Math.random() * 100000 + '.' + Math.random() * 100000; - if (data.indexOf(boundary) === -1) { - return boundary; +var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } } } -} -/** - * Add an string or buffer to IPFS - * @param {String|Buffer} `input` a single string or buffer - * @param {Function} `callback` a callback, with (error, ipfsHash String) - * @callback {String} `ipfsHash` returns an IPFS hash string - */ -IPFS.prototype.add = function addData(input, callback) { - var data = typeof input === 'object' && input.isBuffer ? input.toString('binary') : input; - var boundary = createBoundary(data); - var payload = '--' + boundary + '\r\nContent-Disposition: form-data; name="path"\r\nContent-Type: application/octet-stream\r\n\r\n' + data + '\r\n--' + boundary + '--'; + return object; +}); - var addCallback = function addCallback(err, result) { - return callback(err, !err ? result.Hash : null); - }; - this.sendAsync({ - jsonParse: true, - accept: 'application/json', - uri: '/add', - payload: payload, boundary: boundary - }, addCallback); -}; +module.exports = defaults; -/** - * Add an JSON object to IPFS - * @param {Object} `jsonData` a single JSON object - * @param {Function} `callback` a callback, with (error, ipfsHash String) - * @callback {String} `ipfsHash` returns an IPFS hash string - */ -IPFS.prototype.addJSON = function addJson(jsonData, callback) { - var self = this; - self.add(JSON.stringify(jsonData), callback); -}; -/** - * Get an object stat `/object/stat` for an IPFS hash - * @param {String} `ipfsHash` a single IPFS hash String - * @param {Function} `callback` a callback, with (error, stats Object) - * @callback {Object} `stats` returns the stats object for that IPFS hash - */ -IPFS.prototype.stat = function cat(ipfsHash, callback) { - var self = this; - self.sendAsync({ jsonParse: true, uri: '/object/stat/' + ipfsHash }, callback); -}; +/***/ }), -/** - * Get the data from an IPFS hash - * @param {String} `ipfsHash` a single IPFS hash String - * @param {Function} `callback` a callback, with (error, stats Object) - * @callback {String} `data` returns the output data - */ -IPFS.prototype.cat = function cat(ipfsHash, callback) { - var self = this; - self.sendAsync({ uri: '/cat/' + ipfsHash }, callback); -}; +/***/ "./node_modules/lodash/defaultsDeep.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/defaultsDeep.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js"), + baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), + customDefaultsMerge = __webpack_require__(/*! ./_customDefaultsMerge */ "./node_modules/lodash/_customDefaultsMerge.js"), + mergeWith = __webpack_require__(/*! ./mergeWith */ "./node_modules/lodash/mergeWith.js"); /** - * Get the data from an IPFS hash that is a JSON object - * @param {String} `ipfsHash` a single IPFS hash String - * @param {Function} `callback` a callback, with (error, json Object) - * @callback {Object} `data` returns the output data JSON object + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } */ -IPFS.prototype.catJSON = function cat(ipfsHash, callback) { - var self = this; - self.cat(ipfsHash, function (jsonError, jsonResult) { - // eslint-disable-line - if (jsonError) { - return callback(jsonError, null); - } +var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); +}); + +module.exports = defaultsDeep; - try { - callback(null, JSON.parse(jsonResult)); - } catch (jsonParseError) { - callback(jsonParseError, null); - } - }); -}; /***/ }), -/***/ "./node_modules/ipfs-mini/lib/lib/XMLHttpRequest-browser.js": -/*!******************************************************************!*\ - !*** ./node_modules/ipfs-mini/lib/lib/XMLHttpRequest-browser.js ***! - \******************************************************************/ +/***/ "./node_modules/lodash/eq.js": +/*!***********************************!*\ + !*** ./node_modules/lodash/eq.js ***! + \***********************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +/***/ (function(module, exports) { +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} -var XMLHttpRequest = window.XMLHttpRequest; // eslint-disable-line +module.exports = eq; -module.exports = XMLHttpRequest; /***/ }), -/***/ "./node_modules/is-hex-prefixed/src/index.js": -/*!***************************************************!*\ - !*** ./node_modules/is-hex-prefixed/src/index.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/filter.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/filter.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * Returns a `Boolean` on whether or not the a `String` starts with '0x' - * @param {String} str the string input value - * @return {Boolean} a boolean if it is or is not hex prefixed - * @throws if the str input is not a string + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. */ -module.exports = function isHexPrefixed(str) { - if (typeof str !== 'string') { - throw new Error("[is-hex-prefixed] value must be type 'string', is currently type " + (typeof str) + ", while checking isHexPrefixed."); +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } } - - return str.slice(0, 2) === '0x'; + return result; } - -/***/ }), - -/***/ "./node_modules/isarray/index.js": -/*!***************************************!*\ - !*** ./node_modules/isarray/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; +module.exports = arrayFilter; /***/ }), -/***/ "./node_modules/js-sha3/src/sha3.js": -/*!******************************************!*\ - !*** ./node_modules/js-sha3/src/sha3.js ***! - \******************************************/ +/***/ "./node_modules/lodash/flatMap.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/flatMap.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(process, global) {/** - * [js-sha3]{@link https://github.com/emn178/js-sha3} - * - * @version 0.5.5 - * @author Chen, Yi-Cyuan [emn178@gmail.com] - * @copyright Chen, Yi-Cyuan 2015-2016 - * @license MIT - */ -(function (root) { - 'use strict'; - - var NODE_JS = typeof process == 'object' && process.versions && process.versions.node; - if (NODE_JS) { - root = global; - } - var COMMON_JS = !root.JS_SHA3_TEST && typeof module == 'object' && module.exports; - var HEX_CHARS = '0123456789abcdef'.split(''); - var SHAKE_PADDING = [31, 7936, 2031616, 520093696]; - var KECCAK_PADDING = [1, 256, 65536, 16777216]; - var PADDING = [6, 1536, 393216, 100663296]; - var SHIFT = [0, 8, 16, 24]; - var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, - 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, - 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, - 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, - 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]; - var BITS = [224, 256, 384, 512]; - var SHAKE_BITS = [128, 256]; - var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array']; - - var createOutputMethod = function (bits, padding, outputType) { - return function (message) { - return new Keccak(bits, padding, bits).update(message)[outputType](); - } - }; - - var createShakeOutputMethod = function (bits, padding, outputType) { - return function (message, outputBits) { - return new Keccak(bits, padding, outputBits).update(message)[outputType](); - } - }; - - var createMethod = function (bits, padding) { - var method = createOutputMethod(bits, padding, 'hex'); - method.create = function () { - return new Keccak(bits, padding, bits); - }; - method.update = function (message) { - return method.create().update(message); - }; - for (var i = 0;i < OUTPUT_TYPES.length;++i) { - var type = OUTPUT_TYPES[i]; - method[type] = createOutputMethod(bits, padding, type); - } - return method; - }; - - var createShakeMethod = function (bits, padding) { - var method = createShakeOutputMethod(bits, padding, 'hex'); - method.create = function (outputBits) { - return new Keccak(bits, padding, outputBits); - }; - method.update = function (message, outputBits) { - return method.create(outputBits).update(message); - }; - for (var i = 0;i < OUTPUT_TYPES.length;++i) { - var type = OUTPUT_TYPES[i]; - method[type] = createShakeOutputMethod(bits, padding, type); - } - return method; - }; - - var algorithms = [ - {name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod}, - {name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod}, - {name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod} - ]; - - var methods = {}; - - for (var i = 0;i < algorithms.length;++i) { - var algorithm = algorithms[i]; - var bits = algorithm.bits; - for (var j = 0;j < bits.length;++j) { - methods[algorithm.name +'_' + bits[j]] = algorithm.createMethod(bits[j], algorithm.padding); - } - } - - function Keccak(bits, padding, outputBits) { - this.blocks = []; - this.s = []; - this.padding = padding; - this.outputBits = outputBits; - this.reset = true; - this.block = 0; - this.start = 0; - this.blockCount = (1600 - (bits << 1)) >> 5; - this.byteCount = this.blockCount << 2; - this.outputBlocks = outputBits >> 5; - this.extraBytes = (outputBits & 31) >> 3; - - for (var i = 0;i < 50;++i) { - this.s[i] = 0; - } - }; - - Keccak.prototype.update = function (message) { - var notString = typeof message != 'string'; - if (notString && message.constructor == root.ArrayBuffer) { - message = new Uint8Array(message); - } - var length = message.length, blocks = this.blocks, byteCount = this.byteCount, - blockCount = this.blockCount, index = 0, s = this.s, i, code; - - while (index < length) { - if (this.reset) { - this.reset = false; - blocks[0] = this.block; - for (i = 1;i < blockCount + 1;++i) { - blocks[i] = 0; - } - } - if (notString) { - for (i = this.start;index < length && i < byteCount;++index) { - blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; - } - } else { - for (i = this.start;index < length && i < byteCount;++index) { - code = message.charCodeAt(index); - if (code < 0x80) { - blocks[i >> 2] |= code << SHIFT[i++ & 3]; - } else if (code < 0x800) { - blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } else if (code < 0xd800 || code >= 0xe000) { - blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } else { - code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); - blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } - } - } - this.lastByteIndex = i; - if (i >= byteCount) { - this.start = i - byteCount; - this.block = blocks[blockCount]; - for (i = 0;i < blockCount;++i) { - s[i] ^= blocks[i]; - } - f(s); - this.reset = true; - } else { - this.start = i; - } - } - return this; - }; - - Keccak.prototype.finalize = function () { - var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s; - blocks[i >> 2] |= this.padding[i & 3]; - if (this.lastByteIndex == this.byteCount) { - blocks[0] = blocks[blockCount]; - for (i = 1;i < blockCount + 1;++i) { - blocks[i] = 0; - } - } - blocks[blockCount - 1] |= 0x80000000; - for (i = 0;i < blockCount;++i) { - s[i] ^= blocks[i]; - } - f(s); - }; - - Keccak.prototype.toString = Keccak.prototype.hex = function () { - this.finalize(); - - var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, - extraBytes = this.extraBytes, i = 0, j = 0; - var hex = '', block; - while (j < outputBlocks) { - for (i = 0;i < blockCount && j < outputBlocks;++i, ++j) { - block = s[i]; - hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] + - HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] + - HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] + - HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F]; - } - if (j % blockCount == 0) { - f(s); - i = 0; - } - } - if (extraBytes) { - block = s[i]; - if (extraBytes > 0) { - hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F]; - } - if (extraBytes > 1) { - hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F]; - } - if (extraBytes > 2) { - hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F]; - } - } - return hex; - }; - - Keccak.prototype.arrayBuffer = function () { - this.finalize(); - - var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, - extraBytes = this.extraBytes, i = 0, j = 0; - var bytes = this.outputBits >> 3; - var buffer; - if (extraBytes) { - buffer = new ArrayBuffer((outputBlocks + 1) << 2); - } else { - buffer = new ArrayBuffer(bytes); - } - var array = new Uint32Array(buffer); - while (j < outputBlocks) { - for (i = 0;i < blockCount && j < outputBlocks;++i, ++j) { - array[j] = s[i]; - } - if (j % blockCount == 0) { - f(s); - } - } - if (extraBytes) { - array[i] = s[i]; - buffer = buffer.slice(0, bytes); - } - return buffer; - }; - - Keccak.prototype.buffer = Keccak.prototype.arrayBuffer; - - Keccak.prototype.digest = Keccak.prototype.array = function () { - this.finalize(); - - var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, - extraBytes = this.extraBytes, i = 0, j = 0; - var array = [], offset, block; - while (j < outputBlocks) { - for (i = 0;i < blockCount && j < outputBlocks;++i, ++j) { - offset = j << 2; - block = s[i]; - array[offset] = block & 0xFF; - array[offset + 1] = (block >> 8) & 0xFF; - array[offset + 2] = (block >> 16) & 0xFF; - array[offset + 3] = (block >> 24) & 0xFF; - } - if (j % blockCount == 0) { - f(s); - } - } - if (extraBytes) { - offset = j << 2; - block = s[i]; - if (extraBytes > 0) { - array[offset] = block & 0xFF; - } - if (extraBytes > 1) { - array[offset + 1] = (block >> 8) & 0xFF; - } - if (extraBytes > 2) { - array[offset + 2] = (block >> 16) & 0xFF; - } - } - return array; - }; - - var f = function (s) { - var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, - b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, - b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, - b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; - for (n = 0;n < 48;n += 2) { - c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; - c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; - c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; - c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; - c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; - c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; - c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; - c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; - c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; - c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; - - h = c8 ^ ((c2 << 1) | (c3 >>> 31)); - l = c9 ^ ((c3 << 1) | (c2 >>> 31)); - s[0] ^= h; - s[1] ^= l; - s[10] ^= h; - s[11] ^= l; - s[20] ^= h; - s[21] ^= l; - s[30] ^= h; - s[31] ^= l; - s[40] ^= h; - s[41] ^= l; - h = c0 ^ ((c4 << 1) | (c5 >>> 31)); - l = c1 ^ ((c5 << 1) | (c4 >>> 31)); - s[2] ^= h; - s[3] ^= l; - s[12] ^= h; - s[13] ^= l; - s[22] ^= h; - s[23] ^= l; - s[32] ^= h; - s[33] ^= l; - s[42] ^= h; - s[43] ^= l; - h = c2 ^ ((c6 << 1) | (c7 >>> 31)); - l = c3 ^ ((c7 << 1) | (c6 >>> 31)); - s[4] ^= h; - s[5] ^= l; - s[14] ^= h; - s[15] ^= l; - s[24] ^= h; - s[25] ^= l; - s[34] ^= h; - s[35] ^= l; - s[44] ^= h; - s[45] ^= l; - h = c4 ^ ((c8 << 1) | (c9 >>> 31)); - l = c5 ^ ((c9 << 1) | (c8 >>> 31)); - s[6] ^= h; - s[7] ^= l; - s[16] ^= h; - s[17] ^= l; - s[26] ^= h; - s[27] ^= l; - s[36] ^= h; - s[37] ^= l; - s[46] ^= h; - s[47] ^= l; - h = c6 ^ ((c0 << 1) | (c1 >>> 31)); - l = c7 ^ ((c1 << 1) | (c0 >>> 31)); - s[8] ^= h; - s[9] ^= l; - s[18] ^= h; - s[19] ^= l; - s[28] ^= h; - s[29] ^= l; - s[38] ^= h; - s[39] ^= l; - s[48] ^= h; - s[49] ^= l; - - b0 = s[0]; - b1 = s[1]; - b32 = (s[11] << 4) | (s[10] >>> 28); - b33 = (s[10] << 4) | (s[11] >>> 28); - b14 = (s[20] << 3) | (s[21] >>> 29); - b15 = (s[21] << 3) | (s[20] >>> 29); - b46 = (s[31] << 9) | (s[30] >>> 23); - b47 = (s[30] << 9) | (s[31] >>> 23); - b28 = (s[40] << 18) | (s[41] >>> 14); - b29 = (s[41] << 18) | (s[40] >>> 14); - b20 = (s[2] << 1) | (s[3] >>> 31); - b21 = (s[3] << 1) | (s[2] >>> 31); - b2 = (s[13] << 12) | (s[12] >>> 20); - b3 = (s[12] << 12) | (s[13] >>> 20); - b34 = (s[22] << 10) | (s[23] >>> 22); - b35 = (s[23] << 10) | (s[22] >>> 22); - b16 = (s[33] << 13) | (s[32] >>> 19); - b17 = (s[32] << 13) | (s[33] >>> 19); - b48 = (s[42] << 2) | (s[43] >>> 30); - b49 = (s[43] << 2) | (s[42] >>> 30); - b40 = (s[5] << 30) | (s[4] >>> 2); - b41 = (s[4] << 30) | (s[5] >>> 2); - b22 = (s[14] << 6) | (s[15] >>> 26); - b23 = (s[15] << 6) | (s[14] >>> 26); - b4 = (s[25] << 11) | (s[24] >>> 21); - b5 = (s[24] << 11) | (s[25] >>> 21); - b36 = (s[34] << 15) | (s[35] >>> 17); - b37 = (s[35] << 15) | (s[34] >>> 17); - b18 = (s[45] << 29) | (s[44] >>> 3); - b19 = (s[44] << 29) | (s[45] >>> 3); - b10 = (s[6] << 28) | (s[7] >>> 4); - b11 = (s[7] << 28) | (s[6] >>> 4); - b42 = (s[17] << 23) | (s[16] >>> 9); - b43 = (s[16] << 23) | (s[17] >>> 9); - b24 = (s[26] << 25) | (s[27] >>> 7); - b25 = (s[27] << 25) | (s[26] >>> 7); - b6 = (s[36] << 21) | (s[37] >>> 11); - b7 = (s[37] << 21) | (s[36] >>> 11); - b38 = (s[47] << 24) | (s[46] >>> 8); - b39 = (s[46] << 24) | (s[47] >>> 8); - b30 = (s[8] << 27) | (s[9] >>> 5); - b31 = (s[9] << 27) | (s[8] >>> 5); - b12 = (s[18] << 20) | (s[19] >>> 12); - b13 = (s[19] << 20) | (s[18] >>> 12); - b44 = (s[29] << 7) | (s[28] >>> 25); - b45 = (s[28] << 7) | (s[29] >>> 25); - b26 = (s[38] << 8) | (s[39] >>> 24); - b27 = (s[39] << 8) | (s[38] >>> 24); - b8 = (s[48] << 14) | (s[49] >>> 18); - b9 = (s[49] << 14) | (s[48] >>> 18); - - s[0] = b0 ^ (~b2 & b4); - s[1] = b1 ^ (~b3 & b5); - s[10] = b10 ^ (~b12 & b14); - s[11] = b11 ^ (~b13 & b15); - s[20] = b20 ^ (~b22 & b24); - s[21] = b21 ^ (~b23 & b25); - s[30] = b30 ^ (~b32 & b34); - s[31] = b31 ^ (~b33 & b35); - s[40] = b40 ^ (~b42 & b44); - s[41] = b41 ^ (~b43 & b45); - s[2] = b2 ^ (~b4 & b6); - s[3] = b3 ^ (~b5 & b7); - s[12] = b12 ^ (~b14 & b16); - s[13] = b13 ^ (~b15 & b17); - s[22] = b22 ^ (~b24 & b26); - s[23] = b23 ^ (~b25 & b27); - s[32] = b32 ^ (~b34 & b36); - s[33] = b33 ^ (~b35 & b37); - s[42] = b42 ^ (~b44 & b46); - s[43] = b43 ^ (~b45 & b47); - s[4] = b4 ^ (~b6 & b8); - s[5] = b5 ^ (~b7 & b9); - s[14] = b14 ^ (~b16 & b18); - s[15] = b15 ^ (~b17 & b19); - s[24] = b24 ^ (~b26 & b28); - s[25] = b25 ^ (~b27 & b29); - s[34] = b34 ^ (~b36 & b38); - s[35] = b35 ^ (~b37 & b39); - s[44] = b44 ^ (~b46 & b48); - s[45] = b45 ^ (~b47 & b49); - s[6] = b6 ^ (~b8 & b0); - s[7] = b7 ^ (~b9 & b1); - s[16] = b16 ^ (~b18 & b10); - s[17] = b17 ^ (~b19 & b11); - s[26] = b26 ^ (~b28 & b20); - s[27] = b27 ^ (~b29 & b21); - s[36] = b36 ^ (~b38 & b30); - s[37] = b37 ^ (~b39 & b31); - s[46] = b46 ^ (~b48 & b40); - s[47] = b47 ^ (~b49 & b41); - s[8] = b8 ^ (~b0 & b2); - s[9] = b9 ^ (~b1 & b3); - s[18] = b18 ^ (~b10 & b12); - s[19] = b19 ^ (~b11 & b13); - s[28] = b28 ^ (~b20 & b22); - s[29] = b29 ^ (~b21 & b23); - s[38] = b38 ^ (~b30 & b32); - s[39] = b39 ^ (~b31 & b33); - s[48] = b48 ^ (~b40 & b42); - s[49] = b49 ^ (~b41 & b43); - - s[0] ^= RC[n]; - s[1] ^= RC[n + 1]; - } - } - - if (COMMON_JS) { - module.exports = methods; - } else if (root) { - for (var key in methods) { - root[key] = methods[key]; - } - } -}(this)); +var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"), + map = __webpack_require__(/*! ./map */ "./node_modules/lodash/map.js"); + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); +} + +module.exports = flatMap; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), -/***/ "./node_modules/json-schema-traverse/index.js": -/*!****************************************************!*\ - !*** ./node_modules/json-schema-traverse/index.js ***! - \****************************************************/ +/***/ "./node_modules/lodash/forOwn.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/forOwn.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), + castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"); +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} -var traverse = module.exports = function (schema, opts, cb) { - if (typeof opts == 'function') { - cb = opts; - opts = {}; +module.exports = forOwn; + + +/***/ }), + +/***/ "./node_modules/lodash/fromPairs.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/fromPairs.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; } - _traverse(opts, cb, schema, '', schema); -}; + return result; +} +module.exports = fromPairs; -traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true -}; -traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true -}; +/***/ }), -traverse.propsKeywords = { - definitions: true, - properties: true, - patternProperties: true, - dependencies: true -}; +/***/ "./node_modules/lodash/functionsIn.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/functionsIn.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -traverse.skipKeywords = { - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true -}; +var baseFunctions = __webpack_require__(/*! ./_baseFunctions */ "./node_modules/lodash/_baseFunctions.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); +/** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); +} -function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i true + */ +function identity(value) { + return value; +} + +module.exports = identity; + + +/***/ }), + +/***/ "./node_modules/lodash/isArguments.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/isArguments.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = stubFalse; + + +/***/ }), + +/***/ "./node_modules/lodash/isArray.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/isArray.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; + + +/***/ }), + +/***/ "./node_modules/lodash/isArrayLike.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/isArrayLike.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), + isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; + + +/***/ }), + +/***/ "./node_modules/lodash/isArrayLikeObject.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/isArrayLikeObject.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +module.exports = isArrayLikeObject; + + +/***/ }), + +/***/ "./node_modules/lodash/isBoolean.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/isBoolean.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} + +module.exports = isBoolean; + + +/***/ }), + +/***/ "./node_modules/lodash/isBuffer.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isBuffer.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = stubFalse; + + +/***/ }), + +/***/ "./node_modules/lodash/isFunction.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/isFunction.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } - -function escapeJsonPtr(str) { - return str.replace(/~/g, '~0').replace(/\//g, '~1'); -} +module.exports = isFunction; /***/ }), -/***/ "./node_modules/lodash/_Stack.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/_Stack.js ***! - \***************************************/ +/***/ "./node_modules/lodash/isLength.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isLength.js ***! + \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "./node_modules/lodash/_listCacheClear.js"), - listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "./node_modules/lodash/_listCacheDelete.js"), - listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "./node_modules/lodash/_listCacheGet.js"), - listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "./node_modules/lodash/_listCacheHas.js"), - listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "./node_modules/lodash/_listCacheSet.js"); +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; /** - * Creates an list cache object. + * Checks if `value` is a valid array-like length. * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -module.exports = ListCache; +module.exports = isLength; /***/ }), -/***/ "./node_modules/lodash/_Symbol.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/_Symbol.js ***! - \****************************************/ +/***/ "./node_modules/lodash/isMap.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/isMap.js ***! + \**************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); +/***/ (function(module, exports) { -/** Built-in value references. */ -var Symbol = root.Symbol; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} -module.exports = Symbol; +module.exports = stubFalse; /***/ }), -/***/ "./node_modules/lodash/_Uint8Array.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_Uint8Array.js ***! - \********************************************/ +/***/ "./node_modules/lodash/isNumber.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isNumber.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); - -/** Built-in value references. */ -var Uint8Array = root.Uint8Array; - -module.exports = Uint8Array; - - -/***/ }), +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); -/***/ "./node_modules/lodash/_apply.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/_apply.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/** `Object#toString` result references. */ +var numberTag = '[object Number]'; /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. + * Checks if `value` is classified as a `Number` primitive or object. * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); +function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); } -module.exports = apply; +module.exports = isNumber; /***/ }), -/***/ "./node_modules/lodash/_arrayEach.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_arrayEach.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/isObject.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isObject.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); } -module.exports = arrayEach; +module.exports = isObject; /***/ }), -/***/ "./node_modules/lodash/_arrayFilter.js": +/***/ "./node_modules/lodash/isObjectLike.js": /*!*********************************************!*\ - !*** ./node_modules/lodash/_arrayFilter.js ***! + !*** ./node_modules/lodash/isObjectLike.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; +function isObjectLike(value) { + return value != null && typeof value == 'object'; } -module.exports = arrayFilter; +module.exports = isObjectLike; /***/ }), -/***/ "./node_modules/lodash/_arrayMap.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_arrayMap.js ***! - \******************************************/ +/***/ "./node_modules/lodash/isPlainObject.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/isPlainObject.js ***! + \**********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; -module.exports = arrayMap; +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; -/***/ }), +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -/***/ "./node_modules/lodash/_arrayPush.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_arrayPush.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); /** - * Appends the elements of `values` to `array`. + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; } - return array; + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } -module.exports = arrayPush; +module.exports = isPlainObject; /***/ }), -/***/ "./node_modules/lodash/_assignMergeValue.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/_assignMergeValue.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/isSet.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/isSet.js ***! + \**************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), - eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); +/***/ (function(module, exports) { /** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. + * This method returns `false`. * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } +function stubFalse() { + return false; } -module.exports = assignMergeValue; +module.exports = stubFalse; /***/ }), -/***/ "./node_modules/lodash/_assignValue.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_assignValue.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/isString.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isString.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), - eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/** `Object#toString` result references. */ +var stringTag = '[object String]'; /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. + * Checks if `value` is classified as a `String` primitive or object. * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } -module.exports = assignValue; +module.exports = isString; /***/ }), -/***/ "./node_modules/lodash/_assocIndexOf.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_assocIndexOf.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/isTypedArray.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/isTypedArray.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); +/***/ (function(module, exports) { /** - * Gets the index at which the `key` is found in `array` of key-value pairs. + * This method returns `false`. * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; +function stubFalse() { + return false; } -module.exports = assocIndexOf; +module.exports = stubFalse; /***/ }), -/***/ "./node_modules/lodash/_baseAssign.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseAssign.js ***! - \********************************************/ +/***/ "./node_modules/lodash/keys.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/keys.js ***! + \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); +var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); -module.exports = baseAssign; +module.exports = nativeKeys; /***/ }), -/***/ "./node_modules/lodash/_baseAssignIn.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_baseAssignIn.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/keysIn.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/keysIn.js ***! + \***************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); +/***/ (function(module, exports) { /** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ -function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; } -module.exports = baseAssignIn; +module.exports = nativeKeysIn; /***/ }), -/***/ "./node_modules/lodash/_baseAssignValue.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_baseAssignValue.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/map.js": +/*!************************************!*\ + !*** ./node_modules/lodash/map.js ***! + \************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"); +/***/ (function(module, exports) { /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. * * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); } + return result; } -module.exports = baseAssignValue; +module.exports = arrayMap; /***/ }), -/***/ "./node_modules/lodash/_baseClone.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseClone.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/mergeWith.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/mergeWith.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), - arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), - assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), - baseAssign = __webpack_require__(/*! ./_baseAssign */ "./node_modules/lodash/_baseAssign.js"), - baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ "./node_modules/lodash/_baseAssignIn.js"), - cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), - copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), - copySymbols = __webpack_require__(/*! ./_copySymbols */ "./node_modules/lodash/_copySymbols.js"), - copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ "./node_modules/lodash/_copySymbolsIn.js"), - getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js"), - getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ "./node_modules/lodash/_getAllKeysIn.js"), - getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), - initCloneArray = __webpack_require__(/*! ./_initCloneArray */ "./node_modules/lodash/_initCloneArray.js"), - initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ "./node_modules/lodash/_initCloneByTag.js"), - initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), - isMap = __webpack_require__(/*! ./isMap */ "./node_modules/lodash/isMap.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - isSet = __webpack_require__(/*! ./isSet */ "./node_modules/lodash/isSet.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; +var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"), + createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js"); /** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); +var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); +}); - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); +module.exports = mergeWith; - return result; - } - if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); +/***/ }), - return result; - } +/***/ "./node_modules/lodash/toPairs.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/toPairs.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); +var createToPairs = __webpack_require__(/*! ./_createToPairs */ "./node_modules/lodash/_createToPairs.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} +/** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ +var toPairs = createToPairs(keys); -module.exports = baseClone; +module.exports = toPairs; /***/ }), -/***/ "./node_modules/lodash/_baseCreate.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseCreate.js ***! - \********************************************/ +/***/ "./node_modules/lodash/toPlainObject.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/toPlainObject.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); - -/** Built-in value references. */ -var objectCreate = Object.create; +var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} -module.exports = baseCreate; +module.exports = toPlainObject; /***/ }), -/***/ "./node_modules/lodash/_baseFlatten.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_baseFlatten.js ***! - \*********************************************/ +/***/ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js": +/*!**************************************************************************!*\ + !*** ./node_modules/node-libs-browser/node_modules/punycode/punycode.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), - isFlattenable = __webpack_require__(/*! ./_isFlattenable */ "./node_modules/lodash/_isFlattenable.js"); +/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */ +;(function(root) { -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } - predicate || (predicate = isFlattenable); - result || (result = []); + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 -module.exports = baseFlatten; + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, -/***/ }), + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, -/***/ "./node_modules/lodash/_baseFor.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_baseFor.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } -var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "./node_modules/lodash/_createBaseFor.js"); + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } -module.exports = baseFor; + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } -/***/ }), + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } -/***/ "./node_modules/lodash/_baseForOwn.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseForOwn.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } -var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; -module.exports = baseForOwn; + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } -/***/ }), + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } -/***/ "./node_modules/lodash/_baseFunctions.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_baseFunctions.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. -var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"), - isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"); + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { -/** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ -function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); -} + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { -module.exports = baseFunctions; + if (index >= inputLength) { + error('invalid-input'); + } + digit = basicToDigit(input.charCodeAt(index++)); -/***/ }), + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } -/***/ "./node_modules/lodash/_baseGetTag.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseGetTag.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); -/** Used for built-in method references. */ -var objectProto = Object.prototype; + if (digit < t) { + break; + } -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} + w *= baseMinusT; -module.exports = objectToString; + } + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); -/***/ }), + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } -/***/ "./node_modules/lodash/_baseMerge.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseMerge.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + n += floor(i / out); + i %= out; -var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), - assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), - baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), - baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ "./node_modules/lodash/_baseMergeDeep.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"), - safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"); + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - if (isObject(srcValue)) { - stack || (stack = new Stack); - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; + } - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); -} + return ucs2encode(output); + } -module.exports = baseMerge; + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); -/***/ }), + // Cache the length + inputLength = input.length; -/***/ "./node_modules/lodash/_baseMergeDeep.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_baseMergeDeep.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; -var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), - cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), - cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"), - copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), - initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), - isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"), - isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), - isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - isPlainObject = __webpack_require__(/*! ./isPlainObject */ "./node_modules/lodash/isPlainObject.js"), - isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"), - safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"), - toPlainObject = __webpack_require__(/*! ./toPlainObject */ "./node_modules/lodash/toPlainObject.js"); + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); + handledCPCount = basicLength = output.length; - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. - var isCommon = newValue === undefined; + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); + // Main encoding loop: + while (handledCPCount < inputLength) { - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); -} + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } -module.exports = baseMergeDeep; + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + delta += (m - n) * handledCPCountPlusOne; + n = m; -/***/ }), + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; -/***/ "./node_modules/lodash/_baseRest.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_baseRest.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } -var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), - overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"), - setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js"); + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } -module.exports = baseRest; + ++delta; + ++n; + } + return output.join(''); + } -/***/ }), + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } -/***/ "./node_modules/lodash/_baseToPairs.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_baseToPairs.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } -var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"); + /*--------------------------------------------------------------------------*/ -/** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. - */ -function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); -} + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; -module.exports = baseToPairs; + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + true + ) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return punycode; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} + +}(this)); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), -/***/ "./node_modules/lodash/_castFunction.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_castFunction.js ***! - \**********************************************/ +/***/ "./node_modules/number-to-bn/src/index.js": +/*!************************************************!*\ + !*** ./node_modules/number-to-bn/src/index.js ***! + \************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js"); +var stripHexPrefix = __webpack_require__(/*! strip-hex-prefix */ "./node_modules/strip-hex-prefix/src/index.js"); /** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true + * Returns a BN object, converts a number value to a BN + * @param {String|Number|Object} `arg` input a string number, hex string number, number, BigNumber or BN object + * @return {Object} `output` BN object of the number + * @throws if the argument is not an array, object that isn't a bignumber, not a string number or number */ -function identity(value) { - return value; -} +module.exports = function numberToBN(arg) { + if (typeof arg === 'string' || typeof arg === 'number') { + var multiplier = new BN(1); // eslint-disable-line + var formattedString = String(arg).toLowerCase().trim(); + var isHexPrefixed = formattedString.substr(0, 2) === '0x' || formattedString.substr(0, 3) === '-0x'; + var stringArg = stripHexPrefix(formattedString); // eslint-disable-line + if (stringArg.substr(0, 1) === '-') { + stringArg = stripHexPrefix(stringArg.slice(1)); + multiplier = new BN(-1, 10); + } + stringArg = stringArg === '' ? '0' : stringArg; -module.exports = identity; + if ((!stringArg.match(/^-?[0-9]+$/) && stringArg.match(/^[0-9A-Fa-f]+$/)) + || stringArg.match(/^[a-fA-F]+$/) + || (isHexPrefixed === true && stringArg.match(/^[0-9A-Fa-f]+$/))) { + return new BN(stringArg, 16).mul(multiplier); + } + + if ((stringArg.match(/^-?[0-9]+$/) || stringArg === '') && isHexPrefixed === false) { + return new BN(stringArg, 10).mul(multiplier); + } + } else if (typeof arg === 'object' && arg.toString && (!arg.pop && !arg.push)) { + if (arg.toString(10).match(/^-?[0-9]+$/) && (arg.mul || arg.dividedToIntegerBy)) { + return new BN(arg.toString(10), 10); + } + } + + throw new Error('[number-to-bn] while converting number ' + JSON.stringify(arg) + ' to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.'); +} /***/ }), -/***/ "./node_modules/lodash/_cloneArrayBuffer.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/_cloneArrayBuffer.js ***! - \**************************************************/ +/***/ "./node_modules/os-browserify/browser.js": +/*!***********************************************!*\ + !*** ./node_modules/os-browserify/browser.js ***! + \***********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"); +exports.endianness = function () { return 'LE' }; -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} +exports.hostname = function () { + if (typeof location !== 'undefined') { + return location.hostname + } + else return ''; +}; -module.exports = cloneArrayBuffer; +exports.loadavg = function () { return [] }; +exports.uptime = function () { return 0 }; -/***/ }), +exports.freemem = function () { + return Number.MAX_VALUE; +}; -/***/ "./node_modules/lodash/_cloneBuffer.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_cloneBuffer.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +exports.totalmem = function () { + return Number.MAX_VALUE; +}; -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); +exports.cpus = function () { return [] }; -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; +exports.type = function () { return 'Browser' }; -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +exports.release = function () { + if (typeof navigator !== 'undefined') { + return navigator.appVersion; + } + return ''; +}; -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; +exports.networkInterfaces += exports.getNetworkInterfaces += function () { return {} }; -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; +exports.arch = function () { return 'javascript' }; -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); +exports.platform = function () { return 'browser' }; - buffer.copy(result); - return result; -} +exports.tmpdir = exports.tmpDir = function () { + return '/tmp'; +}; -module.exports = cloneBuffer; +exports.EOL = '\n'; + +exports.homedir = function () { + return '/' +}; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/lodash/_cloneTypedArray.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_cloneTypedArray.js ***! - \*************************************************/ +/***/ "./node_modules/process-nextick-args/index.js": +/*!****************************************************!*\ + !*** ./node_modules/process-nextick-args/index.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process } -module.exports = cloneTypedArray; +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js"))) + /***/ }), -/***/ "./node_modules/lodash/_copyArray.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_copyArray.js ***! - \*******************************************/ +/***/ "./node_modules/process/browser.js": +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -module.exports = copyArray; +// shim for using process in browser +var process = module.exports = {}; +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. -/***/ }), +var cachedSetTimeout; +var cachedClearTimeout; -/***/ "./node_modules/lodash/_copyObject.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_copyObject.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } -var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), - baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"); -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } - var index = -1, - length = props.length; - while (++index < length) { - var key = props[index]; - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; - if (newValue === undefined) { - newValue = source[key]; +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; } - if (isNew) { - baseAssignValue(object, key, newValue); + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); } else { - assignValue(object, key, newValue); + queueIndex = -1; + } + if (queue.length) { + drainQueue(); } - } - return object; } -module.exports = copyObject; - - -/***/ }), - -/***/ "./node_modules/lodash/_copySymbols.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_copySymbols.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"); +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); } -module.exports = copySymbols; +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; -/***/ }), +function noop() {} -/***/ "./node_modules/lodash/_copySymbolsIn.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_copySymbolsIn.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"); +process.listeners = function (name) { return [] } -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); -} +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; -module.exports = copySymbolsIn; +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; /***/ }), -/***/ "./node_modules/lodash/_createAssigner.js": +/***/ "./node_modules/querystring-es3/decode.js": /*!************************************************!*\ - !*** ./node_modules/lodash/_createAssigner.js ***! + !*** ./node_modules/querystring-es3/decode.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), - isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"); - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -module.exports = createAssigner; - - -/***/ }), +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -/***/ "./node_modules/lodash/_createBaseFor.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_createBaseFor.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); } -module.exports = createBaseFor; +module.exports = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } -/***/ }), + var regexp = /\+/g; + qs = qs.split(sep); -/***/ "./node_modules/lodash/_createToPairs.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_createToPairs.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } -var baseToPairs = __webpack_require__(/*! ./_baseToPairs */ "./node_modules/lodash/_baseToPairs.js"), - getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), - mapToArray = __webpack_require__(/*! ./_mapToArray */ "./node_modules/lodash/_mapToArray.js"), - setToPairs = __webpack_require__(/*! ./_setToPairs */ "./node_modules/lodash/_setToPairs.js"); + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; -/** - * Creates a `_.toPairs` or `_.toPairsIn` function. - * - * @private - * @param {Function} keysFunc The function to get the keys of a given object. - * @returns {Function} Returns the new pairs function. - */ -function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); - } - if (tag == setTag) { - return setToPairs(object); + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; } - return baseToPairs(object, keysFunc(object)); - }; -} - -module.exports = createToPairs; - -/***/ }), - -/***/ "./node_modules/lodash/_customDefaultsMerge.js": -/*!*****************************************************!*\ - !*** ./node_modules/lodash/_customDefaultsMerge.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); -/** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. - */ -function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } } - return objValue; -} -module.exports = customDefaultsMerge; + return obj; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; /***/ }), -/***/ "./node_modules/lodash/_defineProperty.js": +/***/ "./node_modules/querystring-es3/encode.js": /*!************************************************!*\ - !*** ./node_modules/lodash/_defineProperty.js ***! + !*** ./node_modules/querystring-es3/encode.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"); - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -module.exports = defineProperty; - - -/***/ }), - -/***/ "./node_modules/lodash/_freeGlobal.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_freeGlobal.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) - -/***/ }), - -/***/ "./node_modules/lodash/_getAllKeys.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_getAllKeys.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); -module.exports = nativeKeys; +var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + case 'boolean': + return v ? 'true' : 'false'; -/***/ }), + case 'number': + return isFinite(v) ? v : ''; -/***/ "./node_modules/lodash/_getAllKeysIn.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_getAllKeysIn.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + default: + return ''; + } +}; -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } +module.exports = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; } - return result; -} -module.exports = nativeKeysIn; + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + } -/***/ }), + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +}; -/***/ "./node_modules/lodash/_getNative.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_getNative.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; } -module.exports = getValue; +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; /***/ }), -/***/ "./node_modules/lodash/_getPrototype.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_getPrototype.js ***! - \**********************************************/ +/***/ "./node_modules/querystring-es3/index.js": +/*!***********************************************!*\ + !*** ./node_modules/querystring-es3/index.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); +"use strict"; -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); -module.exports = getPrototype; +exports.decode = exports.parse = __webpack_require__(/*! ./decode */ "./node_modules/querystring-es3/decode.js"); +exports.encode = exports.stringify = __webpack_require__(/*! ./encode */ "./node_modules/querystring-es3/encode.js"); /***/ }), -/***/ "./node_modules/lodash/_getSymbols.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_getSymbols.js ***! - \********************************************/ +/***/ "./node_modules/readable-stream/lib/_stream_duplex.js": +/*!************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_duplex.js ***! + \************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { - -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} +/***/ (function(module, exports, __webpack_require__) { -module.exports = stubArray; +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. -/***/ }), -/***/ "./node_modules/lodash/_getSymbolsIn.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_getSymbolsIn.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} +/**/ -module.exports = stubArray; +var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/process-nextick-args/index.js"); +/**/ +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ -/***/ }), +module.exports = Duplex; -/***/ "./node_modules/lodash/_getTag.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/_getTag.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/**/ +var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js"); +util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"); +/**/ -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var Readable = __webpack_require__(/*! ./_stream_readable */ "./node_modules/readable-stream/lib/_stream_readable.js"); +var Writable = __webpack_require__(/*! ./_stream_writable */ "./node_modules/readable-stream/lib/_stream_writable.js"); -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; +util.inherits(Duplex, Readable); -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } } -module.exports = objectToString; - +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); -/***/ }), + Readable.call(this, options); + Writable.call(this, options); -/***/ "./node_modules/lodash/_initCloneArray.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_initCloneArray.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + if (options && options.readable === false) this.readable = false; -/** Used for built-in method references. */ -var objectProto = Object.prototype; + if (options && options.writable === false) this.writable = false; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); + this.once('end', onend); +} - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; } - return result; -} +}); -module.exports = initCloneArray; +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} -/***/ }), +function onEndNT(self) { + self.end(); +} -/***/ "./node_modules/lodash/_initCloneByTag.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_initCloneByTag.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); -module.exports = identity; +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + pna.nextTick(cb, err); +}; /***/ }), -/***/ "./node_modules/lodash/_initCloneObject.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_initCloneObject.js ***! - \*************************************************/ +/***/ "./node_modules/readable-stream/lib/_stream_passthrough.js": +/*!*****************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"), - getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), - isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"); - -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} - -module.exports = initCloneObject; - - -/***/ }), +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -/***/ "./node_modules/lodash/_isFlattenable.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_isFlattenable.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. -var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), - isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); -/** Built-in value references. */ -var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} +module.exports = PassThrough; -module.exports = isFlattenable; +var Transform = __webpack_require__(/*! ./_stream_transform */ "./node_modules/readable-stream/lib/_stream_transform.js"); +/**/ +var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js"); +util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"); +/**/ -/***/ }), +util.inherits(PassThrough, Transform); -/***/ "./node_modules/lodash/_isIterateeCall.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_isIterateeCall.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; + Transform.call(this, options); } -module.exports = stubFalse; - +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; /***/ }), -/***/ "./node_modules/lodash/_isPrototype.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_isPrototype.js ***! - \*********************************************/ +/***/ "./node_modules/readable-stream/lib/_stream_readable.js": +/*!**************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_readable.js ***! + \**************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} +"use strict"; +/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -module.exports = stubFalse; -/***/ }), +/**/ -/***/ "./node_modules/lodash/_listCacheClear.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_listCacheClear.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/process-nextick-args/index.js"); +/**/ -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} +module.exports = Readable; -module.exports = listCacheClear; +/**/ +var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js"); +/**/ +/**/ +var Duplex; +/**/ -/***/ }), +Readable.ReadableState = ReadableState; -/***/ "./node_modules/lodash/_listCacheDelete.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_listCacheDelete.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/**/ +var EE = __webpack_require__(/*! events */ "./node_modules/events/events.js").EventEmitter; -var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ -/** Used for built-in method references. */ -var arrayProto = Array.prototype; +/**/ +var Stream = __webpack_require__(/*! ./internal/streams/stream */ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js"); +/**/ -/** Built-in value references. */ -var splice = arrayProto.splice; +/**/ -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); +var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; +/**/ + +/**/ +var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js"); +util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"); +/**/ + +/**/ +var debugUtil = __webpack_require__(/*! util */ 0); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; } +/**/ -module.exports = listCacheDelete; +var BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ "./node_modules/readable-stream/lib/internal/streams/BufferList.js"); +var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ "./node_modules/readable-stream/lib/internal/streams/destroy.js"); +var StringDecoder; +util.inherits(Readable, Stream); -/***/ }), +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; -/***/ "./node_modules/lodash/_listCacheGet.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_listCacheGet.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); -var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); +function ReadableState(options, stream) { + Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js"); - return index < 0 ? undefined : data[index][1]; -} + options = options || {}; -module.exports = listCacheGet; + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; -/***/ }), + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; -/***/ "./node_modules/lodash/_listCacheHas.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_listCacheHas.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; -var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); -module.exports = listCacheHas; + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; -/***/ }), + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; -/***/ "./node_modules/lodash/_listCacheSet.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_listCacheSet.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // has it been destroyed + this.destroyed = false; -var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ "./node_modules/string_decoder/lib/string_decoder.js").StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; } - return this; } -module.exports = listCacheSet; +function Readable(options) { + Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js"); + if (!(this instanceof Readable)) return new Readable(options); -/***/ }), + this._readableState = new ReadableState(options, this); -/***/ "./node_modules/lodash/_mapToArray.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_mapToArray.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // legacy + this.readable = true; -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); } -module.exports = stubArray; +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); -/***/ }), +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; -/***/ "./node_modules/lodash/_overArg.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_overArg.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } -module.exports = overArg; + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; -/***/ }), +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } -/***/ "./node_modules/lodash/_overRest.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_overRest.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } -var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js"); + return needMoreData(state); +} -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; } -module.exports = overRest; +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; -/***/ }), +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ "./node_modules/string_decoder/lib/string_decoder.js").StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; -/***/ "./node_modules/lodash/_root.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/_root.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} -var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js"); +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); + if (n !== 0) state.emittedReadable = false; -module.exports = root; + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); -/***/ }), + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } -/***/ "./node_modules/lodash/_safeGet.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_safeGet.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. -/** - * Gets the value at `key`, unless `key` is "__proto__". - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function safeGet(object, key) { - return key == '__proto__' - ? undefined - : object[key]; -} + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } -module.exports = safeGet; + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } -/***/ }), + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; -/***/ "./node_modules/lodash/_setToPairs.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_setToPairs.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} + if (ret !== null) this.emit('data', ret); -module.exports = stubArray; + return ret; +}; +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; -/***/ }), + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} -/***/ "./node_modules/lodash/_setToString.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_setToString.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); } -module.exports = identity; +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} -/***/ }), +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; -/***/ "./node_modules/lodash/assign.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/assign.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; -var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), - copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js"), - isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), - isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); -/** Used for built-in method references. */ -var objectProto = Object.prototype; + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); -/** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ -var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } } } -}); - -module.exports = assign; + function onend() { + debug('onend'); + dest.end(); + } -/***/ }), + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); -/***/ "./node_modules/lodash/clone.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/clone.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); -var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js"); + cleanedUp = true; -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); -} + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } -module.exports = clone; + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); -/***/ }), + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); -/***/ "./node_modules/lodash/defaults.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/defaults.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } -var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), - eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), - isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); + // tell the dest that it's being piped to + dest.emit('pipe', src); -/** Used for built-in method references. */ -var objectProto = Object.prototype; + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + return dest; +}; -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(object, sources) { - object = Object(object); +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; + if (!dest) dest = state.pipes; - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; } - return object; -}); + // slow case. multiple pipe destinations. -module.exports = defaults; + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, unpipeInfo); + }return this; + } -/***/ }), + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; -/***/ "./node_modules/lodash/defaultsDeep.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/defaultsDeep.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; -var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js"), - baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), - customDefaultsMerge = __webpack_require__(/*! ./_customDefaultsMerge */ "./node_modules/lodash/_customDefaultsMerge.js"), - mergeWith = __webpack_require__(/*! ./mergeWith */ "./node_modules/lodash/mergeWith.js"); + dest.emit('unpipe', this, unpipeInfo); -/** - * This method is like `_.defaults` except that it recursively assigns - * default properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults - * @example - * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } - */ -var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); -}); + return this; +}; -module.exports = defaultsDeep; +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; -/***/ }), +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} -/***/ "./node_modules/lodash/eq.js": -/*!***********************************!*\ - !*** ./node_modules/lodash/eq.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } } -module.exports = eq; +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} -/***/ }), +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; -/***/ "./node_modules/lodash/filter.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/filter.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); } - } - return result; -} -module.exports = arrayFilter; + _this.push(null); + }); + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); -/***/ }), + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; -/***/ "./node_modules/lodash/flatMap.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/flatMap.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); -var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"), - map = __webpack_require__(/*! ./map */ "./node_modules/lodash/map.js"); + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } -/** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [n, n]; - * } - * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ -function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); -} + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } -module.exports = flatMap; + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; +}; -/***/ }), +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); -/***/ "./node_modules/lodash/forOwn.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/forOwn.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +// exposed for testing purposes only. +Readable._fromList = fromList; -var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), - castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"); +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && baseForOwn(object, castFunction(iteratee)); + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; } -module.exports = forOwn; +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} -/***/ }), +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} -/***/ "./node_modules/lodash/fromPairs.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/fromPairs.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +function endReadable(stream) { + var state = stream._readableState; -/** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['a', 1], ['b', 2]]); - * // => { 'a': 1, 'b': 2 } - */ -function fromPairs(pairs) { - var index = -1, - length = pairs == null ? 0 : pairs.length, - result = {}; + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - while (++index < length) { - var pair = pairs[index]; - result[pair[0]] = pair[1]; + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); } - return result; } -module.exports = fromPairs; +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"))) /***/ }), -/***/ "./node_modules/lodash/functionsIn.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/functionsIn.js ***! - \********************************************/ +/***/ "./node_modules/readable-stream/lib/_stream_transform.js": +/*!***************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_transform.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseFunctions = __webpack_require__(/*! ./_baseFunctions */ "./node_modules/lodash/_baseFunctions.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -/** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functions - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ -function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); -} +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + + + +module.exports = Transform; + +var Duplex = __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js"); -module.exports = functionsIn; +/**/ +var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js"); +util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"); +/**/ +util.inherits(Transform, Duplex); -/***/ }), +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; -/***/ "./node_modules/lodash/has.js": -/*!************************************!*\ - !*** ./node_modules/lodash/has.js ***! - \************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + var cb = ts.writecb; -/** Used for built-in method references. */ -var objectProto = Object.prototype; + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + ts.writechunk = null; + ts.writecb = null; -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } } -module.exports = baseHas; +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); -/***/ }), + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; -/***/ "./node_modules/lodash/identity.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/identity.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; -module.exports = identity; + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + if (typeof options.flush === 'function') this._flush = options.flush; + } -/***/ }), + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} -/***/ "./node_modules/lodash/isArguments.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/isArguments.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +function prefinish() { + var _this = this; -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } } -module.exports = stubFalse; +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; -/***/ }), +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; -/***/ "./node_modules/lodash/isArray.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/isArray.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; -module.exports = isArray; +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + return stream.push(null); +} /***/ }), -/***/ "./node_modules/lodash/isArrayLike.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/isArrayLike.js ***! - \********************************************/ +/***/ "./node_modules/readable-stream/lib/_stream_writable.js": +/*!**************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_writable.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), - isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. -module.exports = isArrayLike; -/***/ }), +/**/ -/***/ "./node_modules/lodash/isArrayLikeObject.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/isArrayLikeObject.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/process-nextick-args/index.js"); +/**/ -var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); +module.exports = Writable; -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; } -module.exports = isArrayLikeObject; +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ -/***/ }), +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ -/***/ "./node_modules/lodash/isBoolean.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/isBoolean.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/**/ +var Duplex; +/**/ -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); +Writable.WritableState = WritableState; -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; +/**/ +var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js"); +util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"); +/**/ -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ -function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); +/**/ +var internalUtil = { + deprecate: __webpack_require__(/*! util-deprecate */ "./node_modules/util-deprecate/browser.js") +}; +/**/ + +/**/ +var Stream = __webpack_require__(/*! ./internal/streams/stream */ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js"); +/**/ + +/**/ + +var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } -module.exports = isBoolean; +/**/ +var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ "./node_modules/readable-stream/lib/internal/streams/destroy.js"); -/***/ }), +util.inherits(Writable, Stream); -/***/ "./node_modules/lodash/isBuffer.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isBuffer.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +function nop() {} -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} +function WritableState(options, stream) { + Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js"); -module.exports = stubFalse; + options = options || {}; + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; -/***/ }), + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; -/***/ "./node_modules/lodash/isFunction.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/isFunction.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); -module.exports = isFunction; + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + // has it been destroyed + this.destroyed = false; -/***/ }), + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; -/***/ "./node_modules/lodash/isLength.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isLength.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} + // a flag to see when we're in the middle of a write. + this.writing = false; -module.exports = isLength; + // when true all writes will be buffered until .uncork() call + this.corked = 0; + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; -/***/ }), + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; -/***/ "./node_modules/lodash/isMap.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/isMap.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; -module.exports = stubFalse; + // the amount that is being written when _write is called. + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; -/***/ }), + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; -/***/ "./node_modules/lodash/isNumber.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isNumber.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; -/** `Object#toString` result references. */ -var numberTag = '[object Number]'; + // count buffered requests + this.bufferedRequestCount = 0; -/** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ -function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); } -module.exports = isNumber; - +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; -/***/ }), +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); -/***/ "./node_modules/lodash/isObject.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isObject.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; } -module.exports = isObject; - - -/***/ }), +function Writable(options) { + Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js"); -/***/ "./node_modules/lodash/isObjectLike.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/isObjectLike.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } -module.exports = isObjectLike; + this._writableState = new WritableState(options, this); + // legacy. + this.writable = true; -/***/ }), + if (options) { + if (typeof options.write === 'function') this._write = options.write; -/***/ "./node_modules/lodash/isPlainObject.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/isPlainObject.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (typeof options.writev === 'function') this._writev = options.writev; -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + if (typeof options.destroy === 'function') this._destroy = options.destroy; -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; + if (typeof options.final === 'function') this._final = options.final; + } -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; + Stream.call(this); +} -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); } - var proto = getPrototype(value); - if (proto === null) { - return true; + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; + return valid; } -module.exports = isPlainObject; - +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); -/***/ }), + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } -/***/ "./node_modules/lodash/isSet.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/isSet.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; -module.exports = stubFalse; + if (typeof cb !== 'function') cb = nop; + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } -/***/ }), + return ret; +}; -/***/ "./node_modules/lodash/isString.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isString.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +Writable.prototype.cork = function () { + var state = this._writableState; -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + state.corked++; +}; -/** `Object#toString` result references. */ -var stringTag = '[object String]'; +Writable.prototype.uncork = function () { + var state = this._writableState; -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); -} + if (state.corked) { + state.corked--; -module.exports = isString; + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; -/***/ }), +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} -/***/ "./node_modules/lodash/isTypedArray.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/isTypedArray.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; -module.exports = stubFalse; + state.length += len; + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; -/***/ }), + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } -/***/ "./node_modules/lodash/keys.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/keys.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return ret; +} -var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; -module.exports = nativeKeys; + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} -/***/ }), +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; -/***/ "./node_modules/lodash/keysIn.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/keysIn.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + onwriteStateUpdate(state); -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); } } - return result; } -module.exports = nativeKeysIn; - - -/***/ }), - -/***/ "./node_modules/lodash/map.js": -/*!************************************!*\ - !*** ./node_modules/lodash/map.js ***! - \************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} - while (++index < length) { - result[index] = iteratee(array[index], index, array); +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); } - return result; } -module.exports = arrayMap; +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; -/***/ }), + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; -/***/ "./node_modules/lodash/mergeWith.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/mergeWith.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + doWrite(stream, state, true, state.length, buffer, '', holder.finish); -var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"), - createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js"); + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; -/** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with six arguments: - * (objValue, srcValue, key, object, source, stack). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { 'a': [1], 'b': [2] }; - * var other = { 'a': [3], 'b': [4] }; - * - * _.mergeWith(object, other, customizer); - * // => { 'a': [1, 3], 'b': [2, 4] } - */ -var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); -}); + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } -module.exports = mergeWith; + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; -/***/ }), +Writable.prototype._writev = null; -/***/ "./node_modules/lodash/toPairs.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/toPairs.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; -var createToPairs = __webpack_require__(/*! ./_createToPairs */ "./node_modules/lodash/_createToPairs.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } -/** - * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. If `object` is a map or set, its - * entries are returned. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias entries - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.toPairs(new Foo); - * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) - */ -var toPairs = createToPairs(keys); + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); -module.exports = toPairs; + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; -/***/ }), +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} -/***/ "./node_modules/lodash/toPlainObject.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/toPlainObject.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} -/** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return copyObject(value, keysIn(value)); +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } } -module.exports = toPlainObject; +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../timers-browserify/main.js */ "./node_modules/timers-browserify/main.js").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), -/***/ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js": -/*!**************************************************************************!*\ - !*** ./node_modules/node-libs-browser/node_modules/punycode/punycode.js ***! - \**************************************************************************/ +/***/ "./node_modules/readable-stream/lib/internal/streams/BufferList.js": +/*!*************************************************************************!*\ + !*** ./node_modules/readable-stream/lib/internal/streams/BufferList.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */ -;(function(root) { +"use strict"; - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 +var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer; +var util = __webpack_require__(/*! util */ 1); - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, + this.head = null; + this.tail = null; + this.length = 0; + } - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; - /** Temporary variable */ - key; + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; - /*--------------------------------------------------------------------------*/ + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw new RangeError(errors[type]); - } + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } + return BufferList; +}(); - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } +/***/ }), - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } +/***/ "./node_modules/readable-stream/lib/internal/streams/destroy.js": +/*!**********************************************************************!*\ + !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } +"use strict"; - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. +/**/ - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } +var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/process-nextick-args/index.js"); +/**/ - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); + } + return this; + } - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks - if (index >= inputLength) { - error('invalid-input'); - } + if (this._readableState) { + this._readableState.destroyed = true; + } - digit = basicToDigit(input.charCodeAt(index++)); + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } + this._destroy(err || null, function (err) { + if (!cb && err) { + pna.nextTick(emitErrorNT, _this, err); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err); + } + }); - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + return this; +} - if (digit < t) { - break; - } +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} - w *= baseMinusT; +function emitErrorNT(self, err) { + self.emit('error', err); +} - } +module.exports = { + destroy: destroy, + undestroy: undestroy +}; - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); +/***/ }), - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } +/***/ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - n += floor(i / out); - i %= out; +module.exports = __webpack_require__(/*! events */ "./node_modules/events/events.js").EventEmitter; - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - } +/***/ }), - return ucs2encode(output); - } +/***/ "./node_modules/readable-stream/readable-browser.js": +/*!**********************************************************!*\ + !*** ./node_modules/readable-stream/readable-browser.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; +exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ "./node_modules/readable-stream/lib/_stream_readable.js"); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ "./node_modules/readable-stream/lib/_stream_writable.js"); +exports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ "./node_modules/readable-stream/lib/_stream_duplex.js"); +exports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ "./node_modules/readable-stream/lib/_stream_transform.js"); +exports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ "./node_modules/readable-stream/lib/_stream_passthrough.js"); - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - // Cache the length - inputLength = input.length; +/***/ }), - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; +/***/ "./node_modules/safe-buffer/index.js": +/*!*******************************************!*\ + !*** ./node_modules/safe-buffer/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } +/* eslint-disable node/no-deprecated-api */ +var buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js") +var Buffer = buffer.Buffer - handledCPCount = basicLength = output.length; +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) - // Main encoding loop: - while (handledCPCount < inputLength) { +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} - delta += (m - n) * handledCPCountPlusOne; - n = m; +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } +/***/ }), + +/***/ "./node_modules/setimmediate/setImmediate.js": +/*!***************************************************!*\ + !*** ./node_modules/setimmediate/setImmediate.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } +/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { + "use strict"; - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } + if (global.setImmediate) { + return; + } - ++delta; - ++n; + var nextHandle = 1; // Spec says greater than zero + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global.document; + var registerImmediate; - } - return output.join(''); - } + function setImmediate(callback) { + // Callback can either be a function or a string + if (typeof callback !== "function") { + callback = new Function("" + callback); + } + // Copy function arguments + var args = new Array(arguments.length - 1); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i + 1]; + } + // Store and register the task + var task = { callback: callback, args: args }; + tasksByHandle[nextHandle] = task; + registerImmediate(nextHandle); + return nextHandle++; + } - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } + function run(task) { + var callback = task.callback; + var args = task.args; + switch (args.length) { + case 0: + callback(); + break; + case 1: + callback(args[0]); + break; + case 2: + callback(args[0], args[1]); + break; + case 3: + callback(args[0], args[1], args[2]); + break; + default: + callback.apply(undefined, args); + break; + } + } - /*--------------------------------------------------------------------------*/ + function runIfPresent(handle) { + // From the spec: "Wait until any invocations of this algorithm started before this one have completed." + // So if we're currently running a task, we'll need to delay this invocation. + if (currentlyRunningATask) { + // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a + // "too much recursion" error. + setTimeout(runIfPresent, 0, handle); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + run(task); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.4.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; + function installNextTickImplementation() { + registerImmediate = function(handle) { + process.nextTick(function () { runIfPresent(handle); }); + }; + } - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - true - ) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return punycode; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} + function canUsePostMessage() { + // The test against `importScripts` prevents this implementation from being installed inside a web worker, + // where `global.postMessage` means something completely different and can't be used for this purpose. + if (global.postMessage && !global.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global.onmessage; + global.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global.postMessage("", "*"); + global.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } -}(this)); + function installPostMessageImplementation() { + // Installs an event handler on `global` for the `message` event: see + // * https://developer.mozilla.org/en/DOM/window.postMessage + // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global && + typeof event.data === "string" && + event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; -/***/ }), + if (global.addEventListener) { + global.addEventListener("message", onGlobalMessage, false); + } else { + global.attachEvent("onmessage", onGlobalMessage); + } -/***/ "./node_modules/number-to-bn/src/index.js": -/*!************************************************!*\ - !*** ./node_modules/number-to-bn/src/index.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + registerImmediate = function(handle) { + global.postMessage(messagePrefix + handle, "*"); + }; + } -var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js"); -var stripHexPrefix = __webpack_require__(/*! strip-hex-prefix */ "./node_modules/strip-hex-prefix/src/index.js"); + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; -/** - * Returns a BN object, converts a number value to a BN - * @param {String|Number|Object} `arg` input a string number, hex string number, number, BigNumber or BN object - * @return {Object} `output` BN object of the number - * @throws if the argument is not an array, object that isn't a bignumber, not a string number or number - */ -module.exports = function numberToBN(arg) { - if (typeof arg === 'string' || typeof arg === 'number') { - var multiplier = new BN(1); // eslint-disable-line - var formattedString = String(arg).toLowerCase().trim(); - var isHexPrefixed = formattedString.substr(0, 2) === '0x' || formattedString.substr(0, 3) === '-0x'; - var stringArg = stripHexPrefix(formattedString); // eslint-disable-line - if (stringArg.substr(0, 1) === '-') { - stringArg = stripHexPrefix(stringArg.slice(1)); - multiplier = new BN(-1, 10); + registerImmediate = function(handle) { + channel.port2.postMessage(handle); + }; } - stringArg = stringArg === '' ? '0' : stringArg; - if ((!stringArg.match(/^-?[0-9]+$/) && stringArg.match(/^[0-9A-Fa-f]+$/)) - || stringArg.match(/^[a-fA-F]+$/) - || (isHexPrefixed === true && stringArg.match(/^[0-9A-Fa-f]+$/))) { - return new BN(stringArg, 16).mul(multiplier); + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + registerImmediate = function(handle) { + // Create a